Compare commits

...
Author SHA1 Message Date
Jake Potrebic f10858e41f Bytecode Modification Framework 2024-08-27 21:14:07 -07:00
Nassim Jahnke 25621248d3 [ci skip] Create SECURITY.md (#11331) 2024-08-27 18:12:32 +02:00
Gegy e08e6679fc Fix: synchronise sending chat to client with updating message signature cache (#11332)
In the case where multiple messages from different players are being processed in parallel, there was a potential race condition where the messages would be sent to the client in a different order than the message signature cache was updated. However, the cache relies on the fact that the client and server get the exact same updates in the same order. This race condition would cause the caches to become corrupted, and any future message received by the client would fail to validate.

This also applies to the last seen state of the server, which becomes inconsistent in the same way as the message signature cache and would cause any messages sent to be rejected by the server too.
2024-08-26 19:53:28 +02:00
Lulu13022002andJake Potrebic 789a267e93 Re-implement maxLeashDistance world conf and call missing event (#11301)
* Re-implement maxLeashDistance world config and call missing event

* migrate config setting to double or default

* fixes

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-25 14:32:32 -07:00
okx-code a7b8d9574e Add enchantment seed update API (#11282) 2024-08-25 22:39:06 +02:00
Isaac - The456 dd8c70a851 Ensure TabCompleteEvent always has a mutable backing list. (#11302) 2024-08-25 22:28:32 +02:00
DerEchtePilz 374d9c85ba Add a method to reset Lodestone compasses back to normal ones (#11308) 2024-08-25 22:25:13 +02:00
DerEchtePilz ad4c524c2f Properly destroy placed blocks on the end platform (#11292) 2024-08-25 21:19:40 +02:00
Jake Potrebic e2da65c689 Deprecate API relating to menu title changes (#11309) 2024-08-25 20:56:17 +02:00
Jake Potrebic 5167856bb8 Fix despawn ranges by defaulting to an ellipsoid shape (#11312) 2024-08-25 20:26:33 +02:00
Newwind 5b2c43edaf Remove set damage lootable item function from compasses (#11317) 2024-08-25 19:52:12 +02:00
Newwind 94444cebc3 Fix incorrect timestamp in region file header recalculation (#11318) 2024-08-25 19:42:15 +02:00
Lulu13022002 5625051564 Prevent duplicate pickup event for piglins (#11322) 2024-08-25 19:27:31 +02:00
Janet Blackquill 956b3d1c4e Ensure MaterialChoice materials are items (#11325) 2024-08-25 19:20:10 +02:00
Nassim Jahnke fcedb49fea Update spark-paper 2024-08-24 10:52:38 +02:00
roro1506HD 2fdb2e9dcd Fix structure check API (#11307)
* Fix structure check API

* Use CraftStructure#bukkitToMinecraft

* Fixed spelling mistake on CraftStructure class name
2024-08-20 18:27:33 -07:00
Jake Potrebic 32711191cd Fix SculkBloomEvent firing for block entity loading (#11306) 2024-08-19 14:28:03 -07:00
Nassim Jahnke e4b38b4f8c Fixup config parsing 2024-08-19 12:47:50 +02:00
DerEchtePilz a8cb8e6745 [ci skip] Fix JavaDocs for HeightMap#MOTION_BLOCKING_NO_LEAVES (#11291) 2024-08-19 11:48:20 +02:00
Anthony J. Halliday ba1b0162fa Allow server administrators to disable book size checks (#10457) 2024-08-19 11:46:39 +02:00
kokiriglade dae906ba45 Add getWorld method that uses adventure Key (#11199) 2024-08-19 11:41:55 +02:00
Nassim Jahnke 8fd3a67138 [ci skip] Clean up book limits patch (#11297) 2024-08-19 11:33:17 +02:00
Spottedleaf be1078f5f2 Use player file, not directory, when checking for offline player data
When trying to fall back to offline player data in onlide mode,
we need to use the player file. This fixes a mistake during
update where 'file' was used, but the new code uses 'file1'
for the player file.
2024-08-18 15:32:25 -07:00
Spottedleaf b4bc512cac Fix entity limit patch deleting unnecessary entities
We need to continue the save loop, not break from it
when a limit is reached.
2024-08-18 11:14:39 -07:00
SoSeDiKandJake Potrebic 64c9ee6584 Allow getting/setting the sign's editor uuid (#10637)
* Allow getting/setting the sign's editor uuid

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-17 14:36:27 -07:00
Tamion 44017487a8 Fix CraftBukkit drag system (#10703) 2024-08-17 23:31:38 +02:00
Isaac - The456 8c3018a4b1 Fix Selector Arguments not working with permission (#11286) 2024-08-17 23:20:21 +02:00
Lulu13022002 57dd822393 Leashable API (#10961) 2024-08-17 23:17:18 +02:00
Jake Potrebic 2e82fd2d2c Add even more Enchantment API (#11115) 2024-08-17 22:58:36 +02:00
Lulu13022002 66a97cc929 Update item data sanitization (#11227) 2024-08-17 22:30:21 +02:00
Jake Potrebic 0e7361704a Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11284)
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
4068c6aa PR-1053: Change docs for max power in FireworkMeta
6b3c241b SPIGOT-7783, SPIGOT-7784, PR-1051: Add Trial Vault & Spawner event API
5fe300ec PR-1052: Fix broken links and minor improvement for checkstyle.xml

CraftBukkit Changes:
7548afcf2 SPIGOT-7872: Fix crash with event-modified teleports
93480d5d6 SPIGOT-7868, PR-1463: Fix default and max power in FireworkMeta
5060d1a84 SPIGOT-7783, SPIGOT-7784, PR-1460: Add Trial Vault & Spawner event API
11dfcae71 PR-1462: Fix broken links and minor improvement for checkstyle.xml

Spigot Changes:
ca581228 Rebuild patches
2024-08-17 12:39:11 -07:00
Tamion 75655ec1d3 Add Configuration for vertical Despawn Ranges (#11279) 2024-08-17 21:13:10 +02:00
Shane Freeder 52ae4ad466 Migrate ArmorStand meta to using entity tag (#11107) 2024-08-17 00:30:11 +02:00
Lulu13022002 d5ffc573dc Implement more methods for horse inventories (#11147) 2024-08-17 00:27:47 +02:00
Lulu13022002andJake Potrebic 4829fbf6bd Handle custom registry elements properly (#11230)
* Handle custom registry elements properly

* update error message

Datapack made painting variant support is added in https://github.com/PaperMC/Paper/pull/11244

* change msg for art conversion

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-16 14:21:35 -07:00
Lulu13022002 78216fef26 Re-implement portalCreateRadius world config (#11267) 2024-08-16 13:59:46 -07:00
Mart e619744fbd Allow skipping of world symlink validation (#11250) 2024-08-16 22:36:30 +02:00
Bjarne Koll 534ab86010 [ci-skip] Revert "Add Configuration for vertical Despawn Ranges (#10440)" (#11278)
This reverts commit 1b8ab116ed.
2024-08-16 22:33:52 +02:00
Tamion 1b8ab116ed Add Configuration for vertical Despawn Ranges (#10440) 2024-08-16 22:29:53 +02:00
AbelandBjarne Koll ec55c11fc0 Fix indestructable light blocks (#11275)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-08-16 22:13:00 +02:00
Lulu13022002 95719832bf Fix scanForLegacyEnderDragon world config (#11262) 2024-08-16 21:45:07 +02:00
81bfda8710 [ci skip] Specify rebase location in CONTRIBUTING (#11255)
* [ci skip] Specify rebase location in CONTRIBUTING

* Improve

* remove Paper-MojangAPI mention

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
2024-08-16 12:41:58 -07:00
Spottedleaf fb530743e5 Apply optimise collision checking in move packet handling patch 2024-08-16 06:56:13 -07:00
Lulu13022002 bf5852a615 Fix NPE for PlayerPostRespawnEvent#getRespawnedLocation (#11268) 2024-08-16 09:20:57 +02:00
Lulu13022002 11b4ac7c65 Fix disableEndCredits world config (#11261) 2024-08-14 21:26:38 +02:00
hyperdefinedandJake Potrebic 9ab644ed29 Fix TooltipContext.create being wrong(#11254)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-14 14:39:45 +02:00
Nassim Jahnke 7c9240f4a6 Improve standard messenger logging 2024-08-12 18:42:08 +02:00
Jake Potrebic 1798e949e5 Fix BasicCommand suggestion arg count (#11241) 2024-08-12 09:40:39 +02:00
hyperdefined 4a97ba3ea8 Fix setSendViewDistance's return (#11247) 2024-08-12 09:27:27 +02:00
Jake Potrebic f97aff74b6 [ci skip] Fix Effect javadocs (#11182) 2024-08-12 00:35:45 +02:00
Lulu13022002 098bd39092 Remove arbitrary book page limit (#11228) 2024-08-12 00:30:23 +02:00
Newwind ab0d24aa6f Configuration for horizontal-only item merging (#11219) 2024-08-12 00:16:20 +02:00
Jake PotrebicandBjarne Koll dd941cc40a Re-add patches for can-place/can-destroy API (#11238)
* Re-add patches for can-place/can-destroy API

This API is all deprecated for removal and has to be replaced
as the structure of it has too radically changed

* update patches

* add link to MaterialRerouting

* Deprecation

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-08-11 13:51:37 -07:00
Jake Potrebic 1187544fb0 Fix teleport event getTo returning null (#11239) 2024-08-11 22:42:39 +02:00
Jake Potrebic 1c3c47ab0b Correctly check enchants for ItemStack#damage (#11240) 2024-08-11 13:27:24 -07:00
Lulu13022002 7d7f123e98 Fix wrong spawn reason for trial spawners (#11229) 2024-08-10 15:19:54 -07:00
Lulu13022002andJake Potrebic 1cecc24cad Fix tag key generator output inconsistencies (#11218)
* Fix tag key generator output inconsistencies

* use NonNull instead of NotNull for generated api

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-08-10 15:11:57 -07:00
Lulu13022002 70dfa467e7 Fix CraftMetaShield equality (#11232) 2024-08-10 15:08:00 +02:00
Nassim Jahnke 306d0dfdf0 Update generated code 2024-08-10 12:43:24 +02:00
Nassim Jahnke 83b6b26d39 Update to 1.21.1 2024-08-10 12:24:38 +02:00
Nassim Jahnke b1b5d4c1e4 Check shooter in configurable projectile relative velocity patch 2024-08-10 11:55:08 +02:00
Joo200 4d7cef3418 Fix source of knockback for spigot events (#11176) 2024-08-09 22:57:55 +02:00
Bjarne Koll 77a5779e24 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11197)
Upstream has released updates that appear 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:
2ec53f49 PR-1050: Fix empty result check for Complex Recipes
10671012 PR-1044: Add CrafterCraftEvent
4d87ffe0 Use correct method in JavaDoc
ae5e5817 SPIGOT-7850: Add API for Bogged shear state
46b6d445 SPIGOT-7837: Support data pack banner patterns
d5d0cefc Fix JavaDoc error
b3c2b83d PR-1036: Add API for InventoryView derivatives
1fe2c75a SPIGOT-7809: Add ShieldMeta

CraftBukkit Changes:
8ee6fd1b8 SPIGOT-7857: Improve ItemMeta block data deserialization
8f26c30c6 SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta
759061b93 SPIGOT-7855: Fire does not spread or burn blocks
00fc9fb64 SPIGOT-7853: AnvilInventory#getRepairCost() always returns 0
7501e2e04 PR-1450: Add CrafterCraftEvent
8c51673e7 SPIGOT-5731: PortalCreateEvent#getEntity returns null for nether portals ignited by flint and steel
d53d0d0b1 PR-1456: Fix inverted logic in CraftCrafterView#setSlotDisabled
682a678c8 SPIGOT-7850: Add API for Bogged shear state
fccf5243a SPIGOT-7837: Support data pack banner patterns
9c3bd4390 PR-1431: Add API for InventoryView derivatives
0cc6acbc4 SPIGOT-7849: Fix FoodComponent serialize with "using-converts-to" using null
2c5474952 Don't rely on tags for CraftItemMetas
20d107e46 SPIGOT-7846: Fix ItemMeta for hanging signs
76f59e315 Remove redundant clone in Dropper InventoryMoveItemEvent
e61a53d25 SPIGOT-7817: Call InventoryMoveItemEvent for Crafters
894682e2d SPIGOT-7839: Remove redundant Java version checks
2c12b2187 SPIGOT-7809: Add ShieldMeta and fix setting shield base colours

Spigot Changes:
fb8fb722 Rebuild patches
34bd42b7 SPIGOT-7835: Fix issue with custom hopper settings
2024-08-09 22:05:50 +02:00
Nassim Jahnke 4e6a2a13a3 Check for block type in SculkSensorBlock#canActivate 2024-08-07 14:34:12 +02:00
granny 042f15ffbd [ci skip] chore: fix incorrect commit hash in PR builds (#11198)
* fix incorrect hash in PR builds

* only apply ref on pull_request triggers
2024-08-06 10:37:26 -07:00
metabrix 7e44684a1f Fix wrong assumption about locale being null in the login phase (#11204)
Fixes #11203
2024-08-05 21:02:19 +02:00
Nassim Jahnke 5a5c3a4a24 Remove chunk unload trace debug
The issue the patch was initially added for has already been fixed and filling stacktraces can be expensive
2024-08-05 19:57:34 +02:00
Spottedleaf df3b6544f7 ConcurrentUtil: Fix concurrent long map resize chain pull function
The function assumed that the current resize chain pointed to
the previous table, when in fact it pointed to the current table.

The function is supposed to restore the resize chain to the previous
table, previous increment, and previous index + new increment.
2024-08-01 16:55:33 -07:00
Spottedleaf 0a1be9ae87 Make loadChunksForMoveAsync use new chunk system load calls
This is to allow the call to work properly when on Folia,
as Folia does not have a main thread.
2024-07-30 19:50:14 -07:00
Jason Penilla 58c7ea3193 Preserve command node when re-registering modern commands through old API (#11184)
* Preserve command node when re-registering modern commands through old API

* make fix more targeted

mainly because it didn't work for vanilla commands :)
2024-07-30 11:42:55 -07:00
Jason Penilla 67d414a927 Allow plugin aliases to override vanilla commands (#11186)
fixes #11035
2024-07-30 11:28:05 -07:00
Spottedleaf 227544cfc7 Move TickThread changes from Moonrise patch to MCUtils
The common changes from Moonrise should be entirely in MCUtils
2024-07-30 05:32:20 -07:00
Shane Freeder 100d75a11c Don't entirely die just because a plugin jar was bad 2024-07-29 16:54:46 +01:00
Shane Freeder 438863c4c5 Shutdown L4J cordially if the server stops before it's even started (#11172)
primarily, this allows us to ensure that appenders are flushed, console, log files
before the JVM exits to avoid issues such as error messages disappearing
2024-07-29 16:10:53 +01:00
Spottedleaf 0246a9da86 Add mob bucket items to item id to entity map in DataConverter
Mojang missed these in their mapping. Since the entity data
is used when spawning the bucketed mob, we need to have these
inside the id map to ensure that the entity data is converted
correctly if the entity id is missing.
2024-07-28 17:40:59 -07:00
Spottedleaf 3234b20ee4 Do not allow chunk unloading outside of the regular tick loop
Allowing chunk loading to occur at any point via purgeUnload()
introduces possible undesirable behavior to occur recursively
inside the chunk system.
2024-07-28 16:18:25 -07:00
Spottedleaf 50bdfc3e2c Null check tracker in Entity#resendPossiblyDesyncedEntityData
Accidentally dropped this check last commit. It is possible
that this is called while the entity is not tracked.
2024-07-28 15:49:38 -07:00
Spottedleaf f774787a39 Copy missed changes to chunk system from Folia 2024-07-28 15:34:07 -07:00
Spottedleaf 694b120d0b Remove Entity tracker field
Now the only tracker field is from the entity tracker
optimisations.
2024-07-28 15:28:52 -07:00
Jake Potrebic f82bea6940 Add argument for FinePosition to brig API (#11094) 2024-07-28 11:23:18 -07:00
powercas_gamer dcbd99de4a Fix Owen's typos (#11179) 2024-07-28 10:58:57 -07:00
Tamion 66165f712a Fix PickupStatus getting reset (#11154) 2024-07-27 16:37:51 +02:00
Newwind 645a677122 Make max interaction range configurable (#11164)
The server validates incoming interaction packets by ensuring the player
sending them is inside their interaction range. For this, the server adds
a magic value, by default 1.0, to the original interaction range to
account for latency issues.

This value however may be too low in high latency environments.
The patch exposes a new configuration option to configure said value.
2024-07-27 14:18:16 +02:00
Shane Freeder e1462a9253 Bump MCUtils#asyncExecutor core size
Long ago we discovered that the default thread pools would not increase
the number of threads running the pool until queue addition failed.
Bumping the core size mitigates an issue with spark-paper, and in general,
keeping async threads around generally beats having to spin new ones
everytime we want to execute a periodic async task.
2024-07-26 13:43:48 +01:00
Lulu13022002 5a5035be96 Fix a couple of ItemMeta related NPEs (#11149) 2024-07-23 10:11:00 +02:00
powercas_gamer 5512af798f [ci skip] remove timings from issue templates (#11127) 2024-07-22 23:30:57 +02:00
Lulu13022002 73a863b337 Fix horse inventories indices (#11139) 2024-07-22 15:17:25 +02:00
Tamion aa36ae6576 Fix EntityUnleashEvent cancellation on distance cause (#11131) 2024-07-21 12:33:37 +02:00
Riley Park 3a47518b4b Deprecate more Timings things for removal (#11126) 2024-07-20 19:40:41 -07:00
Riley Park 7e91a2c3ab Update the bundled spark version 2024-07-20 13:56:37 -07:00
Riley Park 9aea24002a Properly lookup plugin classes when looked up by spark
fixes #11124
2024-07-20 13:00:29 -07:00
Riley ParkandJason Penilla aa3b356834 Improve server startup logging (#11110)
* Improve server startup logging

* Add plugin info at startup

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-07-20 10:36:52 -07:00
Riley Park 5fee9c62da Move configuration option to a system property 2024-07-20 10:14:55 -07:00
Riley Park 681c01336b Bundle spark (#11093) 2024-07-20 09:35:39 -07:00
Jason Penilla f1f01a1622 Adjust done message again (#11118)
what paper now shows as level loading time is the time displayed by vanilla or spigot in the 'done' message

the time in the done message is now the actual time since the servers Main class was initialized
2024-07-19 12:36:09 -07:00
Bjarne Koll 968bdeb46f Make CraftComplexRecipe extend CraftingRecipe (#11114) 2024-07-19 19:29:31 +02:00
Nassim Jahnke e71c1df54c Call PlayerChunkUnloadEvent 2024-07-19 13:50:38 +02:00
Nassim Jahnke 7ea403902b Fixup startup time log message 2024-07-19 13:38:43 +02:00
Nassim Jahnke 75af62b298 Split rewriting flag into paper.disableOldApiSupport and paper.disablePluginRemapping (#11108) 2024-07-19 13:08:08 +02:00
Bjarne Koll 2a39276794 Add CrafterCraftEvent (#11082)
Ports the proposed CrafterCraftEvent proposed in an
open upstream PR.

See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1044
2024-07-19 11:21:26 +02:00
Jason Penilla d08e8d1afa Add total time to done message (#11109)
* Add total time to done message

Previously it would only show the world load time which is misleading

* Add comments
2024-07-18 15:33:14 -07:00
Nassim Jahnke a8db527449 Even more cleanup of mcutil patch 2024-07-18 18:15:13 +02:00
granny 3c8a7fe1a4 Re-add missing chunk event calls (#11104) 2024-07-18 13:34:34 +02:00
Nassim Jahnke dd11ef8441 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11102)
Upstream has released updates that appear 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:
3a3bea52 SPIGOT-7829: Increase maximum outgoing plugin message size to match Vanilla intention
5cd1c8cb SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
a8e278f0 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
53729d12 Remove spurious ApiStatus.Internal annotation
b9f57486 SPIGOT-7799, PR-1039: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent
7983b966 PR-1029: Trial changing a small number of inner enums to classes/interfaces to better support custom values

CraftBukkit Changes:
403accd56 SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT
812761660 Increase outdated build delay
bed1e3ff6 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
2444c8b23 SPIGOT-7823: Suspicious sand and gravel material are not marked as having gravity correctly
aceddcd0b SPIGOT-7820: Enum changes - duplicate method name
a0d2d6a84 SPIGOT-7813: Material#isInteractable() always returns false
8fd64b091 SPIGOT-7806: Handle both loot and inventory item drop behaviour in PlayerDeathEvent
a4ee40b74 SPIGOT-7799, PR-1436: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent
082aa51c5 PR-1424: Trial changing a small number of inner enums to classes/interfaces to better support custom values
66e78a96b SPIGOT-7815: Consider EntityDamageEvent status for Wolf armor damage

Spigot Changes:
5bbef5ad SPIGOT-7834: Modify max value for generic.max_absorption
2024-07-18 10:13:20 +02:00
Jake Potrebic 44c3dd0d4c fix exact choice shapeless recipes (#10973) 2024-07-17 12:48:31 -07:00
Spottedleaf 2df5bba16a Log throwable when failing to save chunk/poi/entity data 2024-07-17 11:48:24 -07:00
Spottedleaf b653276565 Finish chunk tick iteration optimisation port from Moonrise 2024-07-17 11:34:26 -07:00
Spottedleaf 4efd24b336 Remove unused chunk system hooks in MCUtils 2024-07-17 11:08:28 -07:00
Spottedleaf 00b949f1bb Remove Moonrise utils to MCUtils, remove duplicated/unused utils 2024-07-17 10:28:32 -07:00
Spottedleaf 967f98aa81 Optimise chunk tick checking during chunk tick
We don't need to check for this with the chunk system, as
ticking chunks are actually guaranteed to ticking. Additionally,
ticking chunks may only become non-ticking during the chunk holder
manager tick - which will not happen during chunk ticking.
2024-07-17 07:43:49 -07:00
Spottedleaf 05ed6a6ff5 Fix priority scheduling logic
This resolves sync loads not being properly prioritised.
2024-07-17 07:39:30 -07:00
Riley Park ceeb8c14ee Disable timings by default (#11095) 2024-07-16 17:33:40 -07:00
Jake Potrebic 506f1651e5 Don't store removed components in multiple places (#11091) 2024-07-16 16:39:57 -07:00
Jake Potrebic a6ceda12c5 distinguish between null and empty map in API (#10829) 2024-07-16 11:36:07 -07:00
Tamion ef96a69e84 Fire EntityChangeBlockEvent for weaving potion effect (#11087) 2024-07-16 10:15:18 +02:00
Jakub Zacek 2cd8c461af Add OMINOUS_ITEM_SPAWNER SpawnReason (#10897) 2024-07-15 17:35:51 -04:00
Spottedleaf b57b24d549 Do not try to stop main thread during watchdog shutdown
In Java 21, Thread#stop is no longer implemented and wiill throw
an exception when called. As a result, we simply cannot halt
the main thread during shutdown anymore.
2024-07-15 12:46:23 -07:00
Spottedleaf 9fd77108e3 Apply automatic regionfile header recalculation patch 2024-07-15 12:20:47 -07:00
Spottedleaf 77fcb29607 Apply incremental player/level saving patch 2024-07-15 11:57:56 -07:00
Spottedleaf 3b45454190 Port random ticking optimisation from Moonrise 2024-07-15 11:13:08 -07:00
Spottedleaf 8b23018575 Avoid collision shapes outside world border in findFreePosition
This is to correctly adhere to Vanilla behavior.
2024-07-15 09:56:17 -07:00
Lulu13022002 aa929d6666 Call PlayerLaunchProjectileEvent for wind charge (#10911) 2024-07-15 17:07:07 +02:00
Jake Potrebic 05e5865da3 Add ItemType#getItemRarity (#11049) 2024-07-15 16:38:20 +02:00
powercas_gamer b4f04ff4b3 Add Plugin#getDataPath (#11080) 2024-07-15 14:07:17 +02:00
Tamion 8b35adca88 Fix HelpCommand searching (#11066)
Prevent a IOB exception when querying topic
suggestions on query string `/`.

Additionally hide help topics indices if no topics
are visible to the player requesting them.
2024-07-15 12:42:10 +02:00
Malfrador 9fd5b3cfbd Add AttributeModifier constructor without EquipmentSlotGroup (#11079) 2024-07-15 12:31:41 +02:00
Lulu13022002 99ae7bbc97 Don't require author and title to be set on signed book meta (#11068) 2024-07-14 15:33:52 +02:00
Nassim Jahnke 34a2917dcc Add default canUse and permission methods to BasicCommand (#11047) 2024-07-14 14:04:38 +02:00
Nassim Jahnke 1595e4afc0 Make watchdog thread extend TickThread again 2024-07-14 13:59:18 +02:00
Spottedleaf 2288e13816 Update last chunk position in findSupportingBlock
Fixes fetching chunks needlessly multiple times.

Thanks Lulu13022002 for pointing this out
2024-07-13 11:44:52 -07:00
Bjarne Koll 5a503d7db4 Bulk bugfixes for itemstack damage API (#11063)
A general set of bugfixes for itemstack damage related logic.

1. Prevent NPE when calling deprecated ItemStack#getMaxItemUseDuration()
2. Do not apply enchantments when damaging items via API
3. Do not error when passing a null equipment slot to hurtAndBreak
4. Correctly call PlayerItemBreakEvent
2024-07-12 20:47:08 +02:00
Nassim Jahnke ffe31a1cd0 Readd async saveddata io 2024-07-12 17:58:54 +02:00
Bjarne Koll 70ff1ec079 Only skip damage tick if damage is unmodified zero (#11058)
Only skip the damage tick logic on player entities if the original
damage was zero and was not modified by plugins down the line.

This way all the following three scenarios trigger the damage tick

  a) vanilla damage was 0, plugin set it to non zero
  b) vanilla damage was non zero, plugin did not modify it
  c) vanilla damage was non zero, plugin set it to zero.

Regarding case c, the argument here is that EntityDamageEvent#setDamage
should not modify the damage tick logic.
2024-07-12 09:47:50 +02:00
Nassim Jahnke 2773dc4847 Add light block to indestructible block list 2024-07-12 09:24:50 +02:00
Shane FreederandNassim Jahnke c6e9579688 Fix explosions calculation getting stuck (#11061)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2024-07-12 09:16:03 +02:00
Spottedleaf 0e02aa5b8e Port watchdog detail patch 2024-07-11 12:28:27 -07:00
Spottedleaf 1d0fcb5aaf Port lag compensation patch 2024-07-11 12:22:59 -07:00
Spottedleaf 821081d646 Drop unapplied patches
1012-Use-distance-map-to-optimise-entity-tracker.patch:
1025-Collision-optimisations.patch:
1034-Actually-optimise-explosions.patch:
1039-Send-full-pos-packets-for-hard-colliding-entities.patch:
Implemented in Moonrise patch

1037-Distance-manager-tick-timings.patch:
Not needed

0668-Implement-regenerateChunk.patch:
API does not appear to be used, and it is a real pain to
implement this properly. The old patch did not handle
populators correctly, for example.
2024-07-11 12:13:41 -07:00
Spottedleaf 90ae1dc573 Port collision optimisation patch from Moonrise
Drop random ticking optimisation for now
2024-07-11 12:09:15 -07:00
Spottedleaf 7bd22b1835 Optimise entity tracker
Patch is ported from Folia
2024-07-11 09:23:56 -07:00
Spottedleaf f250ec0a2e Increment ChunkHolderManager current tick
This is an oversight from copying from Folia. The current tick
should be incremented so that incremental autosave can properly
occur.
2024-07-11 08:57:31 -07:00
Spottedleaf a594d182e4 Fix entities not being visible to clients when teleporting
When teleporting, the spawn position packet will contain the
old position. Then the following tracking update will send a
teleport packet, but the client will lerp the position change
over 3 ticks. However, the client does not tick entities in
unloaded chunks - resulting in the lerp never occuring.

We fix this by sending the current position in the spawn packet.
2024-07-11 08:34:10 -07:00
Spottedleaf 8b558d9e0b Apply entity tracker desync patch 2024-07-11 08:15:36 -07:00
Spottedleaf f7124df56b Fix recursive chunk loading in chunk unload event
Since the chunk may not even be at a loaded ticket level, the
getChunk call may invoke a sync load. To prevent this, we can
retrieve the full loaded chunk first which is guaranteed to be
non-null when unloading.
2024-07-11 07:16:42 -07:00
Nassim Jahnke 20889d04d8 Fix method reflection remapping with null parameter types passed
Fixes #11052
2024-07-10 18:22:02 +02:00
Bjarne Koll b0ef3ca25a Only call EntityDamageEvents before actuallyHurt (#11045)
The recent upstream update moved around the event logic for
EntiyDamageEvent and its derivatives.
However, the event was called on every call to #hurt as it was moved out
of actuallyHurt.

This patch moves the invocation directly before the #actuallyHurt calls,
respective invulnerable timings.
2024-07-09 17:13:51 +02:00
Bjarne Koll 70b0e84476 Properly apply damage tick after absorption (#11043)
The logic in place to prevent players from processing a damage
tick/knockback/etc when hit with 0 damage incorrectly used the damage
events final damage value, which is reduced by absorption.

Instead, use the event's "raw damage", e.g. the amount passed to hurt,
in order to determine if the damage tick should be skipped.
This still allows plugins to change the damage to a non-zero value and
properly damage ticks the player in such a case, but correctly processes
the damage tick in cases where the original damage is non zero but the
actual damage is.
2024-07-08 21:20:18 +02:00
Nassim Jahnke 62ed302bf4 Fix entity distance check when applying knockback
Fixes #11036
2024-07-07 19:27:45 +02:00
Jake Potrebic 2fa5e0e0df Fix horse inventories (#11028) 2024-07-06 14:25:23 -07:00
Bjarne Koll 4d20922b79 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11024)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
e86f4dc4 PR-1041: Improve getPlayer(String) docs to clarify it matches the name
9738f005 Fix spawner API documentation
69ebd9fd PR-1034: Add TrialSpawnerSpawnEvent
23cffd9c PR-973: Improve spawner API and add API for Trial Spawners
8bf19163 PR-1038: Clarify HumanEntity#openInventory(InventoryView) JavaDoc
1ff76351 SPIGOT-7732, SPIGOT-7786: Add freezing damage modifier
02161cb4 PR-1034: Add CreatureSpawnEvent.SpawnReason#TRIAL_SPAWNER
f9cb6f34 SPIGOT-7777: All entity potion effects are removed on death
25d548eb PR-1031: Expose Creeper igniter
ccbf0915 SPIGOT-7770: Reserve spaces in shaped recipes for blank ingredients
17f7097c Clarify ambiguity around what is API
71714f0c Remove note from InventoryView JavaDoc
aaf49731 PR-1030: Deprecate more unused methods in UnsafeValues
3a9dc689 SPIGOT-7771: Material.getDefaultAttributes always returns an empty map

CraftBukkit Changes:
c3ceeb6f7 SPIGOT-7814: Call PlayerShearEntityEvent for Bogged
97b1e4f58 Fix wolf armor not dropping from use of shears
fd2ef563a SPIGOT-7812: Revert "SPIGOT-7809: Restore shield/banner conversion for base colours"
f672c351b SPIGOT-7811: Enchantments are applied on sweeping attack even if damage event is cancelled
cfe29350b SPIGOT-7808: Fix implementation of Enchantment#getName() for bad name return
19335f69e SPIGOT-7809: Restore shield/banner conversion for base colours
ae4f5a0be SPIGOT-7805: Fix jukebox deserialization
62e3b73a4 SPIGOT-7804: Fix written book serialization
aac911d26 SPIGOT-7800, SPIGOT-7801: Keep vanilla behaviour for items dropped on player death
13ece474f PR-1429: Implement TrialSpawnerSpawnEvent
bf13e9113 PR-1354: Improve spawner API and add API for Trial Spawners
515fe49e1 Increase outdated build delay
9cd5a19a0 SPIGOT-7794: Cancelling InventoryItemMoveEvent destroys items
ce40c7b14 SPIGOT-7796: Kickplayer newlines not working
5167256ff SPIGOT-7795: Fix damage/stats ignore the invulnerable damage time
f993563ee Improve cross-world teleportation handling
ab29122cf PR-1433: HumanEntity#openInventory(InventoryView) should only support views belonging to the player
764a541c5 SPIGOT-7732: Issue with the "hurt()" method of EntityLiving and invulnerable time
820084b5f SPIGOT-7791: Skull BlockState with null profile causes NullPointerException
5e46f1c82 SPIGOT-7785: Teleporting a player at the right moment can mess up vanilla teleportation
cbd95a6b3 SPIGOT-7772: Include hidden / non-sampled players in player count
3153debc5 SPIGOT-7790: Server crashes after bee nest is forced to update
e77bb26bb SPIGOT-7788: The healing power of friendship advancement is never granted
ee3d7258a SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem
2889b3a11 PR-1429: Add CreatureSpawnEvent.SpawnReason#TRIAL_SPAWNER
cdd05bc7f SPIGOT-7777: Speed attribute stays after death; missing EntityPotionEffectEvent call
d0e6af2d4 PR-1428: Expose Creeper igniter
d01c70e93 PR-1425: Fix bytecode transformation taking care of class-to-interface compatibility.
b2b08f68c SPIGOT-7770: Fix certain shaped recipes not registering
3f8e4161f PR-1426: Deprecate more unused methods in UnsafeValues
2c9dd879e SPIGOT-7771: Material.getDefaultAttributes always returns an empty map

Spigot Changes:
491f3675 Rebuild patches
0a642bd7 Rebuild patches
8897571b Rebuild patches
cb8cf80c Fix newlines in custom restart message
1aabe506 Rebuild patches
2024-07-06 21:19:14 +02:00
Jason Penilla 8d91b859cb Prioritize vanilla commands in function parsing (#11011)
* Prioritize vanilla commands in function parsing

* Handle command blocks as well
2024-07-04 11:49:00 -07:00
Nassim Jahnke be8ac7acc3 Fix respawn error due to null location
Closes #11017
2024-07-04 16:20:03 +02:00
Nassim Jahnke b89e6a0195 Readd more patches 2024-07-04 12:46:15 +02:00
Spottedleaf 8c8b227547 Execute chunk tasks mid-tick
If the server tick length is high, then the amount of time
available to process chunk tasks inbetween ticks is low. As a
result, chunk loading and generation may appear to slow down.

To ensure that chunk tasks are always processed, we add logic to
execute chunk tasks during tile entity tick, entity tick, chunk
random ticking, and scheduled block/fluid ticking. The mid-tick task
execution is timed so that it is not prioritised over the server
tick.
2024-07-03 19:22:43 -07:00
powercas_gamer 7eec21e80d [ci skip] add adventure-key javadoc (#11014) 2024-07-02 21:52:04 +01:00
granny b45d9b6c97 Fix summon_entity effect attempting to add incorrect entity (#11004) 2024-07-01 10:16:07 +02:00
Nassim Jahnke aa8d38d3db Add forRemoval to material data deprecations (#10996)
2018 is calling
2024-06-29 10:58:37 +02:00
Nassim Jahnke 1f5db50424 Change item/xp merge and entity tracking range defaults (#10986) 2024-06-27 22:08:34 +02:00
Spottedleaf dd49fba8c5 Fix NPE when retrieving an entity with a null UUID
While the null UUID is almost certainly an error, the old
implementation did not NPE as it used a plain HashMap for lookup
by UUID, whereas we use a ConcurrentHashMap which will NPE on
null keys.
2024-06-23 18:59:56 -07:00
Jake Potrebic dd31654684 bump reflection-rewriter to 0.0.3 (#10969) 2024-06-23 16:39:45 -07:00
Lulu13022002 b99d071a36 Swap some nullable annotations (#10960) 2024-06-24 00:42:44 +02:00
Jake Potrebic 1d3fc0ee68 Bump reflection-rewriter to 0.0.2 (#10927) 2024-06-24 00:29:50 +02:00
Jake Potrebic 897ece48d5 Call EntityPortalEnterEvent on endgateways and make cancellable (#10892) 2024-06-23 15:01:12 -07:00
Lulu13022002 5ae4758c8b Fix speed for launched trident using api (#10936) 2024-06-23 14:37:20 -07:00
Lulu13022002 97afc9a00c Fix StackOverflowError for new dispenser interaction (#10949) 2024-06-23 22:24:17 +02:00
SoSeDiK b2e5587a2e Expose LivingEntity#canUseSlot (#10930) 2024-06-23 22:11:39 +02:00
Lulu13022002 95aa440473 Add missing effect cause and deprecate PATROL_CAPTAIN cause (#10958) 2024-06-23 22:08:13 +02:00
scarfaceredandNassim Jahnke 19eefe9321 Fix SoundEffects only to players diff (#10966)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2024-06-23 22:03:32 +02:00
Shane Freeder 812701d901 Do not crash when an exp orb attempts to mend an unrepairable item 2024-06-23 14:04:58 +01:00
Lulu13022002 76c2f16f57 Fix wrong diff applying delta twice (#10959) 2024-06-22 20:11:34 +02:00
Pedro 77c763b5ef Fix PlayerShearBlockEvent drops ignored for Pumpkin (#10956) 2024-06-22 14:50:47 +01:00
Spottedleaf 19105a9019 Fix unload queue storing chunks in wrong sections
The unload queue stored the chunks in the same section as
the chunk coordinate, when it needed to apply the unload shift.

Additionally, change the default region shift to the ticket
propagator shift as there is no benefit to using a low region
shift since no regionizing is occuring. This makes the unload
queue shift 6, which should reduce the number of sections to deal
with while processing unloads.
2024-06-21 11:57:03 -07:00
Lulu13022002 9cd0201535 Preserve velocity for fireball (#10934) 2024-06-21 11:06:31 -07:00
Lulu13022002 0409a68f50 deprecate and update some entity tags (#10932) 2024-06-21 18:51:00 +02:00
Lulu13022002 081146c56e Validate using_converts_to for food component (#10931) 2024-06-21 18:48:48 +02:00
Lulu13022002 d64be7e10a Fix NPE of AbstractArrow#getWeapon (#10933) 2024-06-21 18:48:29 +02:00
Lulu13022002 a0fad76fb6 Fix base damage for trident (#10948) 2024-06-21 18:48:18 +02:00
Shane Freeder 0a1b133c28 Revert "Fixes exception log messages getting dropped during bootstrap (#10935)" (Closes #10945)
This reverts commit 2118196dd5.
2024-06-21 10:06:03 +01:00
Shane Freeder 8b1d26df0b Fix diff in sprint interruption option (Closes #10939) 2024-06-21 01:21:23 +01:00
Jake Potrebic 2118196dd5 Fixes exception log messages getting dropped during bootstrap (#10935) 2024-06-20 11:26:07 -07:00
Lulu13022002 bab07e0ff9 Validate speed for tool component rule (#10923) 2024-06-20 09:32:32 -07:00
Lulu13022002 666bc4dbb2 Experimental annotation changes (#10914)
* Experimental annotation changes

* wind charge damage type is not experimental anymore
2024-06-20 09:03:09 -07:00
Lulu13022002 cf60574a2f Fix jukebox playable component not being applied on item meta (#10922) 2024-06-20 08:57:56 -07:00
Spottedleaf 2df432f6af Re-add chunk system debug commands
Re-adds the 'chunkinfo', 'holderinfo' and 'debug chunks' commands.

Additionally, this re-adds chunk debug dumping during watchdog
long timeouts.
2024-06-19 12:11:21 -07:00
Spottedleaf e0d9d6028c Add debug for chunk system unload crash
Somehow, a chunkholder is present in the unload queue after
it has been unloaded. It is likely that this is a result of
adding the chunk holder to the unload queue while it is
unloading. However, that should not be possible.

To find out where it is being added to the unload queue, track
the last stacktrace which adds to the unload queue and check
on chunk holder remove if the holder is present in the unload queue
and log the stacktrace.
2024-06-19 10:55:04 -07:00
Spottedleaf f4ddd4ac24 Fix ChunkHolder#getFullChunkNow returning non-null when it should not
In the new chunk system, the chunk is only at FULL when either
the FULL callbacks have been invoked or during the FULL callbacks.
2024-06-19 10:42:48 -07:00
Spottedleaf 38428c0d6c Cleanup MCUtils patch for chunk system
Remove utilities that are unused, as well as replacing
the full chunk map with a concurrentutil implementation.

Additionally, fix the addition/removal of chunks to/from the
full chunk map so that getChunkIfLoaded correctly returns a
non-null chunk when calling the load or unload events.
2024-06-19 10:29:03 -07:00
Spottedleaf c0268ca86e Copy missing diff from old chunk system patch
Fixes:
- EntitiesLoadEvent/EntitiesUnloadEvent not firing
- Chunks not saving properly in a lot of cases
2024-06-19 09:27:15 -07:00
Spottedleaf 250e78c42a Re-add fixlight command 2024-06-19 08:41:24 -07:00
Jason Penilla 4ea696ffe4 Add ticket for chunk load in isChunkGenerated 2024-06-18 21:15:20 -07:00
Jason Penilla 3b1c85b3a2 Execute chunk tasks while waiting for chunk load in isChunkGenerated
this shouldn't be needed as we are requesting EMPTY status, however there is a deeper issue that we will just work around for now

fixes #10916
2024-06-18 21:04:35 -07:00
Jason Penilla d23825aa56 Add missing null check to getFullChunkIfLoaded
fixes #10915
2024-06-18 18:27:50 -07:00
Jason Penilla 126f6d7dc1 Remove getUnloadingChunkHolder check
It always returns null now. So it could NPE and is not useful.
2024-06-18 12:51:40 -07:00
Jason Penilla 7bbe6820c2 Fix CraftWorld#isChunkGenerated
The upstream implementation is returning true for non-full chunks.

This fix is not ideal since the new chunk system doesn't have a region file/chunk status patch. May want to be revisited before a non-experimental release.
2024-06-18 12:44:07 -07:00
Nassim Jahnke 090775eff4 Use ItemStack.empty() when air is passed into constructor 2024-06-18 15:31:30 +02:00
Bjarne Koll 4514f41ffa Correct duplicate attribute check (#10901)
Brackets got lost during the update, leading to an incorrect
precondition call.
2024-06-18 11:11:14 +02:00
Jake Potrebic b4b820851f Fix NPE for Jukebox#setRecord
Fallback to the global registry if no level exists
Fixes #10899
2024-06-17 17:44:04 -07:00
Emilia Kond b9f7098723 [ci skip] Fix javadoc mistake in EnchantmentRegistryEntry.Builder (#10898)
The javadoc for EnchantmentRegistryEntry.Builder accidentally refers to
GameEventRegistryEntry, which is a different buildable registry entry.
2024-06-17 22:54:49 +01:00
Nassim Jahnke 21c9a7c79d Rebuild patches 2024-06-17 21:21:06 +02:00
willkroboth b3e072a625 Fix hasFiredAsync parameter when AsyncPlayerSendCommandsEvent is called (#10896) 2024-06-17 21:17:51 +02:00
Jake Potrebic bf8552f0f0 Delegate ItemStack (#10852) 2024-06-17 21:12:42 +02:00
Nassim Jahnke 13992b17c7 Make chunk system loggers calm down a bit 2024-06-17 13:43:21 +02:00
Nassim Jahnke 152f4feff3 Add back improved watchdog support patch 2024-06-17 13:36:43 +02:00
Jake Potrebic a7f6633362 make EntityPortalReadyEvent#setTargetWorld work again 2024-06-16 15:48:38 -07:00
Jake Potrebic fb762cf368 remove remaining reference to 'pgive' 2024-06-16 15:38:59 -07:00
Jake PotrebicandBjarne Koll 8dfb85c173 Enchantment and GameEvent Registry builders (#10889)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-06-17 00:00:12 +02:00
Jason Penilla de8220c3bc Update ChunkMap#distanceManager mapping patch 2024-06-16 14:50:57 -07:00
Nassim Jahnke 61b85e4cbf Fix legacy cb version in remapper 2024-06-16 23:23:50 +02:00
Spottedleaf f8ee0a06c5 Fix implementations of ChunkHolder#getChunkIfPresent
Implementations for ChunkStatuses below FULL are supposed to always
return ProtoChunk instances. However, since we used the last completed
status, it could return LevelChunk.

To resolve this, follow Vanilla behavior of tracking chunk
completions by status and replace old ProtoChunk statuses with
ImposterProtoChunk when the chunk generates to FULL.

Additionally, implement an optimisation for retrieving full chunks
by storing a map of pos -> LevelChunk. This requires only a simple
map lookup to occur for full chunks which are loaded.
2024-06-16 14:09:44 -07:00
Jake Potrebic d9111ccec2 Registry Modification API (#10893)
* Registry Modification API

* some fixes

* even more fixes
2024-06-16 12:39:59 -07:00
Nassim Jahnke 106dbae220 Fix getAddress connection check 2024-06-16 21:31:39 +02:00
Jake Potrebic 167961e744 call EntityDamageItemEvent for thorns 2024-06-16 09:47:53 -07:00
Bjarne Koll fbc2a55cde Update Wither#canTravelThroughPortals 2024-06-16 18:04:11 +02:00
Bjarne Koll e1c0033552 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
2b4b6d14 PR-1023: Convert InventoryView to interface

CraftBukkit Changes:
68603b1c1 Use expanded interaction ranges for traced interact events
eae9f760c PR-1414: Convert InventoryView to interface
ee9eafe67 Fix Implementation for DamageSource#isIndirect for internal custom causing entity
2024-06-16 17:23:42 +02:00
Jake Potrebic ec4c712efa update 'improve mass craft perf' patch 2024-06-16 08:08:06 -07:00
Jakub Zacek d8c298007f Add Adventure API to ServerLinks (#10891) 2024-06-16 13:54:38 +02:00
Nassim Jahnke c84a3b541c Remove fully dropped patches 2024-06-16 13:14:53 +02:00
Nassim Jahnke dc684c60d1 Remove bad server.scheduleOnMain disconnect calls from old patches
The new behavior of disconnect to block the current thread until the disconnect succeeded is better than throwing it off to happen at some point
2024-06-16 12:56:00 +02:00
Nassim Jahnke 752f957e12 Add back more patches 2024-06-16 12:47:57 +02:00
Bjarne Koll 60f3bd8d0c De-deprecate BlockData#getDestroySpeed 2024-06-16 12:44:22 +02:00
Yannick Lamprecht 1f8e7a7b09 address compile and test issue (#10890) 2024-06-16 11:47:44 +02:00
Spottedleaf f873bcee24 Fix NPE in V3808
The armor items may not exist, so we need to null check it.
2024-06-15 22:59:15 -07:00
Owen1212055 7240d9d81c Restore functionality to sand dupe setting 2024-06-15 22:04:02 -04:00
Owen1212055 5a5412ca70 Owen fixing stuff!!! 2024-06-15 21:43:06 -04:00
Jake Potrebic 5e7cd0784b add some generated typed/tag keys 2024-06-15 15:52:14 -07:00
Spottedleaf b090c65fe0 Remove unnecessary changes from chunk status fix 2024-06-15 15:31:04 -07:00
Bjarne Koll e339ec27b4 Deprecate BlockData#getDestroySpeed for removal
The method sadly is not usable in 1.21 without a player as all of an
enchantments attribtue modifiers rely on a base value supplied by a
player. The method could only offer a rough estimate based on some
default values, however a better method for this should be added down
the line rather than trying to force such logic into the existing one.
2024-06-16 00:19:10 +02:00
Bjarne Koll 3555a7776e Properly forward DispenseEvent #getItem to saddle
Correctly use the DispenseEvent's #getItem ItemStack when placing the
saddle on entities during a dispense behaviour instead of the original
stack.
2024-06-16 00:01:55 +02:00
Bjarne Koll 7df472527f Configurable damage tick when blocking with shield (#10877)
A long standing bug in spigot and its derivatives was the fact that
players taking damage while blocking with a shield would not receive
invulnerability, while they do in vanilla.

This enabled the pvp technique of disabling a shield and immediately
attacking again to knock a player into the air.
While upstream fixed this and properly aligned itself with vanilla
damage logic (in this specific case) changing such long standing
behaviour has some downsides.

To allow players used to this specific bug to still use it, this patch
introduces a configuration option to re-introduce said bug.
As there is no easy way to *only* re-add this bug, the option is found
in the unsupported section as it may introduce other damage related
disparity from vanilla.
2024-06-15 23:17:51 +02:00
Aya d41636f445 Add back RecipeIterator fixes patch (#10887) 2024-06-15 21:53:46 +02:00
Jake Potrebic c1aefeecc6 correctly change enchantment registry to a 'delayed' version 2024-06-15 12:04:06 -07:00
Nassim Jahnke 56b5b7d452 Fix max chunk status checks 2024-06-15 19:57:59 +02:00
Nassim Jahnke 0008fa17e9 Add back more optimization patches 2024-06-15 19:24:11 +02:00
Bjarne Koll 04dad71064 Improve enchantWithLevels logic
Previously would stream and optionally filter out all entries in the
enchantment registry.
Moves it to using the empty optional if treasure is allowed, leaving the
logic to EnchantmentHelper.
2024-06-15 19:08:11 +02:00
Nassim Jahnke a835ad1076 Merge remote-tracking branch 'origin/dev/1.21' into dev/1.21 2024-06-15 18:52:19 +02:00
Ghast b420038799 Fix ItemMeta#removeEnchantments (#10886) 2024-06-15 18:52:01 +02:00
Jake Potrebic fb511c698e Fix Player#sendBlockState (#10855) 2024-06-15 18:52:00 +02:00
Jake Potrebic 5bd7f4e8ae Update AbstractArrow item method implementations for 1.20.6 (#10885) 2024-06-15 18:48:27 +02:00
Bjarne Koll 0b6701da5a Revert DamageSource#getCausingEntity to vanilla 2024-06-15 18:39:55 +02:00
Nassim Jahnke 4bc15f13aa Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
e2160a18 Make MapCursor#type not depends on deprecated values

CraftBukkit Changes:
6ce172642 SPIGOT-7761: Ender pearl does not damage or spawn endermites
f5a63f734 SPIGOT-7759: Chunk not there when requested in ChunkUnloadEvent
28287259c Remove unused import
eb9a7dde0 SPIGOT-7757: Cannot set item in Stonecutter Inventory
f8be9d752 Move deserialized removed unhandled tags to dedicated removedTags
a7e576186 Fix potential mutability issue with CraftMetaItem copy constructor
995885452 SPIGOT-7741: Vanilla ItemComponent in commands can't remove components
9ef69aa0b PR-1284: Move ItemType <-> ItemMeta linking to a centralized place
3e82eafbe PR-1420: Fix DirectEntity and CausingEntity Damager for Creepers ignited by Player
c23daa71f SPIGOT-7751: Fix crash caused by arrows from trial spawners
Make MapCursor#type not depends on deprecated values
SPIGOT-7761: Ender pearl does not damage or spawn endermites
2024-06-15 18:31:58 +02:00
Jake Potrebic 5d834b1b71 rebuild patches 2024-06-15 06:22:06 -07:00
Nassim Jahnke ee9b820fbe Update more optimization patches 2024-06-15 14:12:22 +02:00
Jason Penilla 097284d06b Bump tiny-remapper to 0.10.3
Fixes warnings when using some java 21 features
2024-06-14 21:44:18 -07:00
Jason Penilla 512fd08eca Update Gradle Wrapper to v8.8 2024-06-14 17:53:11 -07:00
Spottedleaf 730882fca9 Chunk System and Starlight WIP
Chunk system patch was refactored to take advantage of
newer ConcurrentUtil's concurrent long hash table (which
fixes hash collisions caused by chaining fastutil's long hash
and CHM's hash) plus some other minor improvements.

The chunk system was also merged with Starlight, which mostly
provides a small improvement to ThreadedLevelLightEngine#checkBlock
as the scheduling was rewritten.
2024-06-14 17:39:15 -07:00
Jake Potrebic ffe310a8e1 remove api that was scheduled for removal 2024-06-14 14:07:44 -07:00
Jake Potrebic 188cff20c7 remove old vanilla goals 2024-06-14 13:38:42 -07:00
Jake Potrebic 5fca3ae47b update generated API 2024-06-14 13:11:23 -07:00
Spottedleaf f5693896c5 Update ConcurrentUtil
Mostly for the primitive long to reference hashtable impl
2024-06-14 10:47:33 -07:00
Spottedleaf df633e5ffa DataConverter 1.21 2024-06-14 10:34:45 -07:00
Spottedleaf 38b3182a90 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
befcf86d SPIGOT-7740: Fix using new map cursor types
09229095 Add EntityDamageEvent.DamageCause#CAMPFIRE

CraftBukkit Changes:
a1d2cd152 SPIGOT-7747: Mob head is not dropped when mob was blown up by a charged creeper
8078294bc SPIGOT-7746: Server Crashing when Players Getting into End Portals
8d842e250 SPIGOT-7744: Fix exception for shooting projectiles with flame enchantment
64e0ad129 SPIGOT-7744: Fix crash when shooting arrows in creative mode
819f7a10a Fix player items not dropping on death
0a0229bb5 Implement DamageCause#CAMPFIRE and minor improvement in exception for Unhandled block damage
2024-06-14 10:15:52 -07:00
Nassim Jahnke 66f7b672ed Fix body equipmentslot and effect enum 2024-06-14 18:53:32 +02:00
Nassim Jahnke 038f8d915e Fixup and deprecate player profiles in ping event
The player sample uses game profile internally, but discards everything but the name and uuid and does not follow player profile restrictions, so it doesn't make sense to use that in the event.
2024-06-14 18:17:26 +02:00
Nassim Jahnke 5442bffab5 Make it compile 2024-06-14 18:02:15 +02:00
Bjarne Koll 184a943ad4 Adopt previous commit changes in API 2024-06-14 16:04:56 +02:00
Bjarne Koll 547f09dfa0 Some work on the ItemMend events 2024-06-14 16:01:00 +02:00
Bjarne Koll 69d1d0a4f4 Pretend to fix compile errors 2024-06-14 15:16:29 +02:00
Nassim Jahnke a308c7c8d7 Fix more compile issues 2024-06-14 14:28:06 +02:00
Nassim Jahnke 0d3ce2d704 Fix more compile issues 2024-06-14 14:11:52 +02:00
Nassim Jahnke 3c04f9f668 Fix a few compile errors 2024-06-14 13:07:50 +02:00
Bjarne Koll 6a34750160 Move unapplied patches to the back 2024-06-14 12:05:15 +02:00
Bjarne Koll 6d4e235784 988 2024-06-14 11:59:44 +02:00
Bjarne Koll 4140de28eb 960 2024-06-14 11:07:50 +02:00
Bjarne Koll a399f23903 956 2024-06-14 10:56:28 +02:00
Bjarne Koll 14c03366ed 922 2024-06-14 10:17:11 +02:00
Jason Penilla 33b36cde31 update some patches 2024-06-13 20:41:44 -07:00
Jake Potrebic 52b49fbcc8 788/1053 2024-06-13 18:30:23 -07:00
Jake Potrebic 8731266275 650/1053 2024-06-13 17:08:12 -07:00
Jake Potrebic ba163e10bb 585/1053 2024-06-13 16:32:45 -07:00
Bjarne Koll ed2ea4538e 538 2024-06-14 00:44:26 +02:00
Jake Potrebic 083bd9e75c 531/1053 2024-06-13 14:42:02 -07:00
Jake Potrebic 27e29ccaf2 487/1053 2024-06-13 13:57:13 -07:00
Jake Potrebic 0bc9aeef26 385 2024-06-13 13:14:13 -07:00
Jake Potrebic ec05cb8b38 279 2024-06-13 12:04:27 -07:00
Jake Potrebic 0b7552272a 194 2024-06-13 11:09:28 -07:00
Jake Potrebic 2055809b1e 117 2024-06-13 10:30:39 -07:00
Jake Potrebic 8a37f93925 62 2024-06-13 10:12:48 -07:00
Jake Potrebic 7fbb8278e7 Finish API patches 2024-06-13 08:45:43 -07:00
Bjarne Koll 79e2cb620e Update upstream (Bukkit/CraftBukkit/Spigot) (#10875)
Upstream has released updates that appear 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:
376e37db SPIGOT-7677: Update which entities are marked as spawnable
06c4add3 SPIGOT-7737: Add separate TreeType.MEGA_PINE
19b7caaa SPIGOT-7731: Spawn eggs cannot have damage
e585297e PR-1022: Add force option to Player#spawnParticle
d26e0094 PR-1018: Add methods to get players seeing specific chunks
8df1ed18 PR-978: Add Material#isCompostable and Material#getCompostChance
4b9b59c7 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale
8d1e700a PR-1020: Cast instead of using #typed when getting BlockType and ItemType to better work with testing / mocks
fa28607a PR-1016: Fix incorrect assumption of Fireball having constant speed
4c6c8586 PR-1015: Add a tool component to ItemMeta
6f6b2123 PR-1014: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects
f511cfe1 PR-1013, SPIGOT-4288, SPIGOT-6202: Add material rerouting in preparation for the switch to ItemType and BlockType
def44cbf SPIGOT-7669: Fix typo in ProjectileHitEvent#getHitBlockFace documentation
53fa4f72 PR-1011: Throw an exception if a RecipeChoice is ever supplied air

CraftBukkit Changes:
ee95e171a SPIGOT-7737: Add separate TreeType.MEGA_PINE
0dae4c62c Fix spawn egg equality check and copy constructor
ab59e847c Fix spawn eggs with no entity creating invalid stacks and disconnect creative clients
3b6093b28 SPIGOT-7736: Creative spawn egg use loses components
c6b4d5a87 SPIGOT-7731: Spawn eggs cannot have damage
340ccd57f SPIGOT-7735: Fix serialization of player heads with note block sound
fd2f41834 SPIGOT-7734: Can't register a custom advancement using unsafe()
02456e2a5 PR-1413: Add force option to Player#spawnParticle
6a61f38b2 SPIGOT-7680: Per-world weather command
58c41cebb PR-1409: Add methods to get players seeing specific chunks
16c976797 PR-1412: Fix shipwreck loot tables not being set for BlockTransformers
7189ba636 PR-1360: Add Material#isCompostable and Material#getCompostChance
900384556 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale
bdb40c5f1 Increase outdated build delay
d6607c7dd SPIGOT-7675: Fix FoodComponent config deserialization
b148ed332 PR-1406: Fix incorrect assumption of Fireball having constant speed
3ec31ca75 PR-1405: Add a tool component to ItemMeta
5d7d675b9 PR-1404: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects
960827981 PR-1403, SPIGOT-4288, SPIGOT-6202: Add material rerouting in preparation for the switch to ItemType and BlockType
94e44ec93 PR-1401: Add a config option to accept old keys in registry get calls
a43701920 PR-1402: Fix ChunkSnapshot#isSectionEmpty() is always false
87d0a3368 SPIGOT-7668: Move NONE Registry updater to FieldRename to avoid some class loader issues
2ea1e7ac2 PR-1399: Fix regression preventing positive .setDamage value from causing knockback for 0 damage events
ba2d49d21 Increase outdated build delay

Spigot Changes:
fcd94e21 Rebuild patches
342f4939 SPIGOT-7661: Add experimental unload-frozen-chunks option
2024-06-13 16:45:27 +02:00
Bjarne Koll 906df69f05 Prevent internal NPE on ItemStack#damage (#10836)
ItemStack#damage internally uses ItemStack#hurtAndBreak, which
previously would call a Consumer in case the item broke.
Since 1.20.5 the break game event logic however resides in said method
and was using the equipment slot passed, which is null in the case of
the API ItemStack#damage method.

This commit prevents the NPE by first null checking the slot.
Addittionally, hurtAndBreak also now checks if the player has infinite
materials, e.g. is in creative mode, to prevent damaging the item.

As such as filter is undesirable for API calls, this commit also skips
this logic in case of an API invocation.
2024-06-10 08:24:52 +02:00
Lulu13022002 bd5867a96f Handle alpha channel from potion_contents component (#10808) 2024-06-04 16:55:29 -04:00
Jake Potrebic 88d76d9fe5 Make Bogged implement Shearable (#10844) 2024-06-04 16:26:40 -04:00
Jake Potrebic 79c1ce1844 Add since to deprecated for removals (#10848) 2024-06-04 15:40:18 -04:00
Spottedleaf 4f13be937e Do not perform chunk existance check for I/O scheduling
In order to check if a chunk exists, the RegionFile lock
(if the RegionFile is opened) will be acquired. However,
the RegionFile may be performing I/O operations, in which
case will stall the acquire operation.

To ensure that threads scheduling loads do not incur a stall,
we can avoid this check entirely - the RegionFile I/O
thread(s) will eventually perform the exist check itself.
2024-06-03 13:31:41 -07:00
Bjarne Koll b8f2101c36 Only assign blockstate data if super ctor did not (#10841)
The CraftBlockStateMeta constructor CraftBlockStateMeta(Map) invokes its
parent constructor, which itself invokes deserializeInternal, which is
implemented on CraftBlockStateMeta to read the components and block
entity tag from the passed map.

Field initialization happens after the call to the super constructor,
meaning the current code overwrites the parsed internal data with the
EMPTY defaults.

This is prevented by moving the initialization into its own code block
that can null check the fields prior to defaulting their value to EMPTY.
2024-06-03 10:39:20 -07:00
Jake Potrebic 54fbd0cf0c clarify what getEntityId actually returns (#10839) 2024-06-03 10:20:43 -07:00
Jake Potrebic ac647513b2 Use RegistryOps in the correct places (#10843) 2024-06-02 15:19:17 -07:00
Bjarne Koll 5d8e53d78d Fix CommandSourceStack#bypassSelectorPermissions (#10837)
The previous implementation would throw a command exception if the
CommandSourceStack had its bypassSelectorPermissions flag set to true,
which is the incorrect behaviour.

Instead, it should only throw an exception if the flag is set to false
and all its other checks "fail" too.
2024-06-01 16:26:11 +02:00
Jake Potrebic 0513374b1f Fire TabCompleteEvent for legacy commands (#10834) 2024-05-31 17:46:42 +02:00
TotalledZebra 3181470ad7 Add entity heal API (#10267) 2024-05-30 22:31:45 +02:00
Jake Potrebic a47e11d464 fix knockback events (#10831)
* fix knockback events

* squash

* handle cancelled event for explosions
2024-05-30 13:17:16 -07:00
Jason Penilla 06e69c8991 Use CommandSourceStack in AsyncPlayerSendCommandsEvent (#10826) 2024-05-30 11:32:43 -07:00
Shane Freeder 8e6554a80a Fix sending disconnect packet in phases where it doesn't exist 2024-05-30 19:05:39 +01:00
Jake Potrebic 0fcf3e347f Deprecate InvAction#HOTBAR_MOVE_AND_READD (#10784) 2024-05-29 14:56:14 -07:00
SoSeDiK 27d2ed84f4 Extend fishing API (#10634)
Adds a missing fishing state when the fish is lured and fires an event for it.
Also adds a way to control the fish swimming time towards the bobber.
2024-05-29 23:45:01 +02:00
Jake Potrebic efd91e52a6 Add registry-related argument types (#10770)
* Add registry-related argument types

* fix tests
2024-05-29 14:11:52 -07:00
Jake Potrebic a31dc90741 Several fixes and new api for experience merging/stacking (#9242) 2024-05-29 22:58:57 +02:00
Bjarne Koll ed85aac53c Flatten namespaced vanilla command alias redirects (#10821)
The brigadier command dispatcher is not capable of executing commands
that redirect more than one.
The exemplary alias 'minecraft:tp' may hence not redirect to 'tp' it
instead has to redirect to 'teleport' as 'tp' itself is merely a
redirect.
2024-05-29 21:47:07 +02:00
Jake Potrebic 7e2b682e54 Fix skipping custom block entity tag (#10812) 2024-05-29 21:22:51 +02:00
Jake Potrebic d9e659a618 Allow firework effects with no colors (#10814) 2024-05-29 20:50:44 +02:00
Jake Potrebic 716b868b08 Use RegistryOps for loadAdvancement (#10799) 2024-05-29 20:27:29 +02:00
Jake Potrebic 672c07728f handle BODY slot for non-mobs (#10822) 2024-05-29 11:23:51 -07:00
Lulu13022002 84f6e6e0b1 Fix max temper API for llama (#10823) 2024-05-29 11:17:56 -07:00
Bjarne Koll 9d6f2cced7 [ci skip] Rebuild patches (#10803) 2024-05-28 14:19:41 +02:00
Bjarne Koll 9c917fef08 [ci skip] Clean up paperclip build-pr workflow (#10802) 2024-05-28 14:19:31 +02:00
Bjarne Koll b0c9b9c4d8 Only remove worldgen block entity on changed block (#10794) 2024-05-28 11:45:03 +02:00
Shane Freeder 23fe1166d4 Fix missing debug trace 2024-05-27 18:33:34 +01:00
Tamion 347bbe3897 Fix Cancelling BlockPlaceEvent calling onRemove (#10773) 2024-05-27 00:03:48 +02:00
Jake Potrebic b0e3ca43b8 Prevent NPE if hooked entity was cleared (#10712) 2024-05-26 23:41:30 +02:00
Lulu13022002 841ab4134d Fix more item desync when an event is cancelled (#10654) 2024-05-26 23:30:45 +02:00
Cross 1b8cdc6d82 Extend Player Interact cancellation to cover Jigsaw blocks (#10719) 2024-05-26 22:54:55 +02:00
Jake Potrebic 6649a171dc Fix BlockStateMeta equals (#10795) 2024-05-26 22:49:00 +02:00
Lulu13022002 ac4ee06c01 Fix integer overflow for lag compensating eating check (#10797) 2024-05-26 22:35:58 +02:00
Jake Potrebic 9774a52d11 fix and cleanup loot table patches (#10100)
* fix and cleanup loot table patches

* fixes
2024-05-26 12:51:15 -07:00
Lulu13022002 ca50b87947 Clear firework item properly (#10793) 2024-05-26 19:57:38 +02:00
Jake Potrebic a7ae966530 readd itemstack data sanitization (#10454)
* readd itemstack data sanitization

* use autocloseable
2024-05-26 10:56:33 -07:00
Jake Potrebic 4e10fadfdc reset meta block state on BlockStateMeta#setBlockState 2024-05-25 22:36:55 -07:00
Jake Potrebic 41bee55b53 Fix NPE for color-related metas
Fixes #10789
2024-05-25 19:55:51 -07:00
Janet Blackquill f0bd0cca8f Expose anvil cost in the API (#10682) 2024-05-26 01:47:14 +02:00
Jake Potrebic 26e90b9ffb Fix CraftMetaBlockState for data components (#10731)
This will go on forever...
2024-05-25 16:37:35 -07:00
Lulu13022002 535dca56c2 Fix a few issues with ItemMeta (#10740) 2024-05-26 00:58:56 +02:00
jake-brennan714 4fd3ac00b4 [ci skip] Update Player#getListeningPluginChannels Jdoc (#10778) 2024-05-25 23:59:01 +02:00
Lulu13022002 dff591d292 Allow to define new map cursor types (#10782) 2024-05-25 23:56:44 +02:00
TonytheMacaroni 377733d44c Use getter/setter on Mob for equipment drop chances (#10780) 2024-05-24 19:52:54 +02:00
Shane Freeder 3004717b0e Do not re-wrap vanilla goals (#10751)
There is no need to rewrap vanilla goals when they're being reregistered,
this breaks some expectations around behavior outside of general
wasting of resources.

Resolves: #10743
2024-05-24 16:22:41 +02:00
Jason Penilla 5e7b65a9a9 Allow using PluginLoader classpath API from Bukkit plugins (#10758)
Allows using the PluginLoader API without any of the other changes imposed by switching to a paper-plugin.yml.

Used by setting paper-plugin-loader in plugin.yml to the class name of your PluginLoader.

Also allows skipping the libraries field by setting paper-skip-libraries to true (by default both libraries and jars provided by the PluginLoader are added to the classpath).
2024-05-23 13:13:02 -07:00
Jake Potrebic 2a90732677 Remove incorrect logic for Fireball#setVelocity (#10764) 2024-05-23 12:48:11 -07:00
Jake Potrebic 6de7a1f052 Improve default item attributes API (#10765) 2024-05-23 11:44:07 -07:00
Jason Penilla d408381c77 Print CommandRegisteredEvent deprecation warnings again (#10756) 2024-05-23 10:44:45 -07:00
Jake Potrebic 3de408ee3e Fix equipment slot and group API (#10767) 2024-05-23 10:39:44 -07:00
Jake Potrebic a9201d4a7d [ci skip] Move logic in our patches to ItemType/BlockType (#10772) 2024-05-23 10:32:02 -07:00
Jake Potrebic b14958485d Always show command exception stack traces in logs (#10766) 2024-05-22 10:24:09 -07:00
Jake Potrebic d3ffa62b7f fix default item attributes 2024-05-22 07:16:50 -07:00
Spottedleaf 980cff9f29 Fix compile 2024-05-21 08:41:36 -07:00
Spottedleaf 66cb880754 Remove ThreadedWorldUpgrader patch
The patch does not implement Vanilla forceUpgrade behavior.
Specifically, poi/entity conversion and regionfile recreation.

The Vanilla force upgrader is also no longer broken by CB, so the
bug fixes from this patch are not relevant anymore.
2024-05-21 08:21:28 -07:00
Jason Penilla 9bf4855524 Add a better warning message than "Server performance will be affected" for CommandRegisteredEvent use (#10754) 2024-05-20 11:15:21 -07:00
Jake Potrebic 7d2e5c33ea Add an 'empty' RecipeChoice for certain ingredient slots (#10710) 2024-05-20 07:20:47 -07:00
Jake Potrebic 591521e697 Check for more correct profile validation (#10730) 2024-05-19 17:45:43 -07:00
Jake Potrebic b3b340617e fix CompassMeta not being correct (#10737) 2024-05-19 17:15:44 -07:00
Shane Freeder 0ad09de75b Make PaperSimplePluginClassLoader show class which is not found 2024-05-18 21:17:54 +01:00
Jake Potrebic 5a9afbee65 Fixes issues in the suppress dismount cancellation patch (#10735) 2024-05-17 14:37:16 -07:00
Jake Potrebic d8d59e0cde Fix NPE sending resource pack without prompt
Fixes KyoriPowered/adventure#1075
2024-05-17 14:22:45 -07:00
f17519338b Expose server build information (#10729)
* Expose server build information

* squash patches

* final tweaks

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2024-05-15 17:06:59 -07:00
Jason Penilla 3fc93581bb Show stacktrace when modifyItemStack fails 2024-05-13 22:58:50 -07:00
Jason Penilla 2faa3b2f44 Correctly copy alias requirements in command upgrader
Fixes NPE when converting namespaced commands.

Since the brigadier command api, more aliased commands
(namespaced variants) are registered in the vanilla dispatcher,
which made this issue more apparent.
2024-05-13 15:55:15 -07:00
Spottedleaf bebcc9cc93 Make exception during command conversion non-fatal
Instead of allowing chunks to fail to convert completely,
simply log the exception and the offending command. Command
conversion failure should never result in chunk data deletion,
as commands are not critical chunk data.
2024-05-13 14:40:02 -07:00
scarfacered fa8a407072 Remove Adventure snapshot repo from dev bundle (#10716)
* Remove Adventure snapshot repo

* do not remove trailing comma
2024-05-13 10:38:28 -07:00
Jake Potrebic 218d33ccb1 fix creating complex recipes that have air results
Fixes #10715
2024-05-13 06:16:52 -07:00
Jake Potrebic 0688f212f5 Better way to keep paper datapack enabled 2024-05-12 21:48:07 -07:00
Jake Potrebic 11c39637de Improve Recipe validation (#10707) 2024-05-12 13:46:46 -07:00
Bjarne Koll f041f48458 Prevent infinite recursion on cyclic brig redirect (#10705)
Prevent infinite recursion when declaring a cyclic relation between
command nodes via child nodes redirecting to an nth parent by marking a
command node as unwrapped before unwrapping its children.
2024-05-12 17:41:21 +02:00
Owen 7e48f66c05 Properly pass requirement on namespaced redirects (#10701) 2024-05-11 23:46:42 -07:00
Jason Penilla 711f82e01e Fix signed book page serialization (#10696) 2024-05-12 00:13:18 +02:00
Jake Potrebic ac554ad46d Updated Upstream (Bukkit/CraftBukkit) (#10691)
Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear 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:
fa99e752 PR-1007: Add ItemMeta#getAsComponentString()
94a91782 Fix copy-pasted BlockType.Typed documentation
9b34ac8c Largely restore deprecated PotionData API
51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5
702d15fe Fix Javadoc reference
42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them
237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent
035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more
87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent

CraftBukkit Changes:
4af0f22e8 SPIGOT-7664: Item meta should prevail over block states
c2ccc46ec SPIGOT-7666: Fix access to llama and horse special slot
124ac66d7 SPIGOT-7665: Fix ThrownPotion#getEffects() implementation only bringing custom effects
66f1f439a Restore null page behaviour of signed books even though not strictly allowed by API
6118e5398 Fix regression listening to minecraft:brand custom payloads
c1a26b366 Fix unnecessary and potential not thread-safe chat visibility check
12360a7ec Remove unused imports
147b098b4 PR-1397: Add ItemMeta#getAsComponentString()
428aefe0e Largely restore deprecated PotionData API
afe5b5ee9 PR-1275: Add internal ItemType and BlockType, delegate Material methods to them
8afeafa7d SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent
4e7d749d4 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it
441880757 Support both entity_data and bucket_entity_data on axolotl/fish buckets
0e22fdd1e Fix custom direct BlockState being not correctly set in DamageSource
f2182ed47 SPIGOT-7659: TropicalFishBucketMeta should use BUCKET_ENTITY_DATA
2a6207fe1 PR-1393: Improve field rename handling and centralize conversion between bukkit and string more
c024a5039 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent
741b84480 PR-1390: Improve internal handling of damage sources
0364df4e1 SPIGOT-7657: Error when loading angry entities
2024-05-11 23:48:37 +02:00
b98d20a8ac Brigadier Command Support (#8235)
Adds the ability for plugins to register their own brigadier commands 

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-05-11 16:30:30 -04:00
Jason Penilla 447f9a1e16 [ci skip] Fix paperclip PR label 2024-05-11 11:13:19 -07:00
Jake Potrebic 6c02dbcfa1 handle recent ItemMeta changes in serialization logic 2024-05-11 09:14:23 -07:00
Jake Potrebic a61d58d467 adjust ItemMeta to distinguish null and empty modifiers
Fixes #10686 (again)
2024-05-11 07:16:23 -07:00
Jake Potrebic cdb6ba8ef1 Fix keepalive time interval (#10690) 2024-05-10 17:23:58 -07:00
Jake Potrebic 39532a1f8c Fix stacks losing empty attr modifiers
Fixes #10686
2024-05-10 12:05:07 -07:00
Jason Penilla 4fd58a1b8f Add conversion for summon command 2024-05-10 12:57:07 +02:00
Nassim Jahnke 7f1a154d15 Add validation to player profile and properties (#10680) 2024-05-10 12:52:03 +02:00
Spottedleaf 8748ae16ac Use MCDataConverter instead of raw convert call for cmd converter
MCDataConverter uses the breakpoint system, which for future
updates may be neccesary (probably not).

Also, add the 1.20.6 version field.
2024-05-10 00:34:37 -07:00
Joseph Burton 2df1dace32 Fix DataConverter ConverterParticleToNBT.parseProperties
- The old code was using `StringReader.peek()` in a place where it meant to be `StringReader.skip()`.
- The vanilla code allows a trailing comma, but only if there is no whitespace between it and the closing bracket, which is a bit weird. I think that's a bug and it shouldn't allow trailing commas, but if you disagree then only the first issue needs to be fixed.
2024-05-10 00:32:31 -07:00
Spottedleaf b56e92f3d4 Fix chunk data version check not running in chunk system
The old read() method should just redirect to the new
chunk system method, however due to an error in moving
the chunk system patch around the data version check was
left in the old (UNUSED) read() method.
2024-05-09 23:47:13 -07:00
Spottedleaf cc29d2b7d5 Invalidate PathTypeCache when pathfinding updates are disabled
The configuration should not allow the cache to break. Additionally,
invalidating the cache is cheap and as such there is no gain to avoid
invalidating it.
2024-05-09 23:07:32 -07:00
Spottedleaf 1b67e02385 Fix entity tracker desync when new players are added to the tracker
The delta position packet instructs the client to update
the entity position by a position difference. However, this position
difference is relative to the last position in the entity tracker
state, not the last position which has been sent to the player. As
a result, if the last position the player has recorded is different
than the one stored in the entity tracker (which occurs when a new
player is added to an existing entity tracker state) then the sent
position difference will cause a position desync for the client.

We can resolve this problem by either tracking the last position
sent per-player, or by simply resetting the last sent position
in the entity tracker state every time a new player is added.
Resetting the last sent position every time a new player is
added to the tracker is just easier to do, so that is what
this patch does.
2024-05-09 17:08:59 -07:00
Nassim Jahnke f2512b1238 Print data component type on encoding error 2024-05-09 15:12:12 +02:00
Nassim Jahnke ab2a85a35f [ci skip] Clarify var entry in contributing file 2024-05-09 15:10:27 +02:00
Shane Freeder 5729b294ee Update Adventure to 4.17.0 Release 2024-05-08 15:48:45 +01:00
Bjarne Koll eee55d019f Correctly compare holders in BeaconMenu (#10673) 2024-05-07 18:18:57 -07:00
Lulu13022002 89ad61fd00 Fix hopper pull event being skipped after the first call (#10667) 2024-05-07 14:28:45 +02:00
Jason Penilla 9e51f94941 Fix ping event always receiving protocol version 0 (#10671) 2024-05-07 14:24:45 +02:00
Jake PotrebicandBjarne Koll ac3a5471c8 Fix BlockStateMeta (#10647)
* Fixes CraftMetaBlockState block entity data components

* rebase and merge into general item meta fix

* Add javadoc notice

* Update message

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-05-05 12:56:46 -07:00
SoSeDiK 2a6a5fef59 Add a way to check whether the chest is blocked (#10635)
* More Chest Block API

* rebased and slight logic fixes
2024-05-05 10:57:28 -07:00
Bridge 21d91ce634 Prevent profile lookups when unnecessary (#10651) 2024-05-05 19:07:30 +02:00
Tamion 716dfd8698 Fix EntityLoadCrossbowEvent (#10645)
* fix

* hehe
2024-05-05 09:54:04 -07:00
Lulu13022002 816ea9ecd5 [ci skip] Update old particle reference in javadoc (#10652) 2024-05-05 18:44:06 +02:00
NonSwag 54c5ecb4e4 Add missing SpigotConfig logCommands check (#10659) 2024-05-05 18:41:02 +02:00
Nostal Yuu 0e43d3c103 Added API to get player's proxy address (#10400) 2024-05-05 18:39:32 +02:00
Jake Potrebic 9d8d38d137 Updated Upstream (CraftBukkit) (#10646)
Upstream has released updates that appear 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:
66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists
ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta
4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set
5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests
2024-05-05 18:08:55 +02:00
Lulu13022002 b13c7dbe36 Add missing experimental field and annotations (#10653) 2024-05-05 09:00:54 -07:00
Bjarne Koll 7ae2c671c6 Keep components using single items in creative (#10664)
The craftbukkit implementation stores the old and new data patch of an
item during ItemStack#useOn(UseOnContext) to properly cancel events via
comparison and change detection of the component patch.

However, it uses #getComponentsPatch to fetch the new stack component
patch, which always yields an empty patch set if an itemstack is
considered empty by the game.
As the restoration of an itemstack's count to its previous state is
handled after the entire ItemStack#useOn method, items used in creative
mode temporarily have a count of zero, which causes craftbukkit to
consider their new component patch as EMPTY even tho said item may have
data.
The new patch is applied and, after useOn completes, the count is reset
if the player is in creative mode, leading to lost data.

This commit fixes said inconsistency by directly accessing the
components of the item via components#asPatch, storing the proper
component patch even for an item that temporarily has a count of zero.
2024-05-05 11:40:36 +02:00
Jake Potrebic 7401313e16 fix shear drops for wolf and bogged
Fixes #10661
2024-05-04 22:48:10 -07:00
Nassim Jahnke 6fcca46674 Add missing step in V3818 2024-05-04 22:50:20 +02:00
Jake Potrebic 5632210f10 add RegistryAccess for managing registries (#10154)
* add RegistryAccess for managing registries

* add missing types to key data generator

* fix some stuff

* Add RegistryKeys for all other non-server-backed registries

* fix tests

* remove Experimental annotations
2024-05-04 11:22:35 -07:00
Joseph Burton 156675c773 Fix lodestone compass target conversion 2024-05-04 12:58:06 +02:00
Joseph Burton 0db72ac19e Fix can_place_on conversion and size check for item containers 2024-05-02 20:23:15 +02:00
Shane Freeder 59fe7ccc3b default save-empty-scoreboard-teams to vanilla
The primary environmental factor which caused this feature to be implemented
is no longer much of a factor within the community
2024-05-02 09:53:43 +01:00
SoSeDiK 544ce20e01 Expose #hasColor to leather armor (#10638) 2024-05-01 19:14:42 +02:00
SoSeDiK 18c201b838 Add EquipmentSlot#getOppositeHand (#10632) 2024-05-01 19:14:27 +02:00
SoSeDiK faa7aa266a Add GameMode#isInvulnerable (#10633) 2024-05-01 19:14:17 +02:00
Nassim Jahnke 310b47bb96 Update Java version references, add note on var usages 2024-05-01 18:44:39 +02:00
Andrew Teeter b8c454c2ba Add damage check for mending (#10631) 2024-05-01 12:01:48 +02:00
SoSeDiK 4cfd9e25fa Expose canReach to mob pathfinding API (#10636) 2024-05-01 12:00:11 +02:00
Noah van der Aa 3e0eb4a1ba Updated Upstream (CraftBukkit) (#10624)
Upstream has released updates that appear 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:
666f091c6 SPIGOT-7649: Allow /setworldspawn command in all worlds again
2024-04-30 16:53:54 -07:00
Jake Potrebic fa6013d83b Fixes beds not exploding in the nether
Also correctly marks the captured BlockState as "unplaced"
Fixes #10629
2024-04-30 16:42:43 -07:00
Jason Penilla 8c058f88a6 Update paperweight to 1.6.3 (#10626) 2024-04-30 10:30:14 -07:00
Nassim Jahnke 4ea67abd46 [ci skip] Remove trailing comma in projects action 2024-04-30 15:56:43 +02:00
Nassim Jahnke 937a67a651 Add initial size cap to component map 2024-04-30 11:14:35 +02:00
Jason Penilla 3fdd0948b7 Fix sealed package check in BytecodeModifyingURLClassLoader (#10627) 2024-04-30 01:21:16 -07:00
Jake Potrebic 25e44bc63b fix dumpitem command nbt format
use the snbt visitor instead of plain string
2024-04-29 18:49:19 -07:00
Jake Potrebic 812ccb96a4 fix spawnChunkRadius gamerule resetting
Fixes #10622
2024-04-29 15:22:29 -07:00
Noah van der Aa 44ee092878 1.20.6 (#10623) 2024-04-30 00:16:07 +02:00
Riley Park fbe3c00675 [ci skip] update projects workflow configuration 2024-04-29 13:29:50 -07:00
Bjarne Koll 8f7ac62905 Validate manifest provided mapping namespace (#10612)
With plugins adopting paperweights mapping namespaces in their manifest
file in and after paper 1.20.5, incorrectly spelled namespaces
previously were simply implied as the spigot namespace.

This commit properly ensures plugin authors are using a known mapping
namespace in their manifest, avoiding down the line confusion on
incorrect remapping behaviour.

The commit also fixes two incorrect log parameters.
2024-04-28 20:43:50 -07:00
Jake Potrebic f9397e108e Fix incorrect Commodore mapping of sweeping enchant 2024-04-28 17:25:21 -07:00
Jake Potrebic 69a971a35c Reset component prototype on itemtype change 2024-04-28 17:13:30 -07:00
Jason Penilla 05308fc299 Remap plugin libraries with namespace set to spigot (#10610)
* Remap plugin libraries with namespace set to spigot

* Remap plugin libraries with namespace set to spigot
2024-04-28 14:55:10 -07:00
Jason Penilla 7f2d5315fd Rewrite reflection in library loader jars (#10608)
* Rewrite reflection in library loader jars

* Address todos
2024-04-28 13:14:10 -07:00
Jake Potrebic 61c9c07e95 Fix CraftMetaBlockState adding extra tags 2024-04-28 12:34:16 -07:00
Riley Park 82a801201e [ci skip] adjust projects workflow for label changes 2024-04-28 12:12:57 -07:00
Noah van der Aa 0f3e324152 [ci skip] Fix discussion template file name (#10607) 2024-04-28 11:16:07 -07:00
Riley ParkandNoah van der Aa ba673a3b78 [ci skip] Feature requests are now in GitHub Discussions (#10606)
* [ci skip] feature requests are now discussions, not issues

* Re-add discussion template

* [ci skip] remove old feature label

---------

Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
2024-04-28 11:12:37 -07:00
Shane FreederandJake Potrebic 52ff3b7382 Add itemName components (Resolves #10467) (#10471)
* Add itemName components (Resolves ##10467)

* improve javadocs and formatting

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-28 10:08:59 -07:00
Jake Potrebic 0f4d328fc1 final missing validation for data components 2024-04-28 09:46:33 -07:00
Nassim Jahnke aed7dcab98 Fix overly strong name validation in player heads
Closes #10477
2024-04-28 18:25:32 +02:00
Jake Potrebic 4491ac05d1 respect hard list size limits in ItemMeta 2024-04-28 09:06:14 -07:00
Nassim Jahnke 9d6e7e3df0 Don't hard fail on plugin remap error
Closes #10474
2024-04-28 17:25:44 +02:00
Jake Potrebic c4a1cd137a Fix issue with empty lists in adventure predicates
Fixes #10473
2024-04-28 08:22:16 -07:00
Shane Freeder 37b3891032 Fix another missing book meta tag 2024-04-28 13:48:20 +01:00
Shane Freeder 6e31f385e3 Fix book meta lacking resolved tag from older versions (Fixes #10470) 2024-04-28 13:22:54 +01:00
Nassim Jahnke 1a03cc9b60 Fix test compilation 2024-04-28 14:20:52 +02:00
Jake Potrebic 306b203c2d more fixes for ItemMeta relating to components 2024-04-27 22:27:51 -07:00
Jake Potrebic e16263c39f Fix firework meta NPE
Fixes #10466
2024-04-27 20:57:42 -07:00
caramel a3c4dc95e3 Fix the incorrect codec usage in the Style convert (#10465) 2024-04-27 20:32:11 -07:00
Jason Penilla f187fd696a Only scan org.bukkit.craftbukkit.inventory in MetaHandledTagsTest
fixes tests OOMing
2024-04-27 18:25:15 -07:00
Jake Potrebic d93c6f91f7 remove calls to DoNotUse methods 2024-04-27 18:18:20 -07:00
Jake Potrebic 3e90a19183 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
304e83eb PR-1002: Improve documentation and implementation of getMaxStackSize
e8215ea2 SPIGOT-7638: Library loader does not seem to resolve every dependency
79c595c0 SPIGOT-7637: Bad logic in checking nullability of AttributeModifier slots

CraftBukkit Changes:
91b1fc3f1 SPIGOT-7644: Fix ItemMeta#getAsString
4e77a81e1 SPIGOT-7615: PlayerLeashEntityEvent cancelled eats lead
996f660f3 Do not remove leash knot if leasing to an existing leash knot gets cancelled
f70367d42 SPIGOT-7643: Fix inverted leash event cancelled usage and remove leash knot if no entity gets leashed
7ddb48294 SPIGOT-7640: Abnormal jumping height of wind charge
080c8711e SPIGOT-7639: Incoming plugin channels not working
ad549847e Open a direct connection instead of pinging mojang server to check if it is reachable
38e2926c5 SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime
2024-04-27 18:00:01 -07:00
Jake Potrebic d964c15e15 fix last test issue 2024-04-27 17:45:37 -07:00
Jason Penilla 7e3d5b569d bump paperweight to 1.6.2 to fix spurious build failure from scanJar OOM 2024-04-27 17:38:20 -07:00
Jake Potrebic 8ce62b3492 Fix issue with hopppers
Fixes #10464
2024-04-27 17:33:25 -07:00
Jake Potrebic 4ad6022ee3 improve checking handled tags in itemmeta (#9470) 2024-04-27 17:33:17 -07:00
Jason Penilla 83767f9544 Use JetBrains runtime for run tasks
allows for better runtime class redefinition

closes #10459
2024-04-27 17:28:40 -07:00
Nassim Jahnke d99d84a8aa Temporarily comment out adventure jd links 2024-04-28 02:05:52 +02:00
Jason Penilla 8454786c8d Bump tiny-remapper (real) 2024-04-27 16:26:28 -07:00
Jason Penilla 75c22d545f Bump tiny-remapper 2024-04-27 16:26:03 -07:00
Jason Penilla aeb3f376a2 update paperweight to 1.6.1 2024-04-27 16:07:55 -07:00
Jake Potrebic d02bb811de proper migration to gamerules for keep spawn loaded distance 2024-04-27 15:50:38 -07:00
Nassim Jahnke dd571d89f2 Fix bad diff in build gradle file 2024-04-28 00:43:17 +02:00
Nassim Jahnke 06cae13223 Update jdk version and distribution in actions 2024-04-28 00:26:43 +02:00
Jake Potrebic a771940776 Revert to vanilla handling of LivingEntity#actuallyHurt (#10463) 2024-04-27 14:35:53 -07:00
Jake Potrebic 53d8edd756 properly check for experimental stuff in generator 2024-04-27 14:32:35 -07:00
Jake Potrebic b3ea907b77 more ItemFlag fixes 2024-04-27 14:32:34 -07:00
Jason Penilla 20af7a753c remove funny diff 2024-04-27 14:11:35 -07:00
Jason Penilla a390119b04 Move cb version definition to gradle patch 2024-04-27 14:02:33 -07:00
Jason Penilla b7e148a107 Move obfhelper/stack deobf diff into original patch 2024-04-27 13:54:09 -07:00
Lulu13022002 af97400701 update generator 2024-04-27 22:32:16 +02:00
Jason Penilla 711dbd74ea Bump adventure ansi serializer 2024-04-27 13:31:37 -07:00
Jason Penilla e2552eea24 Start cleaning up plugin remapping patches 2024-04-27 13:27:01 -07:00
Lulu13022002 0b1b1fe067 fix helmet damage reduction inconsistencies
See: https://github.com/PaperMC/Paper/issues/9555#issuecomment-1681120506
2024-04-27 21:56:29 +02:00
Lulu13022002 55b1a8740d fix PotionEffectType#getEffectAttributes 2024-04-27 21:48:14 +02:00
Spottedleaf f933c35700 Update DataConverter to 1.20.6-rc1
Fixes trader llama inventory incorrectly converting
2024-04-27 12:41:47 -07:00
Jake Potrebic c82766d436 fix item flags 2024-04-27 12:18:01 -07:00
Jason Penilla f037f08035 Unify plugin remapping debug flags 2024-04-27 11:41:56 -07:00
Shane Freeder 5731f346e2 Restore Handle Large Packets Disconnecting Client Patch 2024-04-27 15:06:52 +01:00
Jake Potrebic f85d423535 improve dumpitem and pgive commands 2024-04-26 23:57:49 -07:00
Jake Potrebic 91b5de66bf bunch of fixes and improvements 2024-04-26 23:17:58 -07:00
Jake Potrebic 81f4405e26 add back hunk to async SavedData IO 2024-04-26 19:33:30 -07:00
Jake Potrebic 9bac3894e1 more fixes 2024-04-26 19:09:42 -07:00
Jake Potrebic 68e23db25d add back missing call to profile fill events 2024-04-26 18:41:54 -07:00
Jake Potrebic 80bd01527f fix adventure converters not using RegistryOps 2024-04-26 18:16:31 -07:00
Jake Potrebic 2f19f0fb7b fix enchantment order issue 2024-04-26 18:06:41 -07:00
Jason Penilla 548504381f Don't tell people to build the reobf jar 2024-04-26 18:05:17 -07:00
Jake Potrebic f1fc1b30be readd old UUID format patch 2024-04-26 17:41:36 -07:00
Jake Potrebic ba8512a0d8 fix javadocs for SpawnerEntry$Equipment API 2024-04-26 17:00:40 -07:00
Jake Potrebic c38f96b0e5 deprecate our ItemRarity API 2024-04-26 17:00:40 -07:00
Jason Penilla 6a4974b1b9 Remove shadow from build classpath
it isn't used
2024-04-26 16:48:34 -07:00
Jason Penilla ff77f82539 paperweight 1.6.0 2024-04-26 16:19:59 -07:00
Jake Potrebic 464cc81633 fix custom potion mixes 2024-04-26 16:17:14 -07:00
Jake Potrebic 4c53acedce fix exact choice recipes 2024-04-26 15:25:20 -07:00
Jake Potrebic 882ea0a430 fix adventure translations 2024-04-26 15:08:39 -07:00
Jason Penilla e856d17ec5 Update paper plugin check in PluginRemapper 2024-04-26 14:31:53 -07:00
Jake Potrebic 19ac9d43ce remove no longer needed patches and fix tests 2024-04-26 14:29:21 -07:00
Jason Penilla 1bc278b125 Update patched spigot decompiler to fix inconsistency based on processing order 2024-04-26 11:45:56 -07:00
Jake Potrebic 44e68c301a fix some more issues 2024-04-26 11:39:20 -07:00
Jake Potrebic cc81668863 fix some issues on the todo list 2024-04-26 09:22:55 -07:00
Jake Potrebic f6fae41cdf fix chat_type issue 2024-04-26 08:33:00 -07:00
Owen1212055 00dac83d67 Drop old decompile fix 2024-04-26 08:39:10 -04:00
Nassim Jahnke 8b28f9f564 Fix accumulated total ticking chunks not being updated 2024-04-26 11:55:56 +02:00
Nassim Jahnke 478a971a7b Fix light setting in protochunk 2024-04-26 11:18:15 +02:00
Nassim Jahnke 813cfbf2b0 Fix compile issues 2024-04-26 10:45:00 +02:00
Jake Potrebic 7e9da43b33 support patch versions in api-version 2024-04-25 23:29:16 -07:00
Jason Penilla 2997fd6459 plugin manager updates 2024-04-25 23:18:04 -07:00
Jake Potrebic 43d110e9a9 fix issue with item default attribute API 2024-04-25 23:10:38 -07:00
Jake Potrebic bcdf1f96b8 fixup loom pattern select event patch 2024-04-25 22:44:49 -07:00
Jason Penilla c5c2a5fe13 hunk system fixes 2024-04-25 22:25:02 -07:00
Jason Penilla 62b96c520f compile fixes 2024-04-25 21:58:13 -07:00
Jason Penilla 867eb9054b compile fixes 2024-04-25 20:15:07 -07:00
Jason Penilla 7c6411b930 compile fixes 2024-04-25 19:54:07 -07:00
Jason Penilla d2ef0622c9 generator fix 2024-04-25 19:09:21 -07:00
Jake Potrebic 31ad90b018 some more compile fixes 2024-04-25 18:51:31 -07:00
Jason Penilla a244281287 Replace VanillaGradle use and update generated API 2024-04-25 18:40:50 -07:00
Jake Potrebic 10e6143499 fixup adventure's book meta handling 2024-04-25 17:46:17 -07:00
Jake Potrebic e85e1ec4a6 fixup sus effect entry patches 2024-04-25 17:10:12 -07:00
Jake Potrebic 3062eb208d address my own comments 2024-04-25 16:24:08 -07:00
Nassim Jahnke 68aea43526 Fixup damage source change 2024-04-25 23:28:56 +02:00
Nassim Jahnke 2641c02193 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
69fa4695 Add some missing deprecation annotations
f850da2e Update Maven plugins/versions
8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE
c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
07bce714 SPIGOT-7355: More field renames and fixes
6a8ea764 Fix bad merge in penultimate commit
50a7920c Fix imports in previous commit
83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups
fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version

CraftBukkit Changes:
90f1059ba Fix item placement
661afb43c SPIGOT-7633: Clearer error message for missing particle data
807b465b3 SPIGOT-7634: Armadillo updates infrequently
590cf09a8 Fix unit tests always seeing Mojang server as unavailable
7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta
4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods
ebb50e136 Fix incorrect Vault implementation
b33fed8b7 Update Maven plugins/versions
6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents
db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE
8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
0297f87bb SPIGOT-7355: More field renames and fixes
2d03bdf6a SPIGOT-7629: Fix loading banner patterns
e77951fac Fix equality of deserialized display names
c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta
9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities
8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available
ced93d572 SPIGOT-7626: sendSignChange() has no effect
c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5
ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests
8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
2024-04-25 23:23:57 +02:00
Nassim Jahnke ed790385ed More compile fixes 2024-04-25 22:47:32 +02:00
Nassim Jahnke 8d3759d4a5 More more compile fixes 2024-04-25 22:34:46 +02:00
Nassim Jahnke d01f6b2fd2 Fix more compile issues 2024-04-25 21:57:59 +02:00
Jason Penilla ca9001a936 compile fixes 2024-04-25 12:16:00 -07:00
Jason Penilla 820f999ba4 Fixes for cb pkg ver 2024-04-25 11:16:53 -07:00
Noah van der Aa 04a25c2813 Fix WorldCreator#keepSpawnLoaded 2024-04-25 19:57:27 +02:00
Jason Penilla 768befec89 Remove patch renaming scripts
These are pretty specific to tasks that kenny and I were doing when they were written, no need to keep them around when they aren't useful for others.
2024-04-25 10:53:29 -07:00
Bjarne Koll b984f66d13 Missing FQN in CraftPotionBrewer getter 2024-04-25 19:45:17 +02:00
Bjarne Koll 9c580566b9 Some more compilation fixes 2024-04-25 19:42:24 +02:00
Noah van der Aa f4c7639986 Un-jankify root user detection 2024-04-25 19:13:12 +02:00
Bjarne Koll bab31b6f55 Update Enchantment damage increase API
The Enchantment damage increase API added previously used the
EntityCategory enum as a parameter. These values are now however
determined by tags instead of the categories themselves.

Deprecated the outdated api method, create a new overload that takes
EntityType instead and implement deprecated method by guessing an entity
type from the builtin registry based on the category passed.
This method allows
a) the tags to still be modified and the legacy
   method still respecting such.
b) potential cursed implementations of enchantments of plugins to not
   break that override the getDamageBonus method on Enchantment.
2024-04-25 18:42:50 +02:00
Jake Potrebic 653f0432b5 readd fix bee aging patch 2024-04-25 09:06:13 -07:00
Jake Potrebic ccf158a817 update smithing recipe copy data components API 2024-04-25 08:13:36 -07:00
Owen1212055 b8da9ac51a item meta patch work 2024-04-25 09:22:52 -04:00
Owen1212055 457e2c8a5a pass more stuff 2024-04-25 09:01:54 -04:00
Owen1212055 45900385cd Fix properly resend patches 2024-04-25 08:42:47 -04:00
Owen1212055 345b5c1c4c Patches!!!!!!! (we are done) 2024-04-25 08:36:48 -04:00
Nassim Jahnke 6da0d8cc91 (Almost) all patches applied 2024-04-25 14:23:55 +02:00
Nassim Jahnke 2debcaff9d More more patches, including hopper optimization patch 2024-04-25 14:07:39 +02:00
Nassim Jahnke c9907c650f More patches 2024-04-25 13:02:27 +02:00
Nassim Jahnke ec4ada852e Apply and move up non-optimization patches 2024-04-25 12:27:57 +02:00
Nassim Jahnke f6ea3736a7 Patches 2024-04-25 11:42:10 +02:00
Spottedleaf e9eec78fc7 chunk system 2024-04-25 01:52:52 -07:00
Spottedleaf ec9f7e3850 starlight 2024-04-25 00:14:22 -07:00
Spottedleaf 6a87d141f3 dataconverter 2024-04-24 23:49:13 -07:00
Jason Penilla b673721d77 compile fixes 2024-04-24 22:29:18 -07:00
Jason Penilla 690b1cd321 compile fixes 2024-04-24 22:16:04 -07:00
Jason Penilla 25f7c68e6b compile fixes 2024-04-24 21:38:28 -07:00
Jason Penilla ce0e78c103 compile fixes
compile fixes

compile fixes
2024-04-24 21:18:42 -07:00
Jake Potrebic 1444b3632e work on adventure 2024-04-24 20:14:51 -07:00
Jason Penilla bb1351cb8d some work on adventure 2024-04-24 18:10:18 -07:00
Jason Penilla c95db4fcaa adventure 4.17.0-SNAPSHOT 2024-04-24 17:46:57 -07:00
Jason Penilla b7338094a5 Drop conduit api patch (upstream implemented same api with same method signatures) 2024-04-24 17:40:30 -07:00
Jason Penilla 1df7e21459 Apply more API-implementing patches 2024-04-24 17:36:24 -07:00
Jake Potrebic 11044315fd 955 2024-04-24 16:25:57 -07:00
Owen1212055 e0a245d2ea Patches!!!!!!! 2024-04-24 18:36:55 -04:00
Jason Penilla 051855997e Update reflection rewriter to 0.0.1 release 2024-04-24 15:02:37 -07:00
Noah van der Aa 961782982b Restore original formatting for MC-252817 patch 2024-04-24 23:26:18 +02:00
Noah van der Aa 4d9e824a44 more more work (806) 2024-04-24 23:23:56 +02:00
Noah van der Aa 22227ccf26 more more work (757) 2024-04-24 22:32:38 +02:00
Noah van der Aa 71ae391eb3 more work (721) 2024-04-24 22:05:42 +02:00
Jason Penilla 90095cd7c4 694 2024-04-24 11:03:59 -07:00
Jason Penilla fc5c0dae7f 683 2024-04-24 10:59:51 -07:00
Jason Penilla e832328b7e Check for existing am session before running continueServerUpdate 2024-04-24 10:48:00 -07:00
Nassim Jahnke 4e654f2a3a More patch work 2024-04-24 19:27:48 +02:00
Nassim Jahnke 1de0dc8828 666 plus 1 2024-04-24 17:35:46 +02:00
Owen1212055 21afc0a2e2 Patches!!!!!!! 2024-04-24 10:30:32 -04:00
Owen1212055 a403a8d085 Patches!!!!!!! 2024-04-24 10:29:12 -04:00
Owen1212055 2d9d0d8b1d Patches! 2024-04-24 09:46:45 -04:00
Owen1212055 5be858e9b7 Patches! 2024-04-24 08:11:27 -04:00
Jake Potrebic cc4614854a 405 2024-04-23 23:44:48 -07:00
Jake Potrebic 9079c90d22 354 2024-04-23 23:05:14 -07:00
Jake Potrebic 1d7d7e92f2 301 2024-04-23 22:43:09 -07:00
Jake Potrebic 309ebc13fc 253 2024-04-23 19:46:06 -07:00
Jake Potrebic 8244815161 221 2024-04-23 19:21:40 -07:00
Owen1212055 906f906089 Patches! 2024-04-23 18:25:14 -07:00
Owen1212055 0225537fd1 Update upstream 2024-04-23 21:13:33 -04:00
Owen1212055 487555b627 update 2024-04-23 21:13:33 -04:00
Jake Potrebic d6a3c0c239 fix 2 of our javadoc errors 2024-04-23 16:30:24 -07:00
Jake Potrebic 862d00478e work on some API stuff 2024-04-23 16:26:24 -07:00
Jason Penilla 5cfd92b240 Fix api compile 2024-04-23 14:47:29 -07:00
Jason Penilla f2350fe0d1 Set mercury sourceCompat 2024-04-23 14:43:32 -07:00
Jason Penilla d07c487d4d Don't use defaultToolchain method for run tasks 2024-04-23 14:39:36 -07:00
Jason Penilla 2eeed9e6fa 41 2024-04-23 14:31:37 -07:00
Jason Penilla 9cac5b6f4f Fix continueServerUpdate with 2-line subjects 2024-04-23 14:26:28 -07:00
Jason Penilla eb41348d39 33 2024-04-23 14:12:24 -07:00
Jason Penilla ffccfd5488 Apply timings 2024-04-23 14:04:59 -07:00
Jason Penilla 598a1cb947 Apply shadow removal patch 2024-04-23 13:41:25 -07:00
Jason Penilla dd6ce09922 Fix reflection diff and order wrt commodore diff 2024-04-23 13:36:31 -07:00
Nassim Jahnke 7cdf804392 Work 2024-04-23 22:13:16 +02:00
Jason Penilla 380c4d2313 Add plugin remapping patches 2024-04-23 11:44:42 -07:00
Jake Potrebic ef057bba7d work on Adventure patch 2024-04-23 11:32:19 -07:00
Jason Penilla 00c14f2e7b Move logging patches after adventure 2024-04-23 11:31:38 -07:00
Jake Potrebic f2c45ed1d3 do some work 2024-04-23 11:03:16 -07:00
Jake Potrebic abc49bf069 Begin update to 1.20.5 2024-04-23 10:02:08 -07:00
leguan f4c7d373e4 [ci skip] Fix javadoc typo (#10445) 2024-04-22 19:08:37 +01:00
Jake Potrebic a6b6ecdd22 More Raid API (#7537) 2024-04-20 15:57:51 -04:00
Tamion fc53ff5a71 Add Configuration for finding Structures outside World Border (#10437) 2024-04-20 15:29:32 -04:00
Janet Blackquill c5f68ff9be Add CartographyItemEvent and get/setResult for CartographyInventory (#10396) 2024-04-20 14:10:35 -04:00
Florian Beck a033033b7a Added chunk view API (#10398) 2024-04-20 13:56:59 -04:00
Nassim Jahnke 3af1346520 Allow setting player list name early 2024-04-20 15:24:42 +02:00
Tamion 908b8141c9 Fix inventory desync with PlayerLeashEntityEvent (#10436) 2024-04-19 20:23:32 -07:00
Jake Potrebic 3b078f822a Add API for ticking fluids (#10435)
* Add API for ticking fluids

* update javadocs
2024-04-19 13:03:32 -07:00
brickmonsterandJake Potrebic 9e886c4310 Remove dead code (LegacyResult) (#10411)
* Stop firing AsyncPlayerChatPreviewEvent as chat preview was removed in 1.19.3. This is in parity with upstream

* formatting and small tweaks

* correctly set MESSAGE_CHANGED flag for modern modifications

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-19 12:47:24 -07:00
Jason Penilla 862299b6a6 "Downgrade" Vineflower to 1.10.1 release (#10423)
* "Downgrade" Vineflower to 1.10.1 release

The main thing we lose from the 1.11 snapshots is a recent fix for redundant casts.

* Thanks intellij

* a
2024-04-16 12:44:59 -07:00
Owen 4445d23544 Deprecate ItemStack#setType & add ItemStack#withType (#10290) 2024-04-12 17:16:22 -04:00
ButterDebugger 3263470312 Add color transition and clone functions to ParticleBuilder (#10342) 2024-04-12 16:07:28 -04:00
CrossandBjarne Koll f061e76e1f Fix hit criteria advancement triggered before changing state (#10409)
* Fix hit criteria advancement being triggered before changing block state.

* Rebase

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-04-12 12:42:00 -07:00
Shane Freeder 46d462b83e Fix StackOverflowException thrown on shutdown (Fixes #10404) (#10408)
paper previously migrated away from using executeIfPossible as this throws a
RejectedExecutionException when the server is shutting down, which is then picked
up by the Connection handler object and causes the player to be kicked without
the intended disconnection message that comes from commands such as /stop, /restart

This was fine, because previously changes made in spigot would just prevent these
packets from being executed anyways. Instead, we'll just use a marker exception
to try to detect this specific state.
2024-04-12 12:37:00 -07:00
Hy3z 8fe90dede7 [ci skip] Referenced InventoryDragEvent in documentation of InventoryClickEvent (#10395) 2024-04-12 15:19:55 -04:00
Jake PotrebicandJason Penilla 526795bacd Update patches to handle vineflower decompiler (#10406)
* Update patches to handle vineflower decompiler

* update patches again to handle inlined simple lambdas

* update vf again and re-apply/rebuild patches

* update patches after removal of verify-merges flag

* fix compile issue

* remove maven local

* fix some issues

* address more issues

* fix collision patch

* use paperweight release

* more fixes

* update fineflower and fix patches again

* add missing comment descriptor

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2024-04-12 12:14:06 -07:00
Lulu13022002 37db2d7e4c [ci skip] Update book page/char limit for book meta doc (#10415) 2024-04-12 11:58:44 -07:00
gecko10000 a7f1dc6a07 Change online mode default for Velocity configuration (#10413) 2024-04-12 18:21:31 +01:00
Jake Potrebic 5436d44bf2 Deprecate several Keyed#getKey methods (#10357)
- Structure (can already be defined inline in datapacks
- PatternType (can be defined inline in 1.20.5 data components)
- MusicInstrument (same as above)
2024-04-07 22:20:51 -07:00
Shane Freeder 1207162055 Allow player-list API to self un/list (#10358) 2024-04-06 20:45:43 -04:00
Joseph Burton 241d8e26fb Ignore minecart in activation range (#10359) 2024-04-06 19:50:43 -04:00
Noah van der Aa 8e75001cb8 Disable vertical air friction when item entities have friction disabled (#10369) 2024-04-06 19:36:59 -04:00
Evan 3d31e45e7e Add BlockBreakProgressUpdateEvent (#10300) 2024-04-06 18:28:17 -04:00
Lulu13022002 acf838f535 Backport some stuff from the generators branch (#10365) 2024-04-06 14:51:47 -07:00
Tamion 182e79bce1 Add more item use API (#10304) 2024-04-06 17:44:27 -04:00
Lulu13022002 d8456ee65b Don't throw NPE for unplaced blockstate on #getDrops (#10366) 2024-04-06 17:26:56 -04:00
powercas_gamerandJake Potrebic bbee11fb0e Deprecate Bukkit#getLogger (#10388)
* Deprecate Bukkit#getLogger

* fix typo in MaterialSetTags

* change to Internal and squash into other patch

* improve api note message

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-06 14:20:29 -07:00
Pierpaolo Coletta 06361fa662 Fix invalid block entities created during world gen (#10375) 2024-04-06 17:16:54 -04:00
BridgeandJake Potrebic a774fbaca8 feat: Entity#teleportAsync method with TeleportFlags (#10371)
* feat: Entity#teleportAsync method with TeleportFlags

* use method-local class

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-04-06 13:38:37 -07:00
Jake Potrebic bd38e0318a Updated Upstream (Bukkit/CraftBukkit) (#10379)
Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear 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:
f02baa38 PR-988: Add World#getIntersectingChunks(BoundingBox)
9321d665 Move getItemInUse up to LivingEntity
819eef73 PR-959: Add access to current item's remaining ticks
c4fdadb0 SPIGOT-7601: Add AbstractArrow#getItem
be8261ca Add support for Java 22
26119676 PR-979: Add more translation keys
66753362 PR-985: Correct book maximum pages and characters per page documentation
c8be92fa PR-980: Improve getArmorContents() documentation
f1120ee2 PR-983: Expose riptide velocity to PlayerRiptideEvent

CraftBukkit Changes:
dfaa89bbe PR-1369: Add World#getIntersectingChunks(BoundingBox)
51bbab2b9 Move getItemInUse up to LivingEntity
668e09602 PR-1331: Add access to current item's remaining ticks
a639406d1 SPIGOT-7601: Add AbstractArrow#getItem
0398930fc SPIGOT-7602: Allow opening in-world horse and related inventories
ffd15611c SPIGOT-7608: Allow empty lists to morph to any PDT list
2188dcfa9 Add support for Java 22
45d6a609f SPIGOT-7604: Revert "SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime"
06d915943 SPIGOT-7365: DamageCause blocked by shield should trigger invulnerableTime
ca3bc3707 PR-1361: Add more translation keys
366c3ca80 SPIGOT-7600: EntityChangeBlockEvent is not fired for frog eggs
06d0f9ba8 SPIGOT-7593: Fix sapling growth physics / client-side updates
45c2608e4 PR-1366: Expose riptide velocity to PlayerRiptideEvent
29b6bb79b SPIGOT-7587: Remove fixes for now-resolved MC-142590 and MC-109346
2024-04-06 12:53:39 -07:00
Jason Penilla a2035440cf build: Compile against and shade the filtered jar (#9747)
* Compile against & shade the filtered jar

* Move check for if the paper asset root needs to be pushed

* Don't disable incremental compilation

* Remove mavenLocal

* use paperweight release
2024-04-04 17:12:05 -07:00
DungeonDevandTamion e709245b55 Add config option for tripwire disarming fix
Fixes #10382

Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
2024-04-02 12:18:22 +02:00
Jason Penilla 45d1486fec build: Update paperweight to 1.5.12 and Gradle Wrapper to 8.7 (#10361) 2024-03-29 10:43:36 -07:00
Jake Potrebic 710dced8b7 [ci skip] move custom brig exception to paper package 2024-03-26 08:38:26 -07:00
Nassim Jahnke 00fd87a10f Return dummy string instead of empty optional 2024-03-25 13:26:01 +01:00
maxcom1 b6001403e9 Add methods to change entity physics (#10334) 2024-03-23 17:26:17 -04:00
FireInstall 9ec7dfcbc4 Move invisible setting up to entities (#10346) 2024-03-23 20:27:30 +01:00
Shane Freeder 88419b2075 Do not copy profile data if profiles are the same (#10259) 2024-03-20 22:47:50 +01:00
TonytheMacaroni 41ffa0cf8c Expose power on fireballs (#10302) 2024-03-20 22:33:34 +01:00
Jake Potrebic de620b8480 Clone mutable types in events when changes are discarded (#10333) 2024-03-20 21:42:29 +01:00
maxcom1 05fe15e0fc Fire EntityChangeBlockEvent on beehive nectar deposit (#10306)
* Add BeehiveNectarDepositEvent

* Fire EntityChangeBlockEvent instead of a separate event
2024-03-20 12:35:10 -07:00
Nassim Jahnke 55ffcb1111 Fix tripwire disarming not working as intended 2024-03-19 20:09:02 +01:00
Kichura 09d6dfb0df [ci skip] Upstream dependencies in workflow scripts. (#10338) 2024-03-19 13:30:03 +00:00
viciscat 99a641690a Expand Hopper BlockState API (#10328) 2024-03-16 20:28:50 +01:00
Jake Potrebic d361a7f609 Fix DamageSource API (#10307)
Uses the correct entity in the EntityDamageByEntity event
Returns the correct entity for API's DamageSource#getCausingEntity
2024-03-16 11:51:22 -07:00
leguan e6034867ba Add onboarding message for initial server start (#10312) 2024-03-16 19:10:26 +01:00
Ikko Eltociear Ashimine cd110a8995 [ci skip] Update CONTRIBUTING.md (#10318)
tempermental -> temperamental
2024-03-16 18:56:04 +01:00
Suppergerrie2 ab1afb0ed8 Fix missing profiler.pop() in PathFinder::findPath (#10320) 2024-03-15 11:09:47 +00:00
Bjarne Koll 62b220a87f Allow passenger retaining teleport via end gateway (#10283)
Previously paper disabled the abilities for entities to teleport via end
gateways if they were being used as a vehicle.

While the behaviour generally worked fine for entities riding other
entities, players would quickly end up in an invalid state, not seeing
their passenger anymore.

This commit removes the paper introduced limitation by now properly
updating the passengers location of a player when they are teleporting
through an end gateway.
2024-03-10 01:08:44 +01:00
Jake Potrebic 80e1a45959 Add param to overrides to the correct method is called (#10308) 2024-03-09 18:16:27 -05:00
Jake Potrebic a0931f4864 Updated Upstream (Bukkit/CraftBukkit) (#10301)
Upstream has released updates that appear 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:
7ca2b46c SPIGOT-7594: Fix typo and include missing MinecraftExperimental annotation in Loot Table enum

CraftBukkit Changes:
176c0ad39 Fix copying BlockStates with fields (eg, Banner)
ee685bd2a Fix Camel not standing up when hurt
619936d4b Increase outdated build delay
2024-03-08 15:52:00 -08:00
Jason Penilla 0052e2db39 build: Update tiny-remapper to 0.10.1 & remove unused repo from dev bundle config (#10303) 2024-03-07 10:11:47 -08:00
Jake Potrebic 6ad63fba30 Per world ticks per spawn settings (#6891) 2024-03-03 17:53:58 -05:00
Owen 89d51d5f29 Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable.

It should be noted that this decision does not promise all future exploits will be configurable.
2024-03-03 17:05:34 -05:00
Yannick LamprechtandBjarne Koll b21eb4d9a4 add overloads to use suspicious effect entry to mushroom cow and suspicious stew meta (#10245)
The existing method with PotionEffect suggests that all attributes are used. In fact, only the PotionEffectType and the duration are used.



---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-03-03 16:40:18 -05:00
Shane Freeder 60218cd207 Don't tick empty worlds (#9025) 2024-03-03 16:10:45 -05:00
Jake Potrebic 880fef77ab Deprecate extra ban methods with raw BanEntry (#9580) 2024-03-03 12:54:52 -08:00
Gero ce5c8dd379 Configurable max block/fluid ticks (#10266) 2024-03-03 15:43:00 -05:00
Yannick Lamprecht bbc03d8116 improve BanList types (#10239) 2024-03-03 12:36:17 -08:00
Rodney 8870d22bc7 Fire EntityDamageByEntityEvent for unowned wither skulls patch (#10244) 2024-03-03 14:35:50 -05:00
Yannick Lamprecht 9c4bb0df0e add rich message component support to configuration (#10225) 2024-03-03 10:59:22 -08:00
granny 54a23403da check if itemstack is stackable first (#10285) 2024-03-03 10:37:00 -08:00
Bjarne Koll 850b736e14 Close PRs opened from orgs or bot accounts (#10281)
Expands the existing close_invalid_prs workflow to also close prs that
were opened from repositories not owned by user accounts.
This is required as such PRs cannot be edited by maintainers.

The implementation re-uses the existing job instead of creating a new
job to limit the amount of checks to the bare minimum.
2024-02-28 15:18:58 +01:00
Nassim Jahnke 681bbff110 Fix spawnreason saving 2024-02-23 23:15:11 +01:00
Bjarne KollandAleksander Jagiello d0ebfbbd15 Fix corrupted plugin.yml breaking plugin loading (#10279)
Fix corrupted plugin.yml file in one plugin not loading any plugins by
the server.

Co-authored-by: Aleksander Jagiello <themolkapl@gmail.com>
2024-02-23 18:54:44 +01:00
Shane Freeder e3bc4c4107 Make debug mode print current configuration phase 2024-02-23 13:54:52 +00:00
Nassim Jahnke 71c84c8132 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
Upstream has released updates that appear 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:
9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent
258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor
ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD

CraftBukkit Changes:
98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire
a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent
5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class
76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor

Spigot Changes:
e9ec5485 Rebuild patches
f1b62e0c Rebuild patches
2024-02-23 14:37:33 +01:00
Shane Freeder 3ea95efdeb Do not access world state to see if we can see a Player
Thrown into the adventure patch because I don't see the justification of a patch existing
for something like this.
2024-02-22 16:23:15 +00:00
Nassim Jahnke 4939f87118 Add more ResourceLocation checks, some cleanup 2024-02-18 13:52:12 +01:00
Jason Penilla 351923d17e Run round-trip adventure codec tests with JSON, NBT, and Java ops. Use JavaOps for conversions. (#10031) 2024-02-17 16:58:56 -05:00
d95341e44a FluidState API (#9951)
* Add new FluidState API functionality
---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2024-02-17 15:44:03 -05:00
David MayrandJake Potrebic 1964b22439 Scoreboard objective number format api (#10036)
* feat: number format api

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: make each individual score customizable

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: fix incorrect descriptions

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use access transformers

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use adventure codecs

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* test: test for matching styles

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: convert number formats to interfaces

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add style conversion to adventure patch

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use paper adventure method in PaperScoreboardFormat

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: rename methods to avoid a method in records

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: check if objective is still registered

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: improve style conversion

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: modify how the getter behaves in score

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use fluent naming

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add spaces before the paper comments

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: styling changes

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: make constant final

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add methods for styled format instead of constants

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: remove incorrect getTrackedPlayers check

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add . at the end of sentences

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: explain null behaviour

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: mention score creation

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* rebase and fix javadoc comments

* remove server implementation defaults

* fix format for PaperScoreboardFormat

---------

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-17 12:22:00 -08:00
Emilia Kond 9a66f2b2e1 [ci skip] Fix javadoc mistake in PluginMeta (#10258)
"Schematic versioning" is not a real thing. The intended versioning
scheme is "semantic versioning". Introduced in #8108.
2024-02-17 11:37:55 -08:00
leguan a07d526698 [ci skip] Fix JavaDoc mistake in BlockPistonRetractEvent (#10250) 2024-02-17 11:15:15 -08:00
Jake Potrebic 7ccefdcd6c Fire entity knockback event for ownerless tnt (#7171) 2024-02-16 15:44:43 -08:00
Shane Freeder 7f85940143 Updated Upstream (Bukkit) (#10255)
Upstream has released updates that appear 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:
58ce1b0f Improve compatibility of new DamageSource API
2024-02-16 23:44:38 +01:00
Pedro 37df12143c Fix BlockState being set to null for damage events (#10252) 2024-02-15 10:05:50 +01:00
Nassim Jahnke 31699ae9a8 Updated Upstream (Bukkit/CraftBukkit) (#10242)
* Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear 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:
a6a9d2a4 Remove some old ApiStatus.Experimental annotations
be72314c SPIGOT-7300, PR-829: Add new DamageSource API providing enhanced information about entity damage
b252cf05 SPIGOT-7576, PR-970: Add methods in MushroomCow to change stew effects
b1c689bd PR-902: Add Server#isLoggingIPs to get log-ips configuration
08f86d1c PR-971: Add Player methods for client-side potion effects
2e3024a9 PR-963: Add API for in-world structures
a23292a7 SPIGOT-7530, PR-948: Improve Resource Pack API with new 1.20.3 functionality
1851857b SPIGOT-3071, PR-969: Add entity spawn method with spawn reason
cde4c52a SPIGOT-5553, PR-964: Add EntityKnockbackEvent

CraftBukkit Changes:
38fd4bd50 Fix accidentally renamed internal damage method
80f0ce4be SPIGOT-7300, PR-1180: Add new DamageSource API providing enhanced information about entity damage
7e43f3b16 SPIGOT-7581: Fix typo in BlockMushroom
ea14b7d90 SPIGOT-7576, PR-1347: Add methods in MushroomCow to change stew effects
4c687f243 PR-1259: Add Server#isLoggingIPs to get log-ips configuration
22a541a29 Improve support for per-world game rules
cb7dccce2 PR-1348: Add Player methods for client-side potion effects
b8d6109f0 PR-1335: Add API for in-world structures
4398a1b5b SPIGOT-7577: Make CraftWindCharge#explode discard the entity
e74107678 Fix Crafter maximum stack size
0bb0f4f6a SPIGOT-7530, PR-1314: Improve Resource Pack API with new 1.20.3 functionality
4949f556d SPIGOT-3071, PR-1345: Add entity spawn method with spawn reason
20ac73ca2 PR-1353: Fix Structure#place not working as documented with 0 palette
3c1b77871 SPIGOT-6911, PR-1349: Change max book length in CraftMetaBook
333701839 SPIGOT-7572: Bee nests generated without bees
f48f4174c SPIGOT-5553, PR-1336: Add EntityKnockbackEvent
2024-02-11 22:28:00 +01:00
Warrior cde5587e58 Add getChunkSnapshot includeLightData parameter (#10234) 2024-02-10 22:28:56 +01:00
Emilia Kond 4b58a85158 Fire BlockPreDispenseEvent for droppers (#10226) 2024-02-10 22:19:22 +01:00
Jake Potrebic e6a521514e Properly track the changed item from dispense events (#8658) 2024-02-10 22:17:24 +01:00
Jake Potrebic 2fa2d32ceb Fix possible StackOverflowError for some dispenser iteractions (#8524) 2024-02-10 21:17:40 +01:00
Lulu13022002 bf6e803c6c Fix WaterBottleSplashEvent not forwarding hit result (#10203) 2024-02-10 20:27:29 +01:00
Warrior 99bae594c8 Propagate failed to bind to port error (#10235) 2024-02-10 20:23:50 +01:00
Yannick LamprechtandJake Potrebic 581fb30a4c itemstack expose tooltip lines (#10185)
* Itemstack Tooltip API

* re-order methods so advanced is first

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-09 17:12:50 -08:00
Lulu13022002 97c01206bc Fix fox drops on death (#8862) 2024-02-09 16:07:10 -08:00
Tamion cbe62d91fb Add Conduit API (#10195) 2024-02-09 23:03:27 +01:00
Micah Rao 69b52b4d8e Check for server JARs in plugin directory (#10228) 2024-02-09 22:05:13 +01:00
Tamion 9c04729de1 Add Arrow/Stinger Removal Time API (#10193) 2024-02-09 21:56:13 +01:00
Moulberry 534659e97e Fix NotNull locales (#10216)
Two methods returning locales are annotated @NotNull, despite being able
to return null
2024-02-09 20:30:50 +00:00
Jake Potrebic 934cd77da8 Lifecycle Event System (#9629)
* registering stuff event system

* simply by removing a ton of unneeded generics

* separate RegistryEvent and RegistrarEvent

* add logic for removing hooks when a plugin is disabled

* cleanup more

* swap around the way things are registered

* block further hook registrations for JavaPlugin

* Slightly more extensible to support registry mod API

* rename some types

* more moving/renaming

* remove 'hook' name

* Rename to 'lifecycle'

* move more impls for the server

* add priorities

* added lock for bootstrap event registration

* slight refactor to allow 'register anywhere' event types

* Move event type list to server impl

* use builder pattern to create event handler configurations

* add some more javadocs

* fix some issues, slight refactors

* call predicate and method renames

* add owner aware events

* rebased and refactored owner aware events

* add single helper method for registering simple handler

* compile fixes

* check owner and fix generics on register helper

* javadoc fixes and a few type renames

* more javadoc fixes

* move service loader file to correct location

* rename to Monitorable and Prioritizable

* add invalidation system for events after running them

* block reloading plugins in certain situations

* update test plugin

* remove dummy events

* rebase
2024-02-09 12:12:01 -08:00
Nassim Jahnke 9e171ef8ff Improve tag parser handling, move hunks out of chunk system patch 2024-02-05 12:31:51 +01:00
Nassim Jahnke c5d168cef9 More provider source fixup 2024-02-02 12:44:09 +01:00
Nassim Jahnke 8bc5be8ba7 Add missing catch 2024-02-01 11:41:29 +01:00
Nassim Jahnke 7f856a1d1f Fix sleeping pos desync 2024-02-01 10:53:15 +01:00
Nassim Jahnke 87ce7c7209 Small refactor of Paper plugin context preparation 2024-02-01 10:51:29 +01:00
Lulu13022002 294347bee2 [ci skip] Cleanup events (#10202) 2024-02-01 10:15:57 +01:00
RowanandBjarne Koll b3c81089ae [ci skip] Fix incorrect documentation for BlockDropItemEvent (#10175)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-01-27 20:42:46 +01:00
Jake Potrebic 3841722fe1 Properly check if a loot table exists (#10190) 2024-01-27 20:21:18 +01:00
Warrior 0cc3a7ec6b Disable memory reserve allocating (#10180) 2024-01-27 20:06:03 +01:00
LuisandYannick Lamprecht b333831b70 Make spawn egg colours visible (#10158)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
2024-01-27 19:32:05 +01:00
Chase Henderson 4643b0d959 Shulker duplicate event (#10135) 2024-01-27 19:13:12 +01:00
Jake Potrebic ed130f1170 [ci skip] clarify javadocs for Block#getDrops (#10153) 2024-01-27 18:35:09 +01:00
Tamion 7f7d05a21c [ci skip] Remove IRC link from the README (#10194) 2024-01-27 13:11:43 +01:00
Nassim Jahnke 1ed50dade8 Fix javadoc errors, remove unused classes 2024-01-26 21:34:40 +01:00
Nassim Jahnke fe53b0e76f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
1d522878 PR-966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
cc01b745 PR-965: Add DragonBattle#setPreviouslyKilled
28e3702f SPIGOT-6921, PR-957: Add methods to remove all enchantments on an ItemStack
8872404e PR-961: Add BlockData#copyTo
4054cc7b PR-956: Add method to get an offline player's location

CraftBukkit Changes:
292ec79e0 SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
b44bf5aa8 SPIGOT-7575: SuspiciousStewMeta creates invalid PotionEffect data
161784713 PR-1340: Centralize the conversion from and to Minecraft / Bukkit registry items even more and add a test case for them
b93c5a30d PR-1338: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
fb973486c SPIGOT-7570: PrepareItemCraftEvent#isRepair() always returns false
c9c24535e PR-1337: Add DragonBattle#setPreviouslyKilled
c8b4da803 SPIGOT-6921, PR-1330: Add methods to remove all enchantments on an ItemStack
95bc1c4f5 PR-1333: Add BlockData#copyTo
36e2f9ce1 PR-1329: Add method to get an offline player's location

Spigot Changes:
c198da22 SPIGOT-7563: Update to latest release of bungeecord-chat
2024-01-26 20:19:17 +01:00
Nassim Jahnke bd2fd615ce [ci skip] Fixup a few bad comments 2024-01-26 19:41:41 +01:00
Nassim Jahnke b03f255532 Finish moving patches back and improving compilable state 2024-01-25 12:10:23 +01:00
Nassim Jahnke 1831240d1c [ci skip] Move chunk system patch back 2024-01-25 00:41:51 +01:00
Shane Freeder b700460999 Convert average tick value in the GUI to the correct granularity 2024-01-24 16:27:32 +00:00
Nassim Jahnke a4a08b7342 [ci skip] Move chunk system patch a bit back 2024-01-24 17:14:57 +01:00
Nassim Jahnke d405ff1255 [ci skip] Fixup last commit 2024-01-24 14:05:59 +01:00
Nassim Jahnke ad2cf68a7f [ci skip] Move chunk system patch back a bit 2024-01-24 13:42:24 +01:00
Nassim Jahnke 51bef80755 [ci skip] Remove removed patches 2024-01-24 11:55:36 +01:00
Nassim Jahnke 11645e3268 [ci skip] (Mostly) finish adding identifying patch comments 2024-01-24 11:45:17 +01:00
FireInstall 76da4bc683 Expose LootTable of DecoratedPot (#10023) 2024-01-23 15:57:17 -05:00
Jake Potrebic 24dc2bfc50 Add BlockStateMeta#clearBlockState (#10160) 2024-01-23 15:41:47 -05:00
1stGlitch 581b101180 Add world to Entity AddTo/RemoveFrom Events (#10183)
When a plugin listens to the EntityAddToWorld and EntityRemoveFromWorld events, I don't believe there is currently any method of directly obtaining which world the entity was actually added to/removed from. Using event.getEntity().getWorld() works in many cases, but not all. Specifically, when an entity is teleported from one world to another, the location of the entity is updated prior to the removal event being called. This means that when an entity goes through a nether/end portal or is teleported between worlds with a command, a plugin listening to the EntityRemoveFromWorldEvent has no way of determining which world the entity was actually removed from (without relying on other events).

To resolve this, I've added the world as a field in the events along with a getter to retrieve it. I also removed an unused import and made the documentation more clear on the event behaviour when chunks load/unload.
2024-01-23 15:17:14 -05:00
Nassim Jahnke c57d1aa245 Move diffs around to compile without later ones applied 2024-01-23 18:06:51 +01:00
Nassim Jahnke e66037960b [ci skip] Move some disruptive patches back 2024-01-23 15:57:42 +01:00
Nassim Jahnke 52619e7a21 [ci skip] Add more patch identifying comments 2024-01-23 14:39:23 +01:00
Nassim Jahnke 484d6bfb4e [ci skip] Move some disruptive patches back 2024-01-23 12:47:01 +01:00
Nassim Jahnke 25013d9970 [ci skip] Move some disruptive patches back 2024-01-22 21:13:10 +01:00
Nassim Jahnke 9eb0b38157 [ci skip] Add more patch identifying comments 2024-01-22 19:01:10 +01:00
Nassim Jahnke 684319f9c6 [ci skip] Add more patch identifying comments 2024-01-22 18:04:55 +01:00
Nassim Jahnke 27cabc19a0 [ci skip] Add more patch identifying comments 2024-01-21 19:59:34 +01:00
Nassim Jahnke d9df6bc5e6 [ci skip] Add more patch identifying comments, cleanup 2024-01-21 17:55:04 +01:00
Nassim Jahnke e9e0bc168d [ci skip] Add more identifying patch comments 2024-01-21 16:01:04 +01:00
Nassim Jahnke 98e6d20ebd [ci skip] Add more identifying patch comments 2024-01-21 13:38:50 +01:00
Nassim Jahnke f7dd304b1f [ci skip] Add more identifying patch comments 2024-01-21 12:11:43 +01:00
Nassim Jahnke 8d94596e30 [ci skip] Add more identifying patch comments 2024-01-20 23:41:26 +01:00
Shane FreederandCryptite b48d737759 Async world data IO saving (#10171)
Co-authored-by: Cryptite <cryptite@gmail.com>
2024-01-20 22:51:15 +01:00
Pantera (Mad_Daniel) 4a98986e28 Add back Reduce allocation of Vec3D by entity tracker patch (#10179) 2024-01-20 12:26:51 -05:00
Nassim Jahnke 68c3297947 [ci skip] Add more identifying patch comments 2024-01-20 14:25:44 +01:00
Lulu13022002 8e41ef4cc5 Add visual blockdata api for primed tnt (#10146) 2024-01-19 18:01:12 -05:00
Nassim Jahnke 42e88a8b7b [ci skip] Add more identifying patch comments 2024-01-19 22:13:42 +01:00
Nassim Jahnke 1c956abfbc [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 17:54:05 +01:00
Nassim Jahnke eeb6afc435 [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 15:30:44 +01:00
Nassim Jahnke cc693ce82b [ci skip] Add more identifying patch comments, merge related patches 2024-01-19 12:55:49 +01:00
Nassim Jahnke 106c67a811 [ci skip] Add more identifying patch comments 2024-01-18 22:00:40 +01:00
Shane Freeder f61ebdce91 Fix issue with kick event causes being passed improperly 2024-01-18 19:36:08 +00:00
Nassim Jahnke 3e20d3a275 [ci skip] Add more identifying patch comments 2024-01-18 18:57:15 +01:00
Nassim Jahnke 5e73c555bc [ci skip] Add more identifying patch comments 2024-01-18 15:56:25 +01:00
Nassim Jahnke 94807a1d2e [ci skip] Minor cleanup and patch merges 2024-01-16 19:27:39 +01:00
Nassim Jahnke ebf97bdfdd [ci skip] Add more patch identifying comments 2024-01-16 13:32:52 +01:00
Owen 848a3960f6 Add mob goal generator (#9980) 2024-01-15 14:36:10 -05:00
Nassim Jahnke 0ef59845bf [ci skip] Add more patch identifying comments, merge related patches 2024-01-15 12:50:31 +01:00
Nassim Jahnke f9fdedf2d7 [ci skip] Add more patch identifying comments, merge related patches 2024-01-14 17:04:39 +01:00
Nassim Jahnke 93a848c4b9 Readd missed line 2024-01-14 13:51:41 +01:00
Nassim Jahnke c151c956e0 Fixup AsyncPreLoginEvent patches
Fixes #10165
2024-01-14 13:47:09 +01:00
Jake Potrebic 8657cd91d7 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
Upstream has released updates that appear 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:
63c208dd Remove no longer used import
70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY
ae21f4ac PR-955: Add methods to place structures with block/entity transformers
e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value
b125516c Fix typo in RecipeChoice.ExactChoice docs
309497c1 Add EntityMountEvent and EntityDismount Event
2fd45ae3 Improve ItemFactory#enchantItem consistency
2b198268 PR-933: Define native persistent data types for lists

CraftBukkit Changes:
771182f70 PR-1327: Add methods to place structures with block/entity transformers
e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM
76931e8bd Add EntityMountEvent and EntityDismount Event
9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore
1462ebe85 Reformat Commodore.java
9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency
4e419c774 PR-1295: Define native persistent data types for lists
dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet
690278200 Only fetch an online UUID in online mode
1da8d9a53 Fire PreLogin events even in offline mode
2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation

Spigot Changes:
864e4acc Restore accidentally removed package-info.java
f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent
828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed
cdc4e035 Remove obsolete patch fetching correct mode UUIDs
49e36b8e Merge related BungeeCord patches
6e87b9ab Remove obsolete firing of PreLogin events in offline mode
5c76b183 Remove redundant patch dealing with exceptions in the crash reporter
3a2219d1 Remove redundant patch logging cause of unexpected exception
2024-01-14 10:46:04 +01:00
Nassim Jahnke 78fcb8e766 [ci skip] Update contributing guidelines to include identifying commit titles in comments (#10162) 2024-01-14 00:42:59 +01:00
Jake Potrebic 17275ffd68 [ci skip] add more comments & move 1 hunk to correct patch 2024-01-13 12:31:02 -08:00
Nassim Jahnke c0e4697dbd [ci skip] Add more patch identifying comments 2024-01-13 18:34:33 +01:00
Nassim Jahnke e84621a9d8 [ci skip] Add more patch identifying comments 2024-01-13 16:35:59 +01:00
Nassim Jahnke 8c8862f3a8 Also check for the actual character length in ResourceLocation validation 2024-01-12 23:33:43 +01:00
Nassim Jahnke a0ffb57745 [ci skip] Small cleanup to mc utils patch 2024-01-12 21:58:54 +01:00
Nassim Jahnke f28caff927 Limit ResourceLocation length to nbt string tag length 2024-01-12 19:33:17 +01:00
Jake Potrebic ec196207c2 Use a ConcurrentHashMap for enum mappings for BlockData (#10161)
This API should be thread-safe as there is no world state
2024-01-12 16:25:12 +00:00
Jake Potrebic a80d31b1bd Log command execution exceptions if debug=true (#10130) 2024-01-11 08:15:17 -08:00
Nassim Jahnke 07b956e3a3 Fix tests by disabling them 2024-01-06 19:13:45 +01:00
Nassim Jahnke f1c5f0198c [ci skip] Fix typo 2024-01-06 15:11:45 +01:00
Nassim Jahnke e46276eb71 Fixup NamespacedKey parsing 2024-01-06 15:07:59 +01:00
Nassim Jahnke 570cfb44d6 Validate missed resource location parsing 2024-01-06 09:51:49 +01:00
Jake Potrebic a58e29db99 Fix a borked update of 'Properly handle BlockBreakEvent#isDropItems' (#10134) 2024-01-05 10:07:43 +01:00
Warrior 25a99b12e8 Fix BlockDestroyEvents effectBlock not being set (#10131) 2024-01-05 01:09:04 +01:00
Jake Potrebic a93acc4275 Fix EntityChangePoseEvent being called during worldgen (#10120) 2024-01-04 12:55:01 -08:00
Jake Potrebic 8379027ee0 Fix cmd permission levels for command blocks (#7404) 2024-01-04 12:37:59 -08:00
Owen 19a620213f Fix experience & improvements to block events (#8067)
This is a lot but basically adds a method to disable the dropping of experience and drops experience by default.
This way things that require XP to be dropped manually (via modification), they can drop XP themselves when needed but without touching anywhere else that may drop xp.

It should be noted this causes breakNaturally() to now drop experience.
2024-01-04 15:18:59 -05:00
Nassim Jahnke 7eaff48d7c [ci skip] Replace some magic values with constant references 2024-01-04 14:38:26 +01:00
Nassim Jahnke b2a6d575dd Validate ResourceLocation in NBT reading 2024-01-04 13:55:17 +01:00
Bjarne Koll 259bc76026 Pass system properties to maven repo session (#10117)
The maven repository sessions used by the maven library loader requires
the java.version property to later evaluate the active profiles of
dependencies when downloading them during the plugin loader logic.

This commit fixes this by passing all system properties as a hopefully
future-proof way to provide the required data to said session.
2024-01-04 11:13:12 +00:00
Jake Potrebic ae001ae6ee Fix untrack event not being called for all 'untracks' (#10110) 2024-01-03 20:57:49 -08:00
Jake Potrebic 1fa48d140c include relative flags in PlayerTeleportEvent (#8190) 2024-01-02 20:42:26 +01:00
OwenandBjarne Koll 509876d26f Keep fully frozen entities fully activated (#10103)
* Keep fully frozen entities fully activated

* Rebase and switch to isFreezing

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-01-02 11:08:34 -08:00
Jake Potrebic 692db0c81d fix CustomModelData being removed (#10113) 2024-01-02 19:51:09 +01:00
Jake Potrebic 816bacc2c3 Call EntityChangeBlockEvent for cake eating (#10105) 2024-01-02 19:45:36 +01:00
Jake Potrebic 58e120b77c [ci skip] Remove extraneous diff added in 1.20.3 update (#10101) 2024-01-02 10:29:53 -08:00
Jake Potrebic 983377b55a Correctly check if bucket dispenses will succeed for event (#10109) 2024-01-02 09:14:42 -08:00
Spottedleaf 1281f4f552 Make region/lock shift accessors per world
This has been done to ensure that the shifts are not used
until the world object is being constructed, which is before
the global configuration is initialised. There also isn't any
reason for these shifts to be global anyways.
2023-12-30 15:45:24 -08:00
Jake Potrebic 0ae58c09a1 cleanup player death event adventure logic (#10095)
There was a TODO left there regarding the translated death
message being used by plugins to identify the cause of death. This
should be mitigated now because the LegacyComponentSerializer default
implemenation uses our custom flattener which renders vanilla
translatable components to their English representation.
2023-12-29 12:28:58 -08:00
Jake Potrebic 3484ae987a Call entity_die game event after event cancel check (#10096) 2023-12-29 11:57:32 -08:00
caramel e56e53f83a Fix some component bugs in login disconnect packet (#10090) 2023-12-29 20:51:52 +01:00
caramel 5e978d3a3d Fix Folia scheduler tasks not canceling when plugin disable (#10091) 2023-12-29 01:59:19 +01:00
Jake Potrebic e4ab50de34 Properly disallow async Player#chat (#8123)
Clarify asynchronous status of AsyncChatEvent
2023-12-28 16:50:06 -08:00
Tamion 2951732742 Add HiddenPotionEffect API (#9910) 2023-12-28 19:38:44 -05:00
Cryptite b2ffb1b02d Add PlayerShieldDisableEvent (#9177) 2023-12-29 01:27:34 +01:00
Jake Potrebic 2c3ccb80f0 Add drops to shear events (#5678) 2023-12-28 14:41:07 -08:00
Jake Potrebic 3c0d6aaed9 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10085)
Upstream has released updates that appear 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:
0c7aedbc SPIGOT-7554, PR-954: Add DecoratedPotInventory

CraftBukkit Changes:
53ebb05e3 SPIGOT-7554, PR-1323: Add DecoratedPotInventory
33a2d8773 Ensure that PlayerMoveEvent is always fired where applicable
7df18510f SPIGOT-7555: Don't cast ItemFlags to byte
19aec59ea Use provided case for non-existent OfflinePlayers

Spigot Changes:
e7ce55a3 Remove obsolete PlayerMoveEvent improvements
3e5e22c0 Remove obsolete lowercasing of non existent OfflinePlayer names
2023-12-28 12:47:57 -08:00
Jake Potrebic 8221b085f9 Fix global sound event gamerule not being respected (#8727) 2023-12-27 16:33:05 -08:00
Md5Lukas c081104395 Add experience points api (#9688) 2023-12-28 00:49:45 +01:00
Alex 88d28d6bdd Fix long loading screen when refreshing skins (#10026)
Send `ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START` when refreshing players after
player profile changes.
2023-12-28 00:22:44 +01:00
Jake Potrebic a401585cfa Fix campfire recipes not always outputting full result (#8754) 2023-12-27 15:02:49 -08:00
Jake Potrebic d1f507fc0e Don't fire 2 game events for certain cauldron interactions (#8904) 2023-12-27 14:32:39 -08:00
Jake Potrebic 0d6a0c3b28 Fix command block async message (again) (#10082) 2023-12-27 10:30:15 +01:00
Owen dc621507f5 Catch async usage of playsound (#10021) 2023-12-26 15:00:21 -05:00
Jake Potrebic f483b38596 fix NPE on EntityTeleportEvent getTo (#10016) 2023-12-26 11:22:41 -08:00
Warrior 4fdda9e583 Keep newlines in outdated client/server message (#10042) 2023-12-26 14:02:22 -05:00
Jake Potrebic c215ce1858 [ci skip] cleanup patch diff from last commit 2023-12-25 16:47:06 -08:00
Nassim Jahnke e035fd7034 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
cc9aa21a SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
f23325b6 Add API for per-world simulation distances
26e1774e Add API for per-world view distances
0b541e60 Add PlayerLoginEvent#getRealAddress
5f027d2d PR-949: Add Vector#fromJOML() overloads for read-only vector types

CraftBukkit Changes:
bcf56171a PR-1321: Clean up some stuff which got missed during previous PRs
7f833a2d1 SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
752aac669 Implement APIs for per world view and simulation distances
57d7ef433 Preserve empty enchantment tags for glow effect
465ec3fb4 Remove connected check on setScoreboard
f90ce621e Use one PermissibleBase for all command blocks
5876cca44 SPIGOT-7550: Fix creation of Arrow instances
f03fc3aa3 SPIGOT-7549: ServerTickManager#setTickRate incorrect Precondition
9d7f49b01 SPIGOT-7548: Fix wrong spawn location for experience orb and dropped item

Spigot Changes:
ed9ba9a4 Drop no longer required patch ignoring -o option
86b5dd6a SPIGOT-7546: Fix hardcoded check for outdated client message
aa7cde7a Remove obsolete APIs for per world view and simulation distances
6dff577e Remove obsolete patch preserving empty `ench` tags
a3bf95b8 Remove obsolete PlayerLoginEvent#getRealAddress
1b02f5d6 Remove obsolete connected check on setScoreboard patch
acf717eb Remove obsolete command block PermissibleBase patch
053fa2a9 Remove redundant patch dealing with null tile entities
2023-12-26 00:18:13 +01:00
Nassim Jahnke 61768e08e7 [ci skip] Remove no longer needed mappings change 2023-12-25 19:15:48 +01:00
Nassim Jahnke 1cda66e395 Hotfix Entity isInRain reobf issue
Caused by upstream making the method public, which then causes an accidental override from an unrelated method
Fixes #10078
2023-12-25 18:37:20 +01:00
EpicPlayerA10 ff7b9b0380 Increase default custom payload channel size limit (#10006) 2023-12-25 12:01:18 +01:00
Jake Potrebic 4adca3d7a3 Update to adventure 4.15 (#10045) 2023-12-25 11:51:44 +01:00
Jake Potrebic 49f9f6f2cd Add Registry#getKey (#10066)
Some types that have registries support existing without
being in a registry and therefore have no key. This is part
one of supporting that, adding a Registry#getKey(Object) method
to be able to get the key for an object so we can remove Keyed
from such objects.

This also deprecates Keyed#getKey on TrimMaterial and TrimPattern
as these are the 2 offending types currently in the api.
2023-12-23 13:16:27 -08:00
Jake Potrebic e7e1c8a832 Fix and add new scoreboard API (#10037) 2023-12-23 11:53:07 -08:00
Jake Potrebic 1e7dd72f15 Remove 'fix Vanilla Minecart speed' patch (#10068)
The game uses 0.95d now
2023-12-22 17:44:36 -08:00
Jake Potrebic b4c9e7e5d4 add missing Experimental annotations (#10012) 2023-12-21 13:13:05 -08:00
Jake Potrebic d11a58802a Remove duplicate code in chunk tick iteration (#10056) 2023-12-21 09:15:00 -08:00
Jake Potrebic 45e01a2a78 Use correct max stack size in crafter (#10057) 2023-12-21 09:10:28 -08:00
Lulu13022002 086ca616d8 Fix world border edge collision (#10053)
The collision shape of the border is determined by flooring the min values and ceiling the max values, so the isCollidingWithBorder() function should mirror such behavior.
2023-12-19 21:31:07 -08:00
Jason Penilla 5385b21fd3 [ci skip] Make test results viewable in-browser and downloadable (#10055)
* Post test results

* empty commit

* Make a test fail

* Add missing check

* Disable commenting

* Revert "Make a test fail"

This reverts commit d919653c2b38a3afb74d28e5462685f7ec54b16a.

* remove commenting permission
2023-12-19 19:33:46 -08:00
Jake Potrebic 8c007d90a5 properly read and store sus effect duration (#10050) 2023-12-19 13:31:49 -08:00
Jake Potrebic 47b2c186d7 Don't fire the drop event on player deaths (#10046) 2023-12-18 20:57:49 -08:00
Spottedleaf 0b952981e6 Make worldborder collisions consistent with Vanilla
Vanilla now requires the use of WorldBorder#isInsideCloseToBorder
to consider a border collision
2023-12-18 17:12:55 -08:00
Jake Potrebic e3140fb70e hotfix spawning item/xp in wrong spot 2023-12-17 20:23:39 -08:00
Jake Potrebic ff26d54ee0 send sound and particle packets immediately even if off main (#10033) 2023-12-17 11:39:40 -08:00
Jake Potrebic de04cbced5 Updated Upstream (Bukkit/CraftBukkit) (#10034)
Upstream has released updates that appear 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:
f29cb801 Separate checkstyle-suppressions file is not required
86f99bbe SPIGOT-7540, PR-946: Add ServerTickManager API
d4119585 SPIGOT-6903, PR-945: Add BlockData#getMapColor
b7a2ed41 SPIGOT-7530, PR-947: Add Player#removeResourcePack
9dd56255 SPIGOT-7527, PR-944: Add WindCharge#explode()
994a6163 Attempt upgrade of resolver libraries

CraftBukkit Changes:
b3b43a6ad Add Checkstyle check for unused imports
13fb3358e SPIGOT-7544: Scoreboard#getEntries() doesn't get entries but class names
3dda99c06 SPIGOT-7540, PR-1312: Add ServerTickManager API
2ab4508c0 SPIGOT-6903, PR-1311: Add BlockData#getMapColor
1dbdbbed4 PR-1238: Remove unnecessary sign ticking
659728d2a MC-264285, SPIGOT-7439, PR-1237: Fix unbreakable flint and steel is completely consumed while igniting creeper
e37e29ce0 Increase outdated build delay
c00438b39 SPIGOT-7530, PR-1313: Add Player#removeResourcePack
492dd80ce SPIGOT-7527, PR-1310: Add WindCharge#explode()
e11fbb9d7 Upgrade MySQL driver
9f3a0bd2a Attempt upgrade of resolver libraries
60d16d7ca PR-1306: Centralize Bukkit and Minecraft entity conversion

Spigot Changes:
06d602e7 Rebuild patches
2023-12-16 18:09:28 -08:00
Spottedleaf f1820dc80a Fix incorrect border collision detection
The epsilon used was in the opposite direction, which would cause
the getCollisions method to incorrectly return it for when players
were exactly on the border but not colliding. To bring it in-line
with the rest of the collision code, the collision must be into
the border by +EPSILON.

Fixes https://github.com/PaperMC/Paper/issues/9859
2023-12-14 18:57:17 -08:00
Jason Penilla 7e15d977ec Remove no longer needed diff from adventure patch 2023-12-12 13:44:09 -08:00
booky10 dc3ef2ae0f Fix vanilla components not being translated (#9893)
* Fix vanilla components not being translated

* Add nullability check, simplify adventure component encoding

Changes suggested by @jpenilla
2023-12-12 13:40:33 -08:00
Jason Penilla 0fadaed078 [ci skip] move decomp fixes to correct patch 2023-12-11 22:08:51 -08:00
Jake PotrebicandJason Penilla 7c2dc4b342 Use Codecs for adventure Component conversions & network serialization (#10014)
* finish implementing all adventure components in codecs

* add some initial tests

* Add round trip tests for text and translatable components

* Add more round trip test data (score component is failing)

* Add more round trip test data

* Fix SCORE_COMPONENT_MAP_CODEC

* Improve test failure messages

* Add failure cases

* Add a couple more test data

* Make use of AdventureCodecs

* Update patches after rebase

* Squash changes into adventure patch

* Fix AT formatting

* update comment

---------

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-12-11 22:02:06 -08:00
Jason Penilla 82f9280ae4 Fix deprecated bungee APIs still serializing to JSON in packets (#10028) 2023-12-11 20:24:48 -08:00
Owen 28abbaa7bd Catch setEnabled to ensure classloader is properly unloaded (#10020) 2023-12-10 20:02:26 -05:00
Jake Potrebic dd16335e40 fix NPE when iterating over default drops (#10017) 2023-12-10 10:33:36 -08:00
Jake Potrebic 3434a6fc66 Update key gen for 1.20.4 (#10015) 2023-12-10 10:25:01 -08:00
Jake Potrebic 166761f29f Update and clean up api dependencies (#10018) 2023-12-10 10:04:19 -08:00
caramel bcbe5dcd78 Fix PlayerInteractEvent#getClickedBlock() returning wrong block in adventure mode (#10019) 2023-12-10 11:02:24 +01:00
Nassim Jahnke b42a1da873 Use uuid param in setResourcePack 2023-12-09 13:53:08 +01:00
Jake Potrebic abfb6b219b more work on adventure codecs 2023-12-08 21:48:02 -08:00
Jake Potrebic 9051fc347c remove redundant patch 2023-12-08 15:14:42 -08:00
Jake Potrebic f17622cc3d more cleanup and resource pack api fixes 2023-12-08 15:13:02 -08:00
Jake Potrebic 7606e6da39 fixup tests and add missing API detected by those tests 2023-12-08 12:07:56 -08:00
Lulu13022002 8d8eb3bdf6 optimise explosion damage further
and use the right entity for the dragon part damage
2023-12-08 20:47:27 +01:00
Jake Potrebic 2f92d4e00e Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
01bb6ba7 PR-936: Add new PersistentDataContainer methods and clean up docs
bc145b90 PR-940: Create registry for banner pattern and cat type

CraftBukkit Changes:
cb2ea54de SPIGOT-7440, PR-1292: Fire EntityTeleportEvent for end gateways
4fea66e44 PR-1299: Add new PersistentDataContainer methods and clean up docs
b483a20db PR-1303: Create registry for banner pattern and cat type
4642dd526 SPIGOT-7535: Fix maps not having an ID and also call MapInitializeEvent in more places
2023-12-08 11:00:39 -08:00
Jason Penilla f9edc4b1cd Update paperweight to 1.5.11 2023-12-08 11:12:59 -07:00
Jason Penilla 930a24f965 1.20.4 2023-12-07 13:27:28 -07:00
Owen1212055 ff72782888 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
cdfe62e4 Update to Minecraft 1.20.4

CraftBukkit Changes:
51eea725f Update to Minecraft 1.20.4

Spigot Changes:
ce0f71e4 Update to Minecraft 1.20.4
2023-12-07 15:15:25 -05:00
Jake Potrebic d0476837a5 more adventure codec stuff
and fix tests
2023-12-07 11:14:29 -08:00
Noah van der Aa 9223f05a40 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
c9cb08551 SPIGOT-7536: Using Crafter crashes server
2023-12-07 13:03:14 +01:00
Jake Potrebic 6577db6dd6 cleanup Optimize MappedRegistry patch 2023-12-06 22:41:13 -08:00
Jason Penilla 6c4c13df44 Update adventure 2023-12-06 21:24:16 -07:00
Owen1212055 9227a9648c Clean up username validation logic 2023-12-06 20:26:58 -05:00
Owen1212055 b277feb448 Hotfix DefaultDispenseItemBehavior#spawnItem 2023-12-06 19:45:28 -05:00
Jason Penilla 3b94cc3546 Clean up settings script 2023-12-06 15:57:51 -07:00
Jason Penilla ada77b3a3b Wait on stream redirect futures (update helper task) 2023-12-06 15:32:08 -07:00
Nassim Jahnke 6bafacfb14 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
9a294519 SPIGOT-7533, 943: Add missing Poses for 1.20.3
be2884c4 Add unique ID to PlayerResourcePackStatusEvent
d9c1eb83 Add additional @MinecraftExperimental annotations
68f5bb6a SPIGOT-7526: Add missing PlayerResourcePackStatusEvent statuses

CraftBukkit Changes:
368c48be1 Fix formatting issue in previous commit
da8f91f31 SPIGOT-7534: Error when chunk with decorated pot trying to save
d20c9291a SPIGOT-7532: Entity#isValid() returns false after server restart
ec1fa2ead PR-1309: Add tests for Bukkit Pose
5a7080b58 Add unique ID to PlayerResourcePackStatusEvent
0fd734950 SPIGOT-7528: Fix certain custom shaped recipes
2023-12-06 23:01:51 +01:00
Nassim Jahnke b1f94a84e8 Update cb package version 2023-12-06 22:51:50 +01:00
Nassim Jahnke 772d430cd1 Fix timings check with tick freezes 2023-12-06 22:40:08 +01:00
Nassim Jahnke 896e29bba7 Inline imports in loottable patch 2023-12-06 22:22:22 +01:00
Nassim Jahnke d1dbe0020d Fix lootable patch, cb crash due to unimplemented methods 2023-12-06 22:17:56 +01:00
Jason Penilla 0addaa1cf2 Temp adventure update 2023-12-06 13:53:16 -07:00
Nassim Jahnke c833571526 Make it compile again 2023-12-06 21:28:59 +01:00
Owen1212055 a2b6275487 Add missing removed patches 2023-12-06 13:26:04 -07:00
Jason Penilla f10b36d7fc wait for second pass apply 2023-12-06 13:26:04 -07:00
Nassim Jahnke 9bc67abccf Fixup 2023-12-06 21:19:37 +01:00
Owen1212055 ff2946e04b Fix some missing diffs 2023-12-06 15:11:00 -05:00
Owen1212055 d3f1bc04b4 Remove some patches 2023-12-06 15:09:14 -05:00
Nassim Jahnke b32a34c71d Add missing timings stop 2023-12-06 21:04:01 +01:00
Nassim Jahnke 03541446b2 Drop old packs in setResourcePack 2023-12-06 20:46:49 +01:00
Nassim Jahnke c2b70338fc It compiles 2023-12-06 20:40:37 +01:00
Nassim Jahnke 1d028f3853 More compile fixes 2023-12-06 20:10:59 +01:00
Jason Penilla 05148728de build script updates 2023-12-06 11:48:37 -07:00
Jake Potrebic deb02722b2 more compile fixes 2023-12-06 10:36:49 -08:00
Lulu13022002 6b272a65e7 remove old diff 2023-12-06 19:29:36 +01:00
Noah van der Aa 5999d669ac More compile fixes 2023-12-06 19:21:41 +01:00
Nassim Jahnke 67f1688c30 Toggle updatingMinecraft property 2023-12-06 19:21:09 +01:00
Nassim Jahnke b8f9558745 Apply all patches 2023-12-06 19:19:19 +01:00
Jake Potrebic a364b7e88b fix more compile issues 2023-12-06 10:07:47 -08:00
Jake Potrebic 0dee538a62 Upstream blocked Player#remove so our patch needed to be refactored 2023-12-06 09:54:52 -08:00
Jake Potrebic 6c4efc92be fix mismatched bracket in game packet listener 2023-12-06 09:47:45 -08:00
Bjarne Koll 13b92ad487 Make things explodes via patches 2023-12-06 18:33:52 +01:00
Bjarne Koll 855a8196cf Fix custom potion mixes patch 2023-12-06 17:40:36 +01:00
Owen1212055 9546b9c587 Patches!!! MORE MORE MORE MOOOOORE 2023-12-06 11:34:54 -05:00
Owen1212055 cd61b5d98e Patches!!! MORE 2023-12-06 11:21:56 -05:00
Owen1212055 6bf2ebf200 Patches!!! (2) 2023-12-06 11:00:26 -05:00
Owen1212055 25dc4afafa Patches!!! 2023-12-06 10:17:00 -05:00
Jason Penilla 46be245976 add description to helper 2023-12-05 21:59:52 -07:00
Jake Potrebic cc78c7f5f5 fix serializing TextColor with name 2023-12-05 20:56:02 -08:00
Jason Penilla 29e137669e p a t c h e s 2023-12-05 21:49:31 -07:00
Jason Penilla 2053d6ace7 Improve update helper task 2023-12-05 21:46:41 -07:00
Jason Penilla fc12258f24 more patch 2023-12-05 20:57:46 -07:00
Jason Penilla c7a463a736 Add update helper task 2023-12-05 20:35:33 -07:00
Jason Penilla 723c05e7fe some patches :D 2023-12-05 20:34:04 -07:00
Jason Penilla 5513f8a795 patches ... 2023-12-05 20:00:14 -07:00
Jason Penilla bdbdca8a56 Bump Gradle wrapper to 8.5 2023-12-05 17:58:17 -07:00
Jake Potrebic ad99d4568b initial work on native Adventure codecs 2023-12-05 16:49:11 -08:00
Jason Penilla 6e9a238a8c some more patch 2023-12-05 15:55:31 -07:00
Jason Penilla 7a59fd38d4 patches up to anti x ray 2023-12-05 15:32:41 -07:00
Jason Penilla 9d9fcf7e62 fix timings patch field use 2023-12-05 15:25:25 -07:00
Jason Penilla 1a33343012 some more patches 2023-12-05 15:21:44 -07:00
Jason Penilla a30aad98f7 some patches 2023-12-05 15:12:48 -07:00
Jake Potrebic c3f3edea07 port UnknownCommandEvent patch 2023-12-05 13:51:34 -08:00
Jason Penilla b89fff0490 Update generated API 2023-12-05 14:36:33 -07:00
Jason Penilla dfac4f9df2 patches 2023-12-05 14:34:01 -07:00
Jason Penilla fad3fa9bde Update loot table and other patches 2023-12-05 14:20:44 -07:00
Nassim Jahnke 2a9a9c4cf0 Remove unnecessary import 2023-12-05 20:56:22 +01:00
Nassim Jahnke 2efd9bb99f More more more work 2023-12-05 20:54:55 +01:00
Nassim Jahnke d7fc0c5ab2 More more work 2023-12-05 20:39:26 +01:00
Nassim Jahnke 603b32976b More work 2023-12-05 20:14:54 +01:00
Nassim Jahnke 9b56221762 Adventure (kind of) 2023-12-05 19:38:29 +01:00
Nassim Jahnke 8e8d6aeeb0 Finish API 2023-12-05 18:33:18 +01:00
Nassim Jahnke 2a1ace0cf2 Prepare for 1.20.3 dev 2023-12-05 18:20:55 +01:00
Jake Potrebic 931781c220 [ci skip] rebuild patches 2023-12-03 10:09:54 -08:00
Owen 9271ee7643 Dont resend blocks on interactions (#9413)
In general, the client now has an acknowledgment system that will cause block changes made by the client to be reverted correctly.

Essentially:

The client enters a "prediction" stage, where any block changes made will have its old blockstate captured (this is referred to as "server state").
If you update blocks during this stage, the client will update this captured server state as long as they're still currently predicting.
After prediction is done (via an ack packet) all captured blockstates are reverted to their captured server state.
This means that if the server actually updated a block and send a block update packet, it's correctly set, while if a block wasn't updated on the server but WAS updated on the client (server state wasn't updated), that change will be reverted.

It should be noted that this system does not yet support block entities, so those still need to be resynced when needed.

I discovered this when noticing that blocks broken outside of the player's valid interaction distance are still properly reverted, even though the server doesn't send any block updates, only an ack packet.
2023-12-02 22:41:35 -05:00
Jake Potrebic 8e061ce9c8 Add Structure check API (#9062) 2023-12-02 18:11:57 -08:00
Owen 5cbd5352b4 Fix Mushroom cow stew api (#9934) 2023-12-02 17:54:58 -08:00
Jake Potrebic 37bee09e3d Restore vanilla entity drops behavior (#7650) 2023-12-02 17:35:10 -08:00
MrPowerGamerBR ffa4115239 Configurable Dry and Wet Farmland Tick Rates (#9968)
* Configurable Dry and Wet Farm Land Nearby Water Tick Rates

* Rebase and squash

---------
2023-12-02 17:00:17 -08:00
hyper1423 40872ece07 Fix CraftMetaItem#addAttributeModifier duplication check (#9995) 2023-12-03 01:59:13 +01:00
Jake Potrebic 3766afadd5 [ci skip] Add mention of FQ imports (#9994) 2023-12-02 22:52:14 +01:00
Tamion 977a729eb0 [ci skip] Correct Windows requiring path to gradlew (#9976)
* [ci skip] Correct Windows requiring path to gradlew

* Update CONTRIBUTING.md
2023-12-02 13:32:46 -08:00
MrPowerGamerBR 8bda1f72a5 Remove unnecessary durability check in ItemStack#isSimilar (#9979)
* Optimize "ItemStack#isSimilar(...)" by removing the unnecessary durability check

* Change patch name and add a better commit message
2023-12-02 13:31:25 -08:00
Jake Potrebic 2184fbca00 Log correct recipes and advancement count on server start (#9978) 2023-12-02 13:17:35 -08:00
waterlily1andschwaa96 9993eb9d16 Updates documentation in EntityEquipment.java (#9992)
* Updates documentation in EntityEquopment.java to reflect behavior mentioned in issue #9867

* rebase and squash patches

---------

Co-authored-by: schwaa96 <schwaa96@mi.fu-berlin.de>
2023-12-02 12:29:47 -08:00
Jason Penilla 2182d47792 Update mapping-io (#9975) 2023-11-28 15:18:21 -07:00
Jake Potrebic 4d111a32bb Un-experimentalize Entity TP APIs (#9964) 2023-11-28 11:40:25 -08:00
Jake Potrebic b37bbcfd98 Use ? super in Consumer/Predicate API (#9939) 2023-11-25 15:03:02 -08:00
Gijs de Jong f9938d3949 Fix plugin bootstrap dependency tree population (#9963)
This patch fixes a bug where the dependency tree used for classpath joining,
wasn't built using the bootstrap dependencies, for plugin bootstrappers.
2023-11-25 17:57:12 -05:00
Jake Potrebic 0b20f94297 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9953)
Upstream has released updates that appear 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:
96340858 PR-938: Various Sound API improvements
cbfe0ff0 PR-937: Minor improvements to World#rayTrace documentation
e979ee95 PR-935: Change Consumer and Predicates to super
27ae46dc SPIGOT-3641, SPIGOT-7479, PR-931: Add missing values to EntityEffect
0616ec8b Add eclipse .factorypath file to .gitignore

CraftBukkit Changes:
8e162d008 PR-1301: Various Sound API improvements
eeb7dfc2d SPIGOT-7520: Attribute LootTableSeed missing for generated containers with attached LootTable
d433f086d PR-1297: Change Consumer and Predicates to super
864f616da SPIGOT-7518: Fix NullPointerException when calling Block#applyBoneMeal()
5a2d905af Add eclipse .factorypath file to .gitignore
7c6bf15d4 Fix SkullMeta configuration serialization / deserialization with note block sound

Spigot Changes:
7de1049b Rebuild patches
2023-11-25 14:34:42 -08:00
Jake Potrebic 8eac3e1b93 Don't fire EntityPotionEffectEvent during worldgen (#9965) 2023-11-25 14:18:37 -08:00
Warrior 8280211e52 Fix yaw being ignored for first spawn pos (#9959) 2023-11-25 14:09:26 -08:00
MrPowerGamerBR faa2f475b0 Lazily create LootContext for criterions (#9969)
For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate

To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance
2023-11-25 17:01:26 -05:00
TonytheMacaroni 334b2f20db Fix max nearby entities class check (#9967) 2023-11-25 16:48:32 -05:00
Shane Freeder ed753d34d2 Re-add missing vanilla safeMode arg 2023-11-25 09:49:48 +00:00
Jake Potrebic 96d5e6ca48 Code Generation for TypedKeys (#9233)
Currently includes generated key holder classes for types
used in the Registry Modification API
2023-11-22 20:56:28 -08:00
Jason Penilla e1cd9e59e5 Update paperweight to 1.5.10 and Gradle to 8.4 (#9957) 2023-11-22 06:27:50 +01:00
Tamion eda3d537d6 [ci skip] Improve PlayerChatEvent Deprecation Message (#9956) 2023-11-22 05:46:51 +01:00
Isaac - The456 250388defe add getAdvancementProgress() to PlayerAdvancementCriterionGrantEvent (#9865)
this allows for simpler checks for if an advancement would be given to a player,
and denying it (as the advancement grant event is non-cancelable)
2023-11-18 20:18:48 -05:00
booky10 86117967db Fix missing event call for entity teleport API (#9937)
* Fix missing event call for entity teleport API

Previously a plugin couldn't cancel or modify an entity-teleport from another plugin.

* rebase
2023-11-18 20:05:34 -05:00
TonytheMacaroni 581c7434be Add API to retrieve an attribute modifier from a UUID (#9924)
* Add attribute modifier from UUID API

* Add method to remove by UUID

* Add overload for UnmodifiableAttributeInstance, better precondition messages

* rebase
2023-11-18 19:55:57 -05:00
Jake Potrebic 39dee1ab52 More paper config cleanup (#9938)
Also adds a warning and error message if a newer config version
was found signaling a downgrade.
2023-11-18 16:29:14 -08:00
Jake PotrebicandOwen1212055 e5274eeac9 Fix spawners checking max nearby entities with correct type (#8945)
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-11-18 15:59:12 -08:00
Bjarne Koll 0a8c873722 Call LivingEntity#onItemPickup before mutation (#9948)
The existing EntityPickupItemEvent fixes patch moves the call to LivingEntity#onItemPickup for piglins after the respective EntityPickupItemEvent calls, which is correct.
However the patch moved the call so far down the line that the existing logic already mutated the picked up item entity, leading to faulty state being passed to the onItemPickup method.

To prevent logic in LivingEntity#onItemPickup to read from an ItemEntity that was already mutated, this commit moves the calls prior to the two respective mutations (either gold_nugget or rest).

This was chosen above taking a copy of the original item and restoring state later on to avoid a full item stack clone.
2023-11-17 07:43:25 +01:00
SoSeDiK ce7f068095 Correct typo in javadoc (#9944) 2023-11-13 19:25:46 +01:00
Jake Potrebic f186318a91 Run the chat callback on the main thread as expected (#9935) 2023-11-11 15:33:19 -08:00
Jake Potrebic a506b48daa Fix several issues with EntityBreedEvent (#8677)
Upstream did not account for different hands when storing
the breed item for later use in the event. Also they only
stored a reference to the stack, not a copy so if the stack
changed after love mode was started, the breed item in the event
also changed. Also in several places, the breed item was stored after
it was decreased by one to consume the item.
2023-11-11 15:23:02 -08:00
Jake Potrebic aee3830763 Deprecate Material#isInteractable (#9216) 2023-11-11 17:21:22 -05:00
booky10 9548629853 Add hand to fish event for all player interactions (#9929) 2023-11-11 23:00:45 +01:00
Jake Potrebic 531ef27e89 Use ApiStatus.Internal instead of Deprecated (#9042)
Mainly correctly marks a lot of still used "magic values"
as Internal instead of "Deprecated".
2023-11-11 13:52:32 -08:00
booky10 9ee60eca7d Add aggressive mob API (#9838) 2023-11-11 16:17:36 -05:00
Owen dd47ec6fe2 Add Entity Movement Direction API (#7085)
This allows you to get player movement when riding vehicles, etc.
2023-11-11 16:04:34 -05:00
Jake Potrebic d8847bc1f3 Updated Upstream (Bukkit/CraftBukkit) (#9922)
Upstream has released updates that appear 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:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items

CraftBukkit Changes:
c8feb0629 PR-1291: Improve precondition message in Entity#playEffect
482c56a00 PR-1285: Add PlayerRecipeBookSettingsChangeEvent
cdf798800 PR-1290: Add methods to get/set evoker fang attack delay
2c1b5f78f SPIGOT-7514, PR-1289: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
6aa644ae9 PR-992: Add API to get full result of crafting items
ffb1319bc PR-1287: Fix scoreboards not updating in Player#setStatistic
2023-11-11 12:25:45 -08:00
Luis 63e77b531d Add Enchantment cost API (#9856)
Cost is a property of individual enchantments, and is used by vanilla in combination with environmental aspects like tool enchantability and bookshelf count to determine the final cost of an enchantment as shown in an enchanting table.

Having access to the base cost of an enchantment using these vanilla methods can allow plugin developers to determine the "value" of an enchantment, and use it in custom logic where needed. I came across this recently when trying to assign an economic value to enchantments during tool repairing, and noticed these values don't seem to be obtainable under the current API.
2023-11-11 15:09:48 -05:00
Tamion 6675d13b31 Fix strikeLightningEffect powers lightning rods & clears copper (#9780)
* Fix strikeLightningEffect powers lightning rods and clears copper

* Fixed vanilla behavior break

* rebase

* revert spigot cleanup and remove setter

* better fix for behaviour break

* rebase and clean

* fix
2023-11-11 12:09:14 -08:00
Jake Potrebic c95bc5f86d Don't unpack loot table for TEs not in world (#9918)
Fixed by 23w44a/1.20.3
2023-11-11 11:23:12 -08:00
Shane Freeder 4675152f49 Don't leave the NearbyPlayers tracker in an entirely busted state on double-add detection 2023-11-05 22:15:38 +00:00
Jason Penilla 274e54ba58 Bump tiny-remapper for Java 21 support (#9902) 2023-11-04 20:33:04 -07:00
Layla Silbernberg / LadySilver47 8cafc07297 Added missing enchantables to material tags (#9888) 2023-11-05 00:37:51 +01:00
Tamion e289accb03 Add more API to LingeringPotionSplashEvent (#9901)
* Add createAreaEffectCloud API

* Add missing NotNull

* Add missing Paper comments

* Better solution

* Better naming

* New patch and rename

* rename patch
2023-11-04 16:24:06 -07:00
NonSwag 2553f30153 fix secure profile with proxy online mode (#9700) 2023-11-05 00:12:47 +01:00
booky10 75d04e9b04 Broadcast take item packets with collector as source (#9884)
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
2023-11-04 15:16:55 -07:00
TonytheMacaroni 23860da6c2 Add predicate for block when raytracing (#9691)
* Add predicate for block data when raytracing blocks

* Match based on block, instead of block data

* Use instanceof instead of casting

* Use Position instead of Location, add overload for rayTraceEntities

* Implement requested changes

* Invert predicate

* Cleanup
2023-11-04 15:00:51 -07:00
TrollyLoki 8a3980c60b Add API to get the collision shape of a block before it's placed (#9821)
* Add API to get the collision shape of a block before it's placed

* Tweak API documentation

* Clarify behavior

* Rebase

* Rebase
2023-11-04 16:32:10 -05:00
Jake Potrebic 0cdce89d59 Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset
to the main world spawn point
2023-11-04 14:11:55 -07:00
powercas_gamer 15a0de2eef Make Team extend ForwardingAudience (#9852) 2023-11-04 21:50:56 +01:00
booky10 43c343228e Add entity API for getting the combined gene of a Panda (#9891) 2023-11-04 21:28:23 +01:00
Tamion bffb08c2f9 Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more
restrictive in that it has an isGliding check.
2023-11-04 13:20:13 -07:00
Jake Potrebic 6592fed511 Use a server impl for hopper event to track get/setItem calls (#9905)
* Use a server impl for hopper event to track getItem/setItem calls

* Rebase

* Comments
2023-11-04 12:58:40 -07:00
Warrior aa6c4c11e5 Include packet class name in packet encoding error messages (#9907) 2023-11-04 12:34:34 -07:00
booky10 f78d7ce8ff Remove "fix-curing-zombie-villager-discount" exploit option (#9895) 2023-11-04 20:20:01 +01:00
Lulu13022002 44057da467 Remove duplicate water-sensitivity damage for unaware mobs (#9908) 2023-11-04 12:10:27 -07:00
Warrior 230682d51b Add raw iron & raw copper blocks to anti xray defaults (#7622) 2023-11-04 15:07:48 +00:00
TomTom 487109fddc Readd 0414 use distance map to optimise entity tracker (#9868) 2023-11-03 14:05:57 +00:00
Nassim Jahnke 8493340be4 Add another slot sanity check 2023-11-03 14:49:55 +10:00
Md5Lukas 0b218903a8 Fix villager infection chance not being handled properly (#9897) 2023-11-01 14:59:00 -07:00
Jake Potrebic 1865625d95 Fix NPE when no valid world is found on legacy Players (#9885) 2023-10-29 15:33:32 +00:00
booky10 5bb30ce95b Fix entity camera not being reset when cancelling spectating start/stop events (#9883) 2023-10-29 01:45:07 +01:00
Shane Freeder 3e4eaf2188 [ci skip] Fix module derp 2023-10-29 01:32:13 +01:00
Shane Freeder 415d7081d2 [ci skip] Fix author in last patch 2023-10-29 00:58:15 +01:00
GeroandOwen1212055 a81a384303 Implement Velocity VarInt optimizations (#8418)
---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-10-28 19:56:47 -04:00
booky10 5bdfb29ba1 Add player idle duration API (#9833)
* Add player idle duration API

Implements API for getting, setting and resetting a player's idle duration.

* Remove idle duration setter

* Rebase
2023-10-28 19:25:46 -04:00
caramel c6fac381ed fix UnsafeValues#loadAdvancement doesn't recalculate position (#9846) 2023-10-28 16:13:33 -07:00
Kenox 8b1ac39e89 Fix warden spawn reason from DEFAULT to NATURAL (#8744) 2023-10-28 19:10:31 -04:00
caramel 52849f6da6 Cleanup disable explosion knockback patch (#9858) 2023-10-28 15:50:26 -07:00
Tamion b1faa5d5f4 Fix PotionAPI ignores icon flag (#9864)
* fix PotionAPI ignores icon flag

* also fix CraftPotionUtil#toBukkit

* also CraftPotionUtil#fromBukkit

* use CraftPotionUtil
2023-10-28 15:39:47 -07:00
Warrior b3cac042c1 Fix crash when version_history.json is empty (#9871) 2023-10-28 15:24:54 -07:00
SplotyCode 29350674b3 Fix null item in sendEquipmentChange (#9869) 2023-10-28 15:15:20 -07:00
Jake Potrebic 8cf2503804 Updated Upstream (Bukkit/CraftBukkit) (#9876)
Upstream has released updates that appear 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:
19830133 PR-925: Add hit entity/block to events extending ProjectileHitEvent

CraftBukkit Changes:
5a72c3c04 SPIGOT-7510: Try to fix broken reflection usage of plugins
6fa69f235 PR-1281: Add hit entity/block to events extending ProjectileHitEvent
224f733ac Fix NPE introduced in #f4d977e
2023-10-28 15:02:13 -07:00
Lulu13022002 996d529fb3 Resend entity using the bundle packet (#9853) 2023-10-27 15:48:13 +02:00
Jason Penilla b974a6b6f3 Update paperweight to 1.5.9 (#9872) 2023-10-26 16:34:58 -07:00
Jake Potrebic acc6d012b0 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9861) 2023-10-26 14:56:40 -07:00
Jason c1ac98328c Fix log level of advancement debug message (#9860) 2023-10-23 19:07:44 +02:00
Jake Potrebic 90fe0d58a5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9825)
Upstream has released updates that appear 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:
897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry
255b2aa1 SPIGOT-7080: Add World#locateNearestBiome
ff984826 Remove javadoc.io doc links

CraftBukkit Changes:
71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry
a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome
ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag
b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler
38c599f9d PR-1272: Only allow one entity in CraftItem instead of two
f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld

Spigot Changes:
e0e223fe Remove javadoc.io doc links
2023-10-22 20:12:00 +01:00
Shane Freeder 489bff9bbd Temp fix for serialisable blockdata 2023-10-22 19:56:25 +01:00
MiniDigger | Martin 71a1787f6c [ci skip] cleanup some ATs (#9840) 2023-10-21 17:17:55 -07:00
Lulu13022002 3a5c6f8cee Fix NPE in SculkBloomEvent world access (#9857) 2023-10-21 13:20:24 -07:00
Brokkonaut a3e4d1aa36 Don't check if we can see non-visible entities 2023-10-21 20:53:33 +01:00
Spottedleaf 4b0bc74c90 Initialise default nibble arrays in ChunkAccess directly
When ChunkAccess was converted to an abstract class some versions
ago, the code to initialise nibble arrays should have been moved.
However, the code was not moved and so now mods constructing their
own implementations of ChunkAccess would not have the nibble arrays
initialised.

This is ported to Paper from Starlight to keep the code base in sync,
not because it fixes anything known.
2023-10-16 18:57:45 -07:00
Spottedleaf 00331d943e Fix mushrooms not generating in swamps
During feature generation, light data is not initialised and
will always return 15 in Starlight. Vanilla can possibly return
0 if partially initialised, which allows some mushroom blocks to
generate.

In general, the brightness value from the light engine should not
be used until the chunk is ready. To emulate Vanilla behavior better,
we return 0 as the brightness during world gen unless the target
chunk is finished lighting.

The regular light retrieval outside of WorldGenRegion remains
the same, as behaviorally chunks not lit should be at max
skylight and zero block light.
2023-10-16 18:52:28 -07:00
Spottedleaf 2f4281e2b4 Remove unused skyLightSources
There is no point in initialising the sources in Starlight,
as we do not use them. Additionally, they are not saved to
disk so we do not need them.

Maintaining and initialising them is not a negligible cost,
which is why they are being removed.
2023-10-16 18:49:41 -07:00
caramel e57af7d01e sync netty version with vanilla (#9842) 2023-10-15 15:41:17 +01:00
caramel 44ee1cd05e fix recipe packet limiter (#9841) 2023-10-15 15:11:15 +01:00
Md5Lukas 852c1c236d Add additional tags to ItemMeta obfuscation filtering (#9665) 2023-10-14 23:41:15 +02:00
Md5Lukas 3e1c5e3eb0 Add BlockData setter for FallingBlock (#9829) 2023-10-14 22:46:31 +02:00
Jakub Zacek e4d184f39d Replace bukkit Consumers with java consumers (#9836) 2023-10-14 22:43:32 +02:00
froobynooby 3e9d2ac5f2 Don't call options events on login (#9834)
* Don't call options events on login

* Merge changes into client options API patch
2023-10-14 11:32:00 -07:00
SplotyCode f613437019 Fix CraftPlayerProfile#setId regression (#9822) 2023-10-12 01:20:25 +00:00
Jake Potrebic 2f5bb7e306 add predicate recipe choice only for potion mixes (#9486) 2023-10-10 16:07:21 -07:00
Tamion 1a4778d260 Fix PlayerSwapHandItemsEvent NPE when a hand set to null (#9763)
* Fix PlayerSwapHandItemsEvent throwing exception when mainhand or offhand set to null

* use fully qualified import

* Use ItemStack#empty() instead of new ItemStack

* Add NotNull annotation to getters

* Add missing Paper comments
2023-10-10 15:38:25 -07:00
caramel 5509610db5 Fix UnsafeValues#loadAdvancement (#9753) 2023-10-10 15:19:00 -07:00
Jake Potrebic 7e5dd92f9f fix flat bedrock world config (#9728) 2023-10-10 14:43:10 -07:00
TrollyLoki 69ce9276e4 Make setVelocity method of Fireballs change the travel direction to an arbitrary vector (#9815) 2023-10-10 23:09:45 +02:00
Xander de Keijzer 72f7945e77 Fix painting loosing art on face change (#9798) 2023-10-10 22:24:35 +02:00
Jake Potrebic e87240b674 Fixes for loot tables (#9818) 2023-10-10 10:35:49 -07:00
Jason a2ba45239c Update paperweight to 1.5.8 (#9814) 2023-10-09 18:04:26 -07:00
Spottedleaf 99b735c1ac Make EntityLookup#get use read lock for entity maps
On Folia, this map is modified by multiple threads and iterating
it may throw errors, for example using the /kill command or any
other command that uses an entity selector.
2023-10-09 10:02:37 -07:00
Warrior a702a083cd Move clientBrandName over to ServerPlayer (#9809) 2023-10-08 12:07:48 +02:00
powercas_gamer adb4fb4bd3 [ci skip] update mappings link (#9801) 2023-10-07 11:54:43 +02:00
Bjarne Koll 29a0209575 Properly check water block when random ticking ice (#9804)
Readds a lost update to the shared mutable state in the random block
ticking optimisation.
2023-10-06 21:34:00 +01:00
Jason 08c0b488b9 [ci skip] update paperweight to 1.5.7 & re-enable filterpatches (#9799) 2023-10-06 08:58:09 -07:00
Nassim Jahnke cfe311d7a5 Fix item effects conversion if no tag is present
Fixes #9796
2023-10-05 16:03:26 +10:00
Nassim Jahnke 431e6418ab Fixup player profile getters and constructor to expected nullability (#9770) 2023-10-05 05:31:24 +00:00
Warrior 02cfaa8ff8 Fix mobs not spawning when using an older config (#9793) 2023-10-04 10:08:47 -07:00
Shane Freeder 5eec4ec3bf Quick tweaks to logical flow of getMapData 2023-10-04 16:25:26 +01:00
booky10 f36bb59739 Fix entity data not updated for firework attached to entity (#9783) 2023-10-03 18:29:44 -07:00
Jake Potrebic 6573d9555d update configurate (#9230) 2023-10-03 18:06:23 -07:00
Nassim Jahnke 9d21a88218 Fix tests 2023-10-04 07:58:30 +10:00
Nassim Jahnke bb1c0dd6fa Implement tracking range y setting 2023-10-03 22:19:39 +10:00
Nassim Jahnke f6969b6374 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
09b1c123 PR-916: Add more lightning API
c085f3de PR-859: Add Entity#getTrackedBy

CraftBukkit Changes:
1bf30a4e9 SPIGOT-7495: Spawning bee entity in asynchronous BlockPopulator causes IllegalStateException - Accessing LegacyRandomSource from multiple threads
476c5bccd PR-1267: Add more lightning API
40d5e6c02 PR-1190: Add Entity#getTrackedBy
40d41acc1 SPIGOT-7491: Downgrade bundled SQLite to be updated next release
44b31da38 PR-1264: Load Bukkit class before creating Registry item
dc45a6738 SPIGOT-7496: Failure to load datapacks with multiple identical predicates
f508657d6 Fix decompile error affecting javac
ef7a4743d PR-1265: Ensure UTF-8 used in new test resource

Spigot Changes:
224dad51 Rebuild patches
2023-10-03 22:00:24 +10:00
Lulu13022002 38376f43a0 Some jd fixes (#9781) 2023-10-01 00:20:51 +00:00
Nassim Jahnke c4ba28a21a Don't throw when removing unplaced player in NearbyPlayers 2023-09-30 15:37:00 +10:00
Nassim Jahnke 0f69290f07 [ci skip] Fix typo (important) 2023-09-29 13:20:32 +10:00
Nassim Jahnke 4cdbb0c86c Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
044d4ee9 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning
57b73d57 PR-913: Deprecate Projectile#doesBounce() and #setBounce()
43373c44 PR-904: Update FeatureFlag for 1.20.2
a7bbbf0c PR-911: Expand DataPack API with 1.20.2 pack version methods
0341e3a0 SPIGOT-7489: Add TeleportDuration to Display Entity
bcd8d2aa PR-912: Update Minecraft Wiki URLs

CraftBukkit Changes:
99aafc222 Increase outdated build delay
dab849f08 SPIGOT-7283, SPIGOT-7318: Add AsyncStructureGenerateEvent and BlockState cloning
041b29ae3 Upgrade specialsource-maven-plugin
851a32cff PR-1263: Remove unused implementation of AbstractProjectile#doesBounce() and #setBounce()
251af0da3 PR-1261: Expand DataPack API with 1.20.2 pack version methods
46e4ba627 Upgrade specialsource-maven-plugin
df3738a24 SPIGOT-7489: Add TeleportDuration to Display Entity
8d0fea457 PR-1262: Update Minecraft Wiki URLs
e62905aab SPIGOT-7490: Fix entity equipment updates

Spigot Changes:
a0f3d486 Rebuild patches
2023-09-29 13:05:28 +10:00
Jake Potrebic 1765917a6f Fix creating the reverse map for loot table keys (#9766) 2023-09-28 16:29:34 -07:00
Spottedleaf fe54a13b13 Properly call overloaded super onDisconnect
Since the method is overloaded, the call to super (which is changed
to call the overloaded method) without the additional parameters
will result in recursion.
2023-09-26 13:16:24 -07:00
Spottedleaf b3b961f9d5 Fire PlayerConnectionCloseEvent for configuration packet listener
If the player moves to the configuration stage, we also need
to fire the event.
2023-09-26 09:20:17 -07:00
Spottedleaf c207429b21 Fix VoxelShape#isFullBlock() for non-single AABB types
The correct logic to implement NOT_SAME with Shapes#block()
is to test whether any shape data exists outside of [0.0, 1.0]
and to test whether the shape is completely filled from 0.0 to 1.0
on all axis. This can be implemented by checking whether the
bounds represent the full block and whether everything within
the bounds is filled.
2023-09-26 09:16:11 -07:00
Jake PotrebicandJason Penilla 298c47857b Fix tests that broke during the junit 5 update (#9757)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2023-09-25 09:05:05 +10:00
Shane Freeder 3cf03fc31a Fix/update wiki (#9758) 2023-09-25 09:02:46 +10:00
Shane Freeder 5cbce366b2 Handle new brand payload type 2023-09-24 19:48:29 +01:00
Warrior 5923b7d085 Fix missing map initialize event call & missing map id assignment (#9756) 2023-09-24 19:17:29 +01:00
Nassim Jahnke e284bb1215 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
fb23cbb3 Define surefire plugin version
d022084a Define ordering for MetadataStoreTest
99a7f6f0 PR-910: Match generic max absorption attribute name style with the rest
c7390d71 PR-909: Update tests to JUnit 5

CraftBukkit Changes:
f0661c351 PR-1230: Move unstructured PDC NBT serialisation to SNBT
452fcb599 PR-1256: Update tests to JUnit 5
2023-09-24 18:25:25 +10:00
Spottedleaf 7a00758b1b Rebuild patches 2023-09-23 23:41:38 -07:00
Spottedleaf 11138a770e Re-add remove streams for Brain AI patch 2023-09-23 23:40:49 -07:00
Spottedleaf 8b9e3dcd9e Optimise nearby player retrieval
Instead of searching/testing every player online on the server,
we can instead use the nearby player tracking system to reduce
the number of tests per search.
2023-09-23 23:40:49 -07:00
Nassim Jahnke 866d2d9f4a Use correct ClientboundLevelChunkWithLightPacket constructor in later patch 2023-09-24 16:29:07 +10:00
Jake Potrebic 025c5d7a28 rebuild patches 2023-09-23 22:35:37 -07:00
Jake Potrebic ea56138b30 Fix some issues 2023-09-23 22:33:49 -07:00
Spottedleaf 5dca26ce54 Fix race condition on UpgradeData.BlockFixers class init
The CHUNKY_FIXERS field is modified during the constructors
of the BlockFixers, but the code that uses CHUNKY_FIXERS does
not properly ensure that BlockFixers has been initialised before
using it, leading to a possible race condition where instances of
BlockFixers are accessed before they have initialised correctly.

We can force the class to initialise fully before accessing the
field by calling any method on the class, and for convenience
we use values().
2023-09-23 22:31:43 -07:00
Spottedleaf 84556f3cda Add lag compensation for breaking blocks 2023-09-23 22:31:42 -07:00
Spottedleaf 38dc3b25d8 Optimise chunk tick iteration
When per-player mob spawning is enabled we do not need to randomly
shuffle the chunk list. Additionally, we can use the NearbyPlayers
class to quickly retrieve nearby players instead of possible
searching all players on the server.
2023-09-23 22:31:00 -07:00
Nassim Jahnke 8d922746d9 Drop no longer needed patch 2023-09-24 13:09:52 +10:00
Nassim Jahnke 2ec643a53c Readd anti xray and oversized block entity patches 2023-09-24 12:35:16 +10:00
Noah van der Aa 6be43952eb Migrate paper log ips option to new server.properties option 2023-09-23 23:21:21 +02:00
Jason Penilla 9624451ffd Add missing kick event cause 2023-09-23 08:50:32 -07:00
Lulu13022002 b561a12078 Fix SuspiciousStewMeta 2023-09-23 16:41:51 +02:00
Lulu13022002 9c126fd2a9 fix test 2023-09-23 13:38:46 +02:00
Owen1212055 38b7565d9e Remove Spigot Bug Fix for MC-109346 2023-09-23 01:51:40 -04:00
Owen1212055 8b512e3466 Support Paper ip address config + add missing logs 2023-09-23 01:50:13 -04:00
Nassim Jahnke 9df2066642 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
dfe1fb48 PR-906: Add missing MinecraftExperimental annotation to Bundles
825ab30d PR-905: Add missing MapCursor.Type and update documentation
e03d10e6 PR-903: Make BARRIER Waterlogged
1961ead6 PR-898: Use Java Consumer instead of Bukkit Consumer

CraftBukkit Changes:
f71a799f0 Make BARRIER Waterlogged
172f76a45 Upgrade specialsource-maven-plugin
f0702775c SPIGOT-7486: Alternate approach to null profile names
069495671 SPIGOT-7485: Allow air entity items since required for Vanilla logic
5dfd33dc2 SPIGOT-7484: Cancelling PlayerEditBookEvent does not update client's book contents
02d490788 PR-1250: Standardize and centralize Bukkit / Minecraft registry conversion
9024a09b9 PR-1251: Use Java Consumer instead of Bukkit Consumer
6d4b25bf1 Increase diff stability
2023-09-23 12:21:59 +10:00
Nassim Jahnke 4c17176c77 Update foojay resolver convention plugin 2023-09-23 11:46:31 +10:00
Nassim Jahnke a353f4d207 Readd network optimization patch 2023-09-23 11:45:34 +10:00
Spottedleaf a50d7c340b Make sure to maintain the players sent to set for ChunkHolder
Required for proper block/light updates to clients
2023-09-22 17:07:02 -07:00
Nassim Jahnke 02807238c4 Fix chat processing 2023-09-23 09:58:19 +10:00
Nassim Jahnke d23c4a50e6 Fix local attribute setting 2023-09-23 09:42:59 +10:00
Nassim Jahnke b3ec8bd8ae Revert "re-add distance map patch"
This reverts commit 81c5901c67.
2023-09-23 09:38:10 +10:00
Jake Potrebic 81c5901c67 re-add distance map patch 2023-09-22 16:26:10 -07:00
Jake Potrebic 47aeab84ad fixup display slots patch (#9746) 2023-09-22 16:07:33 -07:00
Jake Potrebic 915bb9220e Fixup advancement patch (#9745) 2023-09-22 16:03:34 -07:00
Spottedleaf 6af97e11b6 Port patches from folia dev/optimisations 2023-09-22 15:56:00 -07:00
Spottedleaf d259503c92 Fix recursion with pathfind entity event
With the function overload, need to pass the entity
through to the super call
2023-09-22 15:39:00 -07:00
Spottedleaf ea01aa335a Add some patches, fix compile 2023-09-22 15:33:14 -07:00
Spottedleaf e88856dd75 Chunk system patch 2023-09-22 13:13:57 -07:00
Jason Penilla 896aa8b54a Rebuild patches 2023-09-22 10:59:56 -07:00
Jason Penilla ead3ddba32 Move unapplied patches so ATs import 2023-09-22 10:57:45 -07:00
MiniDigger | Martin 603c33df06 some more compile fixes 2023-09-22 19:43:52 +02:00
MiniDigger | Martin 1ebaffacf5 some compile fixes 2023-09-22 19:31:02 +02:00
Noah van der Aa f4d8a64094 more more more more more more more more more more more work: passing the torch 2023-09-22 19:26:54 +02:00
Lulu13022002 63a1b0c137 some compile issues 2023-09-22 19:25:18 +02:00
Lulu13022002 a91e19f1df more work
all server patches done (almost)
2023-09-22 18:59:52 +02:00
Lulu13022002 8baf510f92 some work 2023-09-22 18:11:35 +02:00
Noah van der Aa ac7e4ad35e more more more more more more more more more more more work: passing the torch 2023-09-22 17:51:48 +02:00
Noah van der Aa 3aa8e7ef3f more more more more more more more more more more work 2023-09-22 17:35:51 +02:00
Noah van der Aa 4875ee4814 more more more more more more more more more work 2023-09-22 17:24:59 +02:00
Noah van der Aa 32d9c6684b more more more more more more more more work 2023-09-22 17:08:04 +02:00
Noah van der Aa 772fb3e385 more more more more more more more work
can't let lynx inflate his commit count too much
2023-09-22 16:59:18 +02:00
Bjarne Koll 2617c927a0 More work work work work work work work work work 2023-09-22 16:42:56 +02:00
Bjarne Koll e5bd562d28 Work here, work there, work for everyone 2023-09-22 16:35:40 +02:00
Bjarne Koll 452009bbde Working hard on messing with leafs patches 2023-09-22 16:20:09 +02:00
Bjarne Koll 574bc968d3 More work 2023-09-22 15:47:26 +02:00
Bjarne Koll 95a31de306 More work work work 2023-09-22 15:33:37 +02:00
Bjarne Koll af1090259a Fix PaperAdvancementDisplay 2023-09-22 15:19:33 +02:00
Bjarne Koll 74094edf08 More more more (more ??) more work 2023-09-22 15:15:57 +02:00
Bjarne Koll 662b6c5ca8 Port sidebar slots patch 2023-09-22 14:33:54 +02:00
Bjarne Koll 79fef73926 More work work work 2023-09-22 14:22:24 +02:00
Bjarne Koll 00d82983bd Missing paper comment 2023-09-22 13:42:04 +02:00
Bjarne Koll 2cb3a1a3dc Fix leave message in common packet listener 2023-09-22 13:39:00 +02:00
Noah van der Aa fc84aee124 more more more more more more work 2023-09-22 09:24:44 +02:00
Jake Potrebic 2cee84193c and some more 2023-09-21 22:41:27 -07:00
Jake Potrebic a62835bbb1 almost halfway done with server patches 2023-09-21 21:40:51 -07:00
Jake Potrebic 24fd5aea0c and some more patches 2023-09-21 21:05:18 -07:00
Jake Potrebic 2bc818efd4 some more patches 2023-09-21 20:29:51 -07:00
Jake Potrebic 78a003ee89 work and compile errors 2023-09-21 20:17:35 -07:00
Jake Potrebic 7b29d1f4c5 even more work 2023-09-21 19:17:21 -07:00
Jake Potrebic ef6a41195d some more work 2023-09-21 15:26:51 -07:00
Jake Potrebic a27262375c some work 2023-09-21 15:01:00 -07:00
Noah van der Aa c60dd35989 more more more more more work 2023-09-21 23:09:04 +02:00
Noah van der Aa 7ebfdd5e6d more more more more work 2023-09-21 22:35:39 +02:00
Noah van der Aa 91671751e7 more more more work 2023-09-21 22:14:58 +02:00
Noah van der Aa 20253f478f more more work 2023-09-21 21:54:46 +02:00
Noah van der Aa 2b72b74a36 more work 2023-09-21 21:00:11 +02:00
Noah van der Aa b6e46e90cd rebuild old indexes, first work 2023-09-21 19:39:51 +02:00
Noah van der Aa 6267e26420 So it begins... 2023-09-21 19:18:04 +02:00
Jake Potrebic 773dd72446 Updated Upstream (Bukkit/CraftBukkit) (#9739)
Upstream has released updates that appear 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:
69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking
997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
6a8ce581 Fix malformed javadoc in previous commit
26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event)
aa067abf PR-895: Load GameEvent and MusicInstrument from registry

CraftBukkit Changes:
78796c9de Add support for Java 21
ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation
caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event)
00f5a80fb PR-1252: Fix error when generating a tree in water
10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
2023-09-21 18:48:55 +02:00
Lulu13022002 3fd1502717 Add missing deprecation (#8886) 2023-09-21 10:35:38 +02:00
Jake Potrebic 1b1c23010a Add missing InventoryHolders to inventories (#7400) 2023-09-17 19:16:48 -07:00
The456 581b683931 Fix spigot's Forced-Stats (#9663) 2023-09-17 03:27:56 +02:00
Warrior a856073368 Fix two beacon bugs (#9675) 2023-09-16 17:36:10 -07:00
Jake Potrebic ba0e1f54b9 Fix sapling observer detection and grow event (#9654) 2023-09-16 16:53:21 -07:00
Jake Potrebic 3cec9c985f [ci skip] Add missing javadoc links (#9497) 2023-09-17 01:35:39 +02:00
Lulu13022002andJake Potrebic d8af99a82c Fix silent equipment change for mobs (#9677)
* Fix silent equipment change for mobs

* rebased and added test to make sure all overrides are added

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 16:27:11 -07:00
SoSeDiK 064fb50cc1 Cleanup old async commands patch (#8895) 2023-09-17 00:54:33 +02:00
Warrior 06a741d713 Fix leashed pets teleporting to owner when loaded (#9686) 2023-09-16 15:16:44 -07:00
Warrior e312ebb1bd Add DISPLAY tracking range type (#9668) 2023-09-17 00:02:58 +02:00
WarriorandJake Potrebic ede9c06814 Fix Projectile#setOwner(null) not clearing owner (#9715)
* Fix Projectile#setOwner(null) not clearing owner

* rebased and merged into mentioned patch

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 14:37:38 -07:00
thelooter 0c8e84c20d Enforce sign line nullability when setting line with Adventure Method (#9689) 2023-09-16 23:18:51 +02:00
AeltumnandJake Potrebic deb92c2129 Add ItemStack#isEmpty and related methods (#9664)
* Add new patches

* Change from an EMPTY static var to a static method since ItemStack is mutable

* Properly set nullability of return value

* Move annotation changes to different patch

* Send the Kotlin code back to where it came from

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-09-16 14:18:09 -07:00
MiniDigger | Martin 83cfeb1b37 Improve java version check (#9692) 2023-09-16 23:06:36 +02:00
Jake Potrebic 99b311de54 [ci skip] Clarify where furnace-related events are called (#8753) 2023-09-16 13:55:40 -07:00
Jake Potrebic eb60bffa98 Create raw chat type as resource file instead of in source (#9226)
Sets up the ability to load new or modified resource files into Paper.

Updates paperweight to 1.5.6

This should work with all run configs, like runDev, runShadow, runReobf as well as correctly build jars for production.
2023-09-15 11:03:42 -07:00
Warrior 29d1c7b602 Call BlockRedstoneEvents for lecterns (#9721) 2023-09-14 23:17:53 +02:00
leguan 7145f41b6e compression level change with config option (#9711) 2023-09-14 13:11:19 +02:00
TreemanKing 6378792a99 Add Barrel to LootableBlockInventory (#9687) 2023-09-14 13:04:36 +02:00
Duckulus e68fd7162a Add missing Piglin Dancing API (#8894) 2023-09-14 12:54:43 +02:00
Lulu13022002 eea0c649ca Swap some nullable annotations (#9696) 2023-09-14 12:44:12 +02:00
Warrior 1c15111f08 Add missing particle javadocs (#9716) 2023-09-14 12:09:09 +10:00
Nassim Jahnke 517f8fbbac Fix line of sight distance check 2023-09-12 09:56:24 +10:00
Spottedleaf fb06829845 Optimise multiple block updates occurring in the same chunk
We can avoid multiple ticket additions for the same ChunkTasks
instance. This will help in situations where significant number of
block updates occur for the same chunk in the same tick, such as
water draining.
2023-09-11 07:15:18 -07:00
violetc c9cd94f3c6 Fix fixItemsMergingThroughWalls check (#9707) 2023-09-11 14:46:02 +10:00
Nassim Jahnke e2b197132d Add missing slot sanity checks for container clicks 2023-09-11 12:03:35 +10:00
Nassim JahnkeandPaul Sauve 72e87abc2d Strip raytracing for EntityLiving#hasLineOfSight
Co-authored-by: Paul Sauve <paul@technove.co>
2023-09-10 12:28:03 +10:00
Joe 33bec7f20a Copy NBT in legacy dragon fight converter 2023-09-06 18:33:31 -07:00
Joe 471f4de9c4 Copy NBT in upgrade data neighbor ticks 2023-09-06 18:30:02 -07:00
Lulu13022002 39953cf08d Take in account waterlogged blocks for scaffolding (#9676) 2023-09-04 17:52:27 +02:00
Md5Lukas b4e3b3d1dd Allow non-op players to execute the click event callback (#9652) 2023-08-28 13:21:13 +02:00
Noah van der Aa b8edb0e130 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9648)
Upstream has released updates that appear 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:
6b34da8f SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender

CraftBukkit Changes:
db4ba2897 SPIGOT-7467: Add getAddress to RemoteConsoleCommandSender
4f7ff4dec PR-1246: Add missing AbstractTestingBase to tests which need them
f70a7b68d SPIGOT-7465, MC-264979: Fresh installations print NoSuchFileException for server.properties
8ef7afef6 PR-1240: Call BlockGrowEvent for vines that are growing on additional sides of an existing vine block

Spigot Changes:
d2eba2c8 Rebuild patches
2023-08-28 13:05:48 +02:00
Martijn 0c0a480d82 Do crystal-portal proximity check before entity lookup (#9611) 2023-08-26 13:23:31 -07:00
Lulu13022002 0e622c79fa Add sniffer egg api (#9288) 2023-08-26 22:12:46 +02:00
Jake Potrebic 7d13b7066c Add titleOverride to InventoryOpenEvent (#7540) 2023-08-26 12:28:42 -07:00
Jake Potrebic 6813244fb0 Fix/improve destroy speed API (#9645)
further improvements could be a method that takes in an entity
to account for effects
2023-08-25 10:57:11 -07:00
Nassim Jahnke 6f30f08b20 Readd old BlockDamageEvent constructor 2023-08-25 10:19:55 +10:00
Jake Potrebic e552bebca1 Fix inventory desync (#9640) 2023-08-24 16:53:02 -07:00
Aeltumn 0c8882f7f9 Add OfflinePlayer#isConnected (#9642) 2023-08-24 21:44:31 +10:00
Jake Potrebic b45ecc93c1 [ci skip] clear out test plugin 2023-08-23 10:05:08 -07:00
Jake Potrebic b8a0049207 Fix exact choice recipe book clicks (#7822) 2023-08-23 08:20:32 -07:00
Warrior 7a1863ed78 Limit setBurnTime to valid short values (#9623) 2023-08-23 20:54:34 +10:00
Jake Potrebic a751001ed1 [ci skip] Refactor context records for easier expansion (#9589) 2023-08-23 13:34:57 +10:00
Martijn fcc5f232f9 Optimize nearest structure border iteration (#9638) 2023-08-23 11:53:42 +10:00
The456 9cbad8ebbf Expose Hand during BlockCanBuildEvent (#9636) 2023-08-23 10:41:30 +10:00
Bjarne Koll 3716832282 Prevent overfilled bundles from duplicating items (#9633)
Bundles compute the amount to remove from an item based on the formula
(64 - currentWeight) / itemWeight. An overfilled bundle however, with a
currentWeight of > 64 ends up with a negative removal amount for the
item.

This can cause duplication issues on craftbukkit inventory
implementations as they do currently not gracefully handle negative
removal amounts in their remove methods.
2023-08-22 11:57:44 +02:00
Lulu13022002 a712766995 Allow custom damage for trident (#8132) 2023-08-22 16:20:38 +10:00
Lulu13022002 7386a13642 Fix endgateway teleportation offset (#9517) 2023-08-22 16:03:15 +10:00
Jake Potrebic 9395aa6079 Improve performance of mass crafts (#9603) 2023-08-22 15:54:28 +10:00
Rodney 0c7385b569 Add PlayerPickItemEvent (#5590) 2023-08-22 15:22:05 +10:00
SoSeDiK 27d39cac4f Properly clone custom nbt tags inside ItemMeta (#7849) 2023-08-22 14:59:31 +10:00
Jake Potrebic fed9042390 More DragonBattle API (#5655) 2023-08-22 14:08:43 +10:00
Joo200 e3f29f4345 MerchantRecipe: add copy constructor (#8703) 2023-08-22 13:48:25 +10:00
aerulion b29ecd4c22 Expose clicked BlockFace during BlockDamageEvent (#9632) 2023-08-22 13:07:18 +10:00
SoSeDiK 2be57c6943 Expand Pose API (#8781) 2023-08-22 13:05:47 +10:00
caramel 97b9c4a2a4 Fix NPE on Boat#getStatus (#9115) 2023-08-22 12:57:54 +10:00
Jake Potrebic 35ef0537be [ci skip] update editorconfig and gitattributes (#9608) 2023-08-22 12:16:03 +10:00
Bjarne Koll 281855c877 Remove unused lag-compensate-block-breaking option (#9635)
Removes the unused lag-compensate-block-breaking option from the paper
configuration file as the patch using it has been dropped in 1.19.
2023-08-21 22:08:25 +10:00
Nassim Jahnke af6142eab3 [ci skip] Update Gradle wrapper 2023-08-21 19:16:46 +10:00
Corey Shupe 00a68b1efe Player listing API (#8782) 2023-08-21 18:51:31 +10:00
ruViolence 7232506c22 Add entity tracker min Y distance config option (#9406) 2023-08-21 18:05:49 +10:00
Jake Potrebic 1b96c64620 Improve cancelling PreCreatureSpawnEvent with per player mob spawns (#9400) 2023-08-21 17:44:47 +10:00
Yannick Lamprecht 5bf82aa136 Add cancellability to PlayerTrackEntityEvent (#8605) 2023-08-21 17:38:55 +10:00
TonytheMacaroni 88891c37b1 Add Entity Coordinate and Rotation API (#9461) 2023-08-21 17:35:05 +10:00
Will FPandNassim Jahnke 1259b93ba6 Fixed CraftItemStack/CraftItemMeta enchantment level inconsistency (#8792)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2023-08-21 17:31:52 +10:00
Trevor Bedson 990765bd08 Fire entity death event for ender dragon (#9495) 2023-08-21 17:06:21 +10:00
Nassim Jahnke 45ba65283f [ci skip] Rebuild patches 2023-08-21 14:51:19 +10:00
Gero f43a19c275 Fix CME in CraftPersistentDataTypeRegistry (#6701) 2023-08-21 14:50:21 +10:00
EpicPlayerA10 d928dda91d Don't tab-complete namespaced commands if send-namespaced is false (#9366) 2023-08-21 14:50:11 +10:00
galacticwarrior9 bd67b83fd0 Determine lava and water fluid explosion resistance by their block explosion resistance (#9482) 2023-08-21 14:50:02 +10:00
Gameoholic ed8401c748 Fix rotation for spawning display entities (#9552) 2023-08-21 14:49:53 +10:00
EpicPlayerA10 5b34a09ed0 Add option to disable chorus plant and mushroom block updates (#9442) 2023-08-21 14:49:38 +10:00
Md5Lukas 67a1a8caf8 Fix Inventory#getLocation not working for the composter (#9596) 2023-08-21 14:49:29 +10:00
Jake Potrebic d12916255a Properly handle BlockBreakEvent#isDropItems (#8936)
Setting whether a block break dropped items controlled
far more than just whether blocks dropped, like stat increases
food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
2023-08-20 20:49:20 -07:00
Jake Potrebic 666a2147a7 [ci skip] rebuild patches 2023-08-20 14:28:49 -07:00
Jake Potrebic 2bd6ba2c63 Deprecate and replace methods using deprecated StructureType (#8643) 2023-08-20 10:30:45 -07:00
Jake Potrebic fd4f0c7741 API for an entity's scoreboard name (#9462)
Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
2023-08-20 09:06:09 -07:00
Nassim Jahnke eb8f2bb2a1 Fix unknown entity interaction clicked position getter if null 2023-08-19 12:01:06 +10:00
Martijn 307d05bba8 Count down radius-aware dependency tree node parents (#9600) 2023-08-18 12:02:20 +10:00
Jamie ea1f33cf9a Delete patch to fix PaperMC/Paper#9612 (#9621) 2023-08-17 15:51:34 -05:00
Nassim Jahnke 73af2d4cea Add clicked position to PlayerUseUnknownEntityEvent (#9604) 2023-08-16 17:58:07 +10:00
Bjarne Koll 47b805fdf1 Don't let player loot if reloot time is disabled (#9615)
If the reloot time is disabled while reloot is restricted, the player
should not be able to reloot. The previous logic was incorrect and
allowed players to reloot explicitly when the reloot time was disabled.
2023-08-15 21:08:00 -07:00
Warrior 6520ca1c47 Fix main thread priority being lowered (#9488) 2023-08-15 19:37:17 +02:00
Jake Potrebic a73ed9572e Updated Upstream (CraftBukkit/Spigot) (#9598)
Upstream has released updates that appear 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:
b76ceb4f5 PR-1235: Move EntityType return to base Entity class
e795d7490 SPIGOT-7458: Exception when Entity CommandSender executes Vanilla command
46c7fc3b1 SPIGOT-7452: Player#openSign cannot edit
d91e5aa0b SPIGOT-7447: Rewrite --forceUpgrade to minimise diff and properly handle CraftBukkit world layout
921ae06d6 Revert "SPIGOT-7447: Fix --forceUpgrade"

Spigot Changes:
94e187b5 Rebuild patches
3bce7935 SPIGOT-7091: Update bungeecord-chat
2023-08-13 16:32:51 -07:00
Jake Potrebic 93829bba5a Account for dimension type in portal void damage check (#9602) 2023-08-13 13:30:48 -07:00
Nassim Jahnke 23c44c2b8d [ci skip] Update README 2023-08-13 10:36:26 +10:00
Warrior 02338e5069 Fix DEFAULT getEntitySpawnReason for /summon (#9480) 2023-08-13 01:57:13 +02:00
Nacioszeczek 1dfdbef42b SculkCatalyst bloom API (#9466) 2023-08-13 01:31:32 +02:00
Jake Potrebic 2df309bd49 Bandaid fix for Effect (#9548)
Effect or LevelEvent needs to be replaced
but ideally after the enum PR has been merged
upstream. Until then, this test and these fixes
should address all the known issues with them
2023-08-12 15:19:34 -07:00
Noah van der Aa 29aaf7bc24 Fix custom statistic criteria creation (#9595) 2023-08-12 23:50:21 +02:00
Jake Potrebic 20a71c58d3 Add restrict-player-reloot-time config (#7652) 2023-08-12 14:26:47 -07:00
3b4839ee32 Fix players are invisible after using setPlayerProfile (#9143)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2023-08-12 16:10:09 +02:00
Warrior 3c41f8f0b3 Cache map ids on item frames (#9584) 2023-08-12 23:33:24 +10:00
Warrior 9bc70e6888 Make the cursor limit option apply to banners (#9554) 2023-08-10 15:22:40 +02:00
Spottedleaf 4179b8f3fa Remove UpgradeData neighbour ticks outside of range
The lists are only supposed to contain ticks for the 1 radius
neighbours of the chunk.
2023-08-09 14:05:57 -07:00
Florian Schmidt 98c567fe6f Use correct seed on api world load (#9541) 2023-08-08 16:35:15 -07:00
Warrior a2002a76b8 Fix wild wolves not considering bones interesting (#9579) 2023-08-08 16:15:01 -07:00
Jake Potrebic 93cf3eb832 Respect randomizeData on more entities when spawning (#9483) 2023-08-08 16:07:59 -07:00
Warrior 9ffccd6430 Use correct source for mushroom block spread event (#9587) 2023-08-08 15:51:58 -07:00
Nassim Jahnke 408a9050ba Don't put entities removed during the portal exit event into an invalid state 2023-08-08 17:48:55 +10:00
Nassim Jahnke ef2b574c6a Clone location in PlayerFailMoveEvent getters 2023-08-08 13:00:17 +10:00
Moulberry 5274ad672b Add and implement PlayerFailMoveEvent (#9535) 2023-08-08 12:51:09 +10:00
Jake Potrebic d6d2b6f4e5 Only capture actual tree growth (#6464) 2023-08-05 19:33:18 -07:00
Phillipp GlanzandYannick Lamprecht 8fe8ca6658 Add clickable version on version command (#9347)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
2023-08-06 03:26:13 +02:00
Jake Potrebic 31358d5e48 API for updating recipes on clients (#6463) 2023-08-05 18:11:22 -07:00
Bjarne KollandJake Potrebic 508a295b44 Only erase allay memory on non-item targets (#9570)
* Only erase allay memory on non-item targets

Spigot incorrectly instanceOf checks the EntityTargetEvent#getTarget
against the internal ItemEntity type and removes the nearest wanted item
memory if said instanceOf check fails, (which is always the case)
causing allays to behave differently as they constantly loose their
target item.

This commit fixes the faulty behaviour by instance performing a check
against the CraftItem type.

* Reduce diff

* fix typo

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-08-05 17:31:10 -07:00
Jake Potrebic 2fa8efce9b Updated Upstream (Bukkit/CraftBukkit) (#9485)
Upstream has released updates that appear 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:
82af5dc6 SPIGOT-7396: Add PlayerSignOpenEvent
3f0281ca SPIGOT-7063, PR-763: Add DragonBattle#initiateRespawn with custom EnderCrystals
f83c8df4 PR-873: Add PlayerRecipeBookClickEvent
14560d39 SPIGOT-7435: Add TeleportCause#EXIT_BED
2cc6db92 SPIGOT-7422, PR-887: Add API to set sherds on decorated pots
36022f02 PR-883: Add ItemFactory#getSpawnEgg
12eb5c46 PR-881: Update Scoreboard Javadocs, remove explicit exception throwing
f6d8d44a PR-882: Add modern time API methods to ban API
21a7b710 Upgrade some Maven plugins to reduce warnings
11fd1225 PR-886: Deprecate the SmithingRecipe constructor as it now does nothing
dbd1761d SPIGOT-7406: Improve documentation for getDragonBattle

CraftBukkit Changes:
d548daac2 SPIGOT-7446: BlockState#update not updating a spawner's type to null
70e0bc050 SPIGOT-7447: Fix --forceUpgrade
6752f1d63 SPIGOT-7396: Add PlayerSignOpenEvent
847b4cad5 SPIGOT-7063, PR-1071: Add DragonBattle#initiateRespawn with custom EnderCrystals
c335a555f PR-1212: Add PlayerRecipeBookClickEvent
4be756ecb SPIGOT-7445: Fix opening smithing inventory
db70bd6ed SPIGOT-7441: Fix issue placing certain items in creative/op
f7fa6d993 SPIGOT-7435: Add TeleportCause#EXIT_BED
b435e8e8d SPIGOT-7349: Player#setDisplayName not working when message/format unmodified
a2fafdd1d PR-1232: Re-add fix for player rotation
7cf863de1 PR-1233: Remove some old MC bug fixes now fixed in vanilla
08ec344ad Fix ChunkGenerator#generateCaves never being called
5daeb502a SPIGOT-7422, PR-1228: Add API to set sherds on decorated pots
52faa6b32 PR-1224: Add ItemFactory#getSpawnEgg
01cae71b7 SPIGOT-7429: Fix LEFT_CLICK_AIR not working for passable entities and spectators
a94277a18 PR-1223: Remove non-existent scoreboard display name/prefix/suffix limits
36b107660 PR-1225: Add modern time API methods to ban API
59ead25bc Upgrade some Maven plugins to reduce warnings
202fc5c4e Increase outdated build delay
ce545de57 SPIGOT-7398: TextDisplay#setInterpolationDuration incorrectly updates the line width

Spigot Changes:
b41c46db Rebuild patches
3374045a SPIGOT-7431: Fix EntityMountEvent returning opposite entities
0ca4eb66 Rebuild patches
2023-08-05 17:21:59 -07:00
GameoholicandJake Potrebic 69a801305d [ci skip] Fix inventorycloseevent javadocs (#9533)
* Add InventoryCloseEvent safety doc comment, similar to InventoryClickEvent

* Fix inventorycloseevent javadocs

* Fix InventoryCloseEvent and InventoryClickEvent javadocs

* remove extra +

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-08-05 12:58:38 -07:00
Jake Potrebic 2c55dd86ff Expand use of strict advancement dim check (#9545) 2023-08-05 12:26:28 -07:00
Emily 13c9d3c423 Bump net.kyori:ansi to 1.0.3 (#9575) 2023-08-04 14:54:25 -07:00
Jake Potrebic 81619a652e Fix treasure map config default (#9572) 2023-08-04 08:52:22 -07:00
Emilia Kond f402f89a67 Bump net.kyori.ansi to 1.0.2 (#9546) 2023-07-29 12:59:46 +10:00
Jake Potrebic 6c7e3c5193 [ci skip] Clarify viewers set mutability in chat events (#9525) 2023-07-28 15:14:19 -07:00
Jake Potrebic 7d1cc6d409 Add Translatable interface to MusicInstrument (#9538) 2023-07-28 15:06:27 -07:00
Jake Potrebic a40e48f3fd Add cause to PlayerOpenSignEvent (#9441)
Also fire the event for plugin-opened signs
2023-07-26 17:25:14 +01:00
Spottedleaf 1837f6c677 Prevent entity removals if the entity slices is receiving status updates
If an entity is removed while updating an entity slice, then the
iteration over the entity slice's entities could throw a cryptic
exception. Instead, it is better to prevent the entity removal
with a useful log message.

Fixes https://github.com/PaperMC/Paper/issues/9464
2023-07-25 07:21:45 -07:00
Owen b14979e352 Remove isRemoved skip on .discard() (#9520) 2023-07-24 19:04:40 +10:00
powercas_gamer aa93dcfdce feat: add minimessage tag resolvers overload to CommandSender#sendMessage (#9505) 2023-07-23 01:46:40 -04:00
Sage 42830546f3 Add player whitelist events (#9209) 2023-07-23 00:38:53 -04:00
JLitewski e19177a2c3 Rewrote Amethyst logic to throw both BlockGrowEvent and BlockSpreadEvent (#9217)
With this patch, it is now possible to further control what plugins can do with Amethyst Blocks.
You can prevent Budding Amethyst blocks from creating shards with the BlockSreadEvent, and
when shards grow, it can be prevented with BlockGrowEvent
2023-07-22 23:54:02 -04:00
Jake Potrebic 2c54b3949f Don't support hex in book title and author (#9493) 2023-07-22 23:40:52 -04:00
Astralchroma d8b8f61961 Configurable Region Compression Format (#8505) 2023-07-22 20:13:48 -04:00
Owen 383f0ed924 Remove sign ticking (#9478)
Minecraft now ticks signs in order to validate the playerWhoMayEdit field. This is a horrible idea, as this means that even waxed signs are ticked for essentially no reason. This moves the logic lazily onto the getter.
2023-07-22 17:00:50 -04:00
Jake Potrebic 24d690fe7e Fix hopper not marking source inv as changed (#9070) 2023-07-22 13:48:23 -07:00
Golfing7 46a36d3b28 Make ExperienceOrb entities call EntitySpawnEvent (#9197) 2023-07-22 16:19:50 -04:00
Roman Alexander 2f8d9db58c Pathfinder hasPath should check if path is done. (#9231) 2023-07-22 16:04:19 -04:00
Infynyty b1334b5105 Mark Player.sendSignChange as deprecated (#9382) 2023-07-22 21:38:40 +02:00
Jake Potrebic c016e039a5 Fix unbreakable flint and steel consumed when igniting creepers (#9509) 2023-07-19 09:16:39 -07:00
Bjarne Koll 40adc2345b [ci skip] Fix incorrect javadoc in JarLibrary (#9513) 2023-07-19 12:51:58 +01:00
Moulberry c793bd93be Allow LEFT_CLICK_AIR in 3.0->4.5 range of entity (#9211) 2023-07-16 17:58:25 +02:00
Jake PotrebicandBillyGalbreath b533905cc3 fix 2 vanilla issues (#8940)
Fix sheeps eating grass outside ticking chunks
Fix itemframe drops dropping in correct location

Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2023-07-15 16:28:28 -04:00
Jason fe780d041e Add back accidentally dropped Wandering Trader patch (#9492) 2023-07-14 16:23:33 -07:00
Jake Potrebic de3f149185 Fix possible NPE on painting creation (#9391) 2023-07-13 17:22:15 -07:00
Jake Potrebic 22ed60c101 Fix BanList API (#9450) 2023-07-13 14:43:45 -07:00
Jake Potrebic aefb73c234 Add Owner UUID api for AreaEffectCloud (#9364) 2023-07-13 17:26:42 -04:00
Owen ece4fd3597 Suppress Item Meta Validation Checks (#9331)
Stops item meta from aggressively throwing exceptions.
2023-07-13 16:59:49 -04:00
Jake Potrebic 836586d59b Fix missing item types in SlotType for armor change event (#9379)
Also added 2 parameterized tests to make sure this doesn't happen
again.
2023-07-13 13:09:26 -07:00
Owen 92bc19b049 Fix missing item interaction cancelling case (#9427)
Properly cancels brushes now
2023-07-13 15:48:46 -04:00
Lulu13022002 1f8ca77bb6 Prevent desync for poi and pistons (#9270) 2023-07-13 15:22:05 -04:00
Jake Potrebic a60eeb85f5 Fix mob breaking doors not spawning particles (#9443)
This is a vanilla issue reported as MC-263999
2023-07-13 12:11:27 -07:00
Pedro a3c760e6af Handle block state in EntityDamageByBlockEvent (#9396) 2023-07-12 12:12:12 -07:00
Nassim Jahnke f9473d9928 [ci skip] Add gradle wrapper validation action 2023-07-11 23:25:02 +02:00
Jake Potrebic b3dc7a3b4b fix item meta for tadpole buckets (#9473) 2023-07-11 11:52:11 -07:00
chickeneer 805fdd83b3 Add deprecations to SignSide string methods (#9467) 2023-07-11 09:58:08 -07:00
Warrior 6b325cd6a9 Array backed synched entity data (#9460) 2023-07-10 15:27:50 +02:00
Jake Potrebic 5de0f8ac48 Add Sign#getInteractableSideFor (#9388) 2023-07-08 11:04:19 +02:00
Jake Potrebic e105354330 Fix incorrect new blockdata in EntityChangeBlockEvent (#9445)
Also fixes EntityBreakDoorEvent not having the correct 'to' block data

Also standardizes how to handle EntityChangeBlockEvent before a removeBlock or destroyBlock
call. Always use 'state.getFluidState().createLegacyBlock()' to get the new state instead of
just using the 'air' state.
2023-07-07 10:25:36 -07:00
Jake Potrebic d7d3f6371e [ci skip] Use Nullable annotation for Entity source (#9435) 2023-07-06 20:38:46 -07:00
Spottedleaf 48ea66e97f Optimize player lookups for beacons
For larger ranges, it's better to iterate over the player list
than the entity slices.
2023-07-06 20:18:33 -07:00
Shane Freeder dadd8b5a7c Don't allow for supporting block checks to load chunks
I cannot test this due to lack of hardware (took 30 minutes getting paper
updated and loaded into IJ on this machine...), however, this is the easiest
patch for now. Ideally, some form of distance check would probably be added to
improve invalidation of this cache.
2023-07-06 02:55:19 +01:00
Lulu13022002 12c970097d Fix ThrownEggHatchEvent#setHatching (#9448) 2023-07-05 09:46:12 +02:00
Nassim Jahnke c0936a71bd Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9440)
Upstream has released updates that appear 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:
01aa02eb PR-858: Add LivingEntity#playHurtAnimation()
9421320f PR-884: Refinements to new ban API for improved compatibility and correctness
37a60b45 SPIGOT-6455, SPIGOT-7030, PR-750: Improve ban API
4eeb174b All smithing inventories are now the new smithing inventory
f2bb168e PR-880: Add methods to get/set FallingBlock CancelDrop
e7a807fa PR-879: Add Player#sendHealthUpdate()
692b8e96 SPIGOT-7370: Remove float value conversion in plugin.yml
2d033390 SPIGOT-7403: Add direct API for waxed signs
16a08373 PR-876: Add missing Raider API and 'no action ticks'

CraftBukkit Changes:
b60a95c8c PR-1189: Add LivingEntity#playHurtAnimation()
95c335c63 PR-1226: Fix VehicleEnterEvent not being called for certain entities
0a0fc3bee PR-1227: Refinements to new ban API for improved compatibility and correctness
0d0b1e5dc Revert bad change to PathfinderGoalSit causing all cats to sit
648196070 SPIGOT-6455, SPIGOT-7030, PR-1054: Improve ban API
31fe848d6 All smithing inventories are now the new smithing inventory
9a919a143 SPIGOT-7416: SmithItemEvent not firing in Smithing Table
9f64f0d22 PR-1221: Add methods to get/set FallingBlock CancelDrop
3be9ac171 PR-1220: Add Player#sendHealthUpdate()
c1279f775 PR-1209: Clean up various patches
c432e4397 Fix Raider#setCelebrating() implementation
504d96665 SPIGOT-7403: Add direct API for waxed signs
c68c1f1b3 PR-1216: Add missing Raider API and 'no action ticks'
85b89c3dd Increase outdated build delay

Spigot Changes:
9ebce8af Rebuild patches
64b565e6 Rebuild patches
2023-07-04 10:22:56 +02:00
Lulu13022002andJake Potrebic 4356758b64 Call missing BlockDispenseEvents (#8518)
* Call missing BlockDispenseEvent

* Avoid duplicate event

* Show a single item for event

* Move glowstone refill event

* rebased

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-07-02 16:12:07 -07:00
Jason 171ba7ccf3 Move Log4j plugins to own source set (#9428) 2023-07-01 22:00:46 -07:00
Jake Potrebic e16fefb443 [ci skip] add 'accepted' to Done project category (#9429) 2023-07-01 10:24:58 +02:00
Jake Potrebic f2c1e1366a Fix default permission for xp command (#9419) 2023-06-30 15:02:25 -07:00
Boy0000 fead63e2ea Add option to disable NoteBlock and Tripwire updates (#9368) 2023-06-30 16:11:52 +02:00
Nassim Jahnke 225c95025b Hotfix double entity removal making entity scheduler retire call
The assumption that the setRemoved method will never be called more than once is flawed, considering even vanilla code seems to indicate it might happen. Especially with plugins, throwing an exception is not something reasonably maintainable across all the places it *could* happen.
If it is called a second time after already having been removed due to changing dimensions, that's definitely bad, so no extra check for that
Fixes #9420
2023-06-29 17:41:32 +02:00
Jake Potrebic 437e8da700 Improve command function perm level checks (#9411) 2023-06-28 23:18:28 -07:00
Jake Potrebic 2c9c5e4662 Fix replenishable container entities save/load existing contents (#9417) 2023-06-28 11:06:47 -07:00
Pedro 82cd69fcf4 [ci skip] Update Repo style and change project url in README (#9407) 2023-06-28 10:23:05 +02:00
Jake Potrebic e4b40ddc22 Fix entity selectors while spectating (#9402) 2023-06-27 14:46:27 -07:00
Jake Potrebic 8582999344 Deprecate duplicate chat completion methods (#9401) 2023-06-27 10:18:59 +02:00
Lulu13022002 cf0f013f53 Avoid duplicate death event call for armorstands (#9223)
* Avoid duplicate death event call for armorstands

* restore vanilla behavior (emit the game event etc...)
2023-06-26 21:22:49 -07:00
Redned 7103f813bc Only tick item frames if players can see it (#9377)
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
2023-06-27 00:26:29 +01:00
Bit 3f6c4b07ac Add event for player editing sign (#9300)
Addresses https://github.com/PaperMC/Paper/issues/9293
2023-06-26 23:35:32 +01:00
Nassim Jahnke 990be1691b Iterate over entity array copy for entity scheduler 2023-06-26 18:41:08 +02:00
powercas_gamer e8bec64217 Fix ugly java logger format for paper plugin dependency loader (#9395) 2023-06-25 09:57:45 +02:00
Owen b34d4ecd2e Fix cycle on paper plugin toString (#9392) 2023-06-24 22:37:38 +01:00
Owen aea9cdd37d Fix interact event call override (#9387) 2023-06-23 11:03:43 -05:00
Molean 206dd3af05 Fix incorrect phantom spawning entity (#9385) 2023-06-23 12:50:29 +02:00
Samir b1696788d6 ratelimited packet is logged to console on kick (#9292) 2023-06-21 14:36:14 +01:00
Redned c613877e54 Fix incorrect crafting result amount for fireworks (#9322)
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
2023-06-21 14:11:50 +01:00
Owen 3756f5bbf5 Properly Cancel Usable Items (#9225)
This fixes the bug causing canceling PlayerInteractEvent to cause items to continue to be used despite being canceled on the server.

For example, items being consumed but never finishing, shields being put up, etc.
The underlying issue of this is that the client modifies their synced data values, and so we have to (forcibly) resend
them in order for the client to reset their using item state.
2023-06-18 18:33:15 -04:00
Nassim Jahnke 1f5bec71f3 Pull Folia API take two 2023-06-18 22:46:52 +02:00
Nassim Jahnke b1fe756b73 Revert "Move some Folia API to Paper for easy compat (#9360)"
This reverts commit d6d4c78e7d.
2023-06-18 21:47:17 +02:00
Nassim Jahnke d6d4c78e7d Move some Folia API to Paper for easy compat (#9360) 2023-06-18 20:02:59 +02:00
Shane Freeder 976b95c74c Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338) 2023-06-18 13:49:22 +01:00
Nassim Jahnke 275173e538 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot

CraftBukkit Changes:
b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends
fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd
44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot
676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
2023-06-18 13:18:11 +02:00
Jake Potrebic 873533b129 Add method to remove all active potion effects (#9361)
* Add method to remove all active potion effects

* use clear instead of removeAll
2023-06-17 21:10:13 -07:00
Riley Park faf9a65b62 Disable BukkitMirrorTest 2023-06-17 14:20:46 -07:00
Jake Potrebic 072b78a713 Add trail ruins structure set seed in spigot config (#9327)
Also adds a server test to ensure the defaults match and that a seed
exists for each structure set
2023-06-17 12:12:23 -07:00
Jake Potrebic 3a0373901e Add method to get ungenerated chunk from long key (#9254)
Also added a missing deprecation for a location block key method
2023-06-17 11:43:08 -07:00
Jake Potrebic c1ea5502d4 Remove more outdated config settings (#9358) 2023-06-17 11:25:22 -07:00
Jake Potrebic 38856661c0 Remove stacktrace on exception from reading server.properties (#9296) 2023-06-16 19:27:45 -07:00
Spottedleaf a226f44b45 Copy itemstack when sanitizing for datawatcher items
Since the packet is broadcasted for players, it means that
the packet will be sent to multiple players. In this case,
modifying the data results in a possible race condition
where a CME may occur as the packet will be serialized on
many different netty IO threads.
2023-06-16 10:27:59 -07:00
Spottedleaf f5551380b3 Make sure to post process chunks before they are sent to players
Some TEs need to be post processed after generation to be sent
properly (chests)
2023-06-16 10:25:26 -07:00
Spottedleaf 3f237e869a Fix IntegerUtil#getDivisorNumbers
Use unsigned mod operation for initialization of anc

Also includes
- https://github.com/PaperMC/DataConverter/commit/5a0cefb45e246ef36901fb62448571edd82e7296
- https://github.com/PaperMC/Starlight/commit/acc8ed9634bbe27ec68e8842e420948bfa9707e7
2023-06-16 09:05:36 -07:00
powercas_gamer 02e3b5a91a chore(api): add missing javadoc urls (#9355) 2023-06-16 16:34:49 +01:00
OllieandBjarne Koll 17966ddb8e Update the server logo (#9264)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2023-06-16 16:20:31 +01:00
Lulu13022002 f6139de06c Fix sniffer removeExploredLocation and javadoc (#9311) 2023-06-16 14:33:25 +01:00
Nassim Jahnke 81834ac54a Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
be1f3344 SPIGOT-7326: Add ClickType#isMouseClick()

CraftBukkit Changes:
3b557627c Fix Player#setScoreboard() checking incorrect state
9a21b0b89 SPIGOT-7393: Fix new tile entities not loading Bukkit's PersistentDataContainer

Spigot Changes:
c62f4bd9 Rebuild patches
2023-06-16 13:32:29 +02:00
Phillipp Glanz fa674f3d35 Don't enforce icanhasbukkit default if alias block exists (#9334) 2023-06-16 12:02:43 +01:00
Jake Potrebic b134eb406a Fix incorrect annotation on BrushableBlock#getItem (#9345) 2023-06-16 11:58:09 +01:00
Jake Potrebic 41e6f20420 Updated Upstream (Bukkit/CraftBukkit) (#9342)
Upstream has released updates that appear 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:
fdff0cd4 PR-869: Add Enderman#teleport and Enderman#teleportTowards
dfd86ee7 Improve sendSignChange and related documentation
beced2b2 PR-867: Add Player#sendBlockUpdate to send tile entity updates

CraftBukkit Changes:
ad6d0cffb SPIGOT-7394: Fix another issue with sendSignChange
66c5ce4c7 SPIGOT-7391: Preserve vanilla sign json where not modified by event
ae3824f94 PR-1204: Add Enderman#teleport and Enderman#teleportTowards
5863a2eae Fix sendSignChange not working
4a7eadc97 PR-1201: Add Player#sendBlockUpdate to send tile entity updates
789324e30 Work around issue placing decorated pots
2023-06-16 11:28:31 +01:00
Jason f7b386ddc7 Use ANSI serializer for console completion descriptions (#9351) 2023-06-15 10:11:09 -07:00
Jake Potrebic 8bc0574fb8 Bump kyori's ansi to fix color bleed (#9346) 2023-06-15 09:24:01 -07:00
Jake Potrebic bae6096aa2 Re-add dropped patch during 1.20 update (#9344) 2023-06-14 17:52:28 -07:00
Bjarne Koll 837cc25c51 Call BlockEntity#load in new child types (#9340)
BlockEntity#load is responsible for loading the pdc data for block
entities. Some of the new block entities added by mojang do not call
their super method, preventing paper from loading the PDC, which
leads to a loss of data.

This commit adds the super calls to prevent this.
2023-06-14 13:06:50 +02:00
powercas_gamer 62262d73d2 [ci skip] mention adventure in chatcolor deprecation message (#9336)
* mention adventure in chatcolor deprecation message

* expand text

* americans
2023-06-13 20:48:41 -07:00
Jason 2e363c73ba 1.20.1 (#9333) 2023-06-13 09:10:07 +02:00
Jake Potrebic c287e921a9 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9301) 2023-06-12 16:51:45 -07:00
Jason Penilla b48e2e352e Fix dev bundle generation 2023-06-12 16:44:07 -07:00
Emilia Kond 2d09115b3a Use net.kyori.ansi for console logging (#9313)
Uses the new ANSIComponentSerializer introduced in Adventure 4.14.0 to
serialize components when logging them via the ComponentLogger, or when
sending messages to the console.

This replaces the old solution which uses legacy jank and custom color
conversions, with a new library that handles the conversion and config
2023-06-12 15:00:12 -07:00
Bjarne Koll 87dfff4cfa Implement BossBarViewer on Player (#9332)
* Implement BossBarViewer on Player

Author: Riley Park <rileysebastianpark@gmail.com>

* Implement BossBar#viewers
2023-06-12 14:43:39 -07:00
Jake Potrebic de19eb8c4a fix incorrectly updated move vector checking patch (#9328) 2023-06-12 11:26:43 -07:00
Jake Potrebic f8cfdd4ba9 Fix SmithingInventory helper slot methods for 1.20 (#9325) 2023-06-12 19:04:53 +02:00
Lulu13022002 eb0693fff7 Fix EntityDeathEvent cancellation (#9323) 2023-06-12 19:03:51 +02:00
Bjarne Koll f4dfdcbb5b Fix sendSignChange0's usage of SignText (#9310) 2023-06-11 22:53:28 +02:00
Jake Potrebic 3722877c3c correctly hide players from entity argument suggestions (#9245) 2023-06-10 18:15:43 -07:00
Lulu13022002 e2e874f549 Add back the source uuid on exp orb for animals breeding (#9289) 2023-06-10 18:01:10 -07:00
Spottedleaf bc3496ea58 Fix incorrect collision shape for hopper item suck
It shouldn't cost too much more to check the correct shape,
provided that it is cached and we use the overall AABB
to collect possible entities to check against.

The issues with the old check code is that it will use two
getEntitiesOfClass calls plus the addition of streams
_and_ the toAabbs() logic on VoxelShape. The new code
caches toAabbs, uses one getEntitiesOfClass call, and
does not use streams. Then compared to 1.12, we are
only performing two additional AABB checks per item.
2023-06-10 13:42:03 -07:00
Spottedleaf 3d06377b24 Allow double removal from player chunk loader
Unlike Folia, players may be incorrectly be double-removed

Fixes https://github.com/PaperMC/Paper/issues/9299
2023-06-10 08:27:23 -07:00
Owen 2ffb704efa Don't use event to get block position (#9295) 2023-06-10 02:13:42 -04:00
Jake Potrebic dc30ee591d Properly remove the experimental smithing inventory type (#9290) 2023-06-09 20:50:00 +02:00
Jake Potrebic 0284b272d3 Add API for waxed signs (#9291) 2023-06-09 20:32:20 +02:00
Lulu13022002 648c000fb2 Add pitcher plant api (#9286) 2023-06-09 14:23:38 +02:00
Bjarne Koll 4b5f84712b Minimise EntityFertilizeEggEvent and add sniffer (#9280) 2023-06-09 09:01:08 +02:00
Jake Potrebic 4e3febbfe0 fix missing trigger entity for xp orb from breeding 2023-06-08 23:52:18 -07:00
Jake Potrebic f9fc44ff9f add side to PlayerSignCommandPreprocessEvent 2023-06-08 22:57:24 -07:00
Jake Potrebic 9ebf75d894 fix some more 1.20 tracking issues 2023-06-08 22:45:45 -07:00
Jake Potrebic c9e125f62a Fix setListenerRange for calibrated sculk sensors 2023-06-08 22:35:56 -07:00
Jason Penilla 9ada4bd7af Prevent the rcon thread from attempting connections after shutdown 2023-06-08 22:25:23 -07:00
Jake Potrebic ea9fdc393c Ignore inline definitions of trim material & pattern 2023-06-08 21:53:37 -07:00
Jake Potrebic 0d969f0a1b comment out update logic from build.gradle.kts 2023-06-08 21:31:56 -07:00
Jake Potrebic 82c64790f4 Add back Anti-Xray patch (#9283) 2023-06-08 21:29:58 -07:00
Owen1212055 e829a9d8f3 Fix javadoc 2023-06-08 22:53:42 -04:00
Owen1212055 6d74ad155f Finish tests & bad calls 2023-06-08 22:51:31 -04:00
Jake Potrebic 03c3587e2e fix not editable sign after openSign 2023-06-08 19:45:58 -07:00
Owen ccb194bbbb Move block farther away for Player#setRotation (#8514) 2023-06-08 22:37:59 -04:00
Lulu13022002 3621d76d8f Fix collision between AABB and a dot (#8733) 2023-06-08 22:17:32 -04:00
Lulu13022002 21f2d158c4 Avoid duplicate poi entries from the first section (#9235) 2023-06-08 22:14:30 -04:00
Jake Potrebic c9eb393d18 Updated Upstream (Bukkit)
Upstream has released updates that appear 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:
657df461 PR-686: Add missing trim patterns added in 1.20
2023-06-08 19:10:05 -07:00
Spottedleaf 04509f0234 Fix crash relating to "Already sent chunk"
Forgot to update the distandce field in the single user area map
on update, and additionally used the wrong radius (introduced
last commit) for the broadcast map
2023-06-08 18:00:46 -07:00
Spottedleaf 8ce5219e07 Fix inconsistent chunk sending with vanilla
Vanilla now loads the proper number of chunks for sending
to players. So, we can finally match their behavior after
all these years.
2023-06-08 17:45:54 -07:00
Jake Potrebic e325e37268 add missing call to EntityInsideBlockEvent 2023-06-08 17:34:35 -07:00
Jake Potrebic 59060aaec3 fix some failing tests 2023-06-08 17:26:05 -07:00
Owen1212055 9d428792c4 Fix breaking pots throwing exception 2023-06-08 20:24:12 -04:00
Jason Penilla aed9ef0788 Update adventure 2023-06-08 17:22:51 -07:00
Jake Potrebic 318a08c1db add missing block entity type to CraftBlockStates 2023-06-08 17:04:46 -07:00
Jake Potrebic a0a2e7287c fix sculk npe 2023-06-08 16:56:02 -07:00
Spottedleaf c1def9d852 Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appear 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:
fd92f1e65 SPIGOT-7378: Add BlockDropItemEvent for Suspicious Sand & Gravel drops
cb1b69d13 SPIGOT-7377: Server sends player list twice

Spigot Changes:
16cfc987 Rebuild patches
2023-06-08 16:47:58 -07:00
Spottedleaf 57a592466d Fix boot errors
Thanks kennytv
2023-06-08 16:44:34 -07:00
Spottedleaf efb4197a1b Fix final compilation issues 2023-06-08 16:35:02 -07:00
Spottedleaf 902691b636 Apply last patch 2023-06-08 16:21:20 -07:00
Spottedleaf 619d7c93d8 Add in some patches 2023-06-08 16:12:34 -07:00
Spottedleaf cc491a396e Finish updating chunk system patch
Add in locking changes from folia, plus fix some diffs.
I'm sure it'll be error-free.
2023-06-08 16:04:53 -07:00
Jake Potrebic 3fe0e32495 more compile fixes 2023-06-08 14:13:43 -07:00
Jake Potrebic f0aea8123e more compile fixes 2023-06-08 13:56:13 -07:00
Jake Potrebic 0a9e232f48 fix some more compile issues 2023-06-08 12:35:20 -07:00
Jake Potrebic 7002799587 fix FullChunkAccess enum move (#9281) 2023-06-08 12:22:12 -07:00
Jake Potrebic 37e689f367 fix more compile errors 2023-06-08 12:00:58 -07:00
Owen1212055 034edecc37 cleanup some descriptions + optimize hoppers patch 2023-06-08 14:10:23 -04:00
Jake Potrebic b4ae928db9 add some more patches back 2023-06-08 10:48:28 -07:00
Jake Potrebic 870dafe358 add 1 more networking patch and add comments to dropped patches 2023-06-08 10:25:32 -07:00
Jake Potrebic 1a0280ccc0 apply a couple network patches 2023-06-08 09:09:43 -07:00
Jake Potrebic f80338725e fix defaulting join-classpath to true for plugin deps 2023-06-08 06:50:41 -07:00
Nassim Jahnke a6628220d3 Update test plugin 2023-06-08 15:42:13 +02:00
Nassim Jahnke ad4eb2ec7d Fix bad fixup 2023-06-08 15:27:41 +02:00
Nassim Jahnke 4af62f6d1d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
2d009e64 Update SnakeYAML javadoc link
b4fd213c Switch Player#updateInventory deprecation for internal API annotation

CraftBukkit Changes:
f3b2b2210 SPIGOT-7376: Exception with getBlockData when hasBlockData is false
725545630 SPIGOT-7375: Fix crash breeding certain entities
b9873b0d4 Update Brigadier version with fix
68b320562 SPIGOT-7266: Found typo in CraftBukkit package
98b4d2ff8 SPIGOT-7372, SPIGOT-7373: Signs can't be edited, issues with SignChangeEvent
5f7bd4d78 SPIGOT-7371: Sign does not open edit text on placement
b4cf99d24 SPIGOT-7371: Fix editing signs with API
a2b6c2744 PR-1200: Implement open sign by side
a345bb940 SPIGOT-7368: Downgrade SpecialSource version

Spigot Changes:
723951c3 Rebuild patches
b655c57d Drop old collision API deprecated since 1.9.4
55b0fed4 Rebuild patches
2023-06-08 15:25:35 +02:00
Noah van der Aa 0cc83ea9b6 1.20: Remove Experimental API status where upstream forgot (#9271) 2023-06-08 15:04:43 +02:00
Bjarne Koll 2873869bb1 Drop manual isEditable copy in CraftSign
Signs no longer have a specific isEdiable state, the entire API in this
regard needs updating/deprecation. The boolean field is completely gone,
replaced by a uuid (which will need a new setEditingPlayer(UUID) method
on the Sign interface), and the current upstream implementation of
setEdiable simply flips the is_waxed state.

This patch is hence not needed as it neither allows editing (which will
be redone in a later patch) nor is required to copy the is_waxed boolean
flag as it lives in the signs compound tag and is covered by applyTo.
2023-06-08 11:35:39 +02:00
Bjarne Koll 1c12701691 Update fluid chunk loading patch 2023-06-08 11:18:51 +02:00
Bjarne Koll d5682d77c3 Minimize strict-advancement-dimension-checks.patch 2023-06-08 10:53:00 +02:00
Owen1212055 aa1c25c88d vine boom sound 2023-06-08 04:47:19 -04:00
Owen1212055 bab0b3a7c3 YOU get patches 2023-06-08 04:08:08 -04:00
Owen1212055 b05cd80334 Fix scuffed patches 2023-06-08 03:57:42 -04:00
Owen1212055 605e66c5de re-patched 2023-06-08 03:40:45 -04:00
Owen1212055 91b45c49ce Patched 2023-06-08 03:20:03 -04:00
Owen1212055 6d118492b6 Some chunk patches 2023-06-08 02:31:22 -04:00
Spottedleaf 74ad522fc5 Rebase chunk patches 2023-06-07 22:26:06 -07:00
Spottedleaf 819facd7c4 rewrite chunk system checkpoint 2023-06-07 22:26:06 -07:00
Spottedleaf 0c4a1c4496 Clean rebuild
Add to gradle build so that this is automatically done
throughout the update
2023-06-07 22:26:06 -07:00
Jake Potrebic de18bb96e8 actually update to 1.20 2023-06-07 20:33:11 -07:00
Jake Potrebic 20aaebbd47 update reobf-mappings-patch.tiny 2023-06-07 20:30:34 -07:00
Jake Potrebic 13ab8b77d3 signing off for now 2023-06-07 19:12:38 -07:00
Jake Potrebic 47c5d82017 some more stuffs 2023-06-07 19:04:01 -07:00
Jake Potrebic 1eba407610 finished some more patches 2023-06-07 18:13:54 -07:00
Jake Potrebic 236eabd751 some more patches 2023-06-07 17:54:54 -07:00
Jake Potrebic c13b259ff2 fix compile errors 2023-06-07 17:30:05 -07:00
Jake Potrebic ac1a626493 45 more patches 2023-06-07 16:56:33 -07:00
Jake Potrebic 0ca9f14d58 finish some more patches 2023-06-07 16:44:11 -07:00
Noah van der Aa b1a2378144 1.20: Fix a bunch of compile issues (#9273) 2023-06-07 16:21:20 -07:00
Jake Potrebic f0889559f3 even moaaar patches 2023-06-07 16:20:26 -07:00
Jake Potrebic c31a22c563 even moar patches 2023-06-07 15:58:10 -07:00
Jake Potrebic 44e22b45a5 more patches 2023-06-07 15:41:25 -07:00
Jake Potrebic 0b8147f68e fix a bunch of compile errors 2023-06-07 15:28:06 -07:00
Jake Potrebic 8f7a7ec440 more work and compile fixes 2023-06-07 15:12:41 -07:00
Jake Potrebic e09a44e169 fix some compile issues 2023-06-07 14:46:56 -07:00
Nassim Jahnke 3c8e176265 Some compile fixes 2023-06-07 23:37:08 +02:00
Nassim Jahnke 838d8afd76 More more more more more more more more work 2023-06-07 23:18:26 +02:00
Nassim Jahnke c1f313b273 More more more more more more more work 2023-06-07 22:41:26 +02:00
Nassim Jahnke 7f384988cd More more more more more more work 2023-06-07 22:19:14 +02:00
Nassim Jahnke 3fed7289ed More more more more more work 2023-06-07 21:54:11 +02:00
Noah van der Aa 94aa4b518a Fix API compile issues (#9269) 2023-06-07 21:47:39 +02:00
Nassim Jahnke 0ed49782c5 More more more more work 2023-06-07 21:37:42 +02:00
Nassim Jahnke 474a02835d More more more work 2023-06-07 21:21:43 +02:00
Nassim Jahnke 01f5831171 More more work 2023-06-07 20:49:17 +02:00
Nassim Jahnke 197786ead0 More more work 2023-06-07 20:31:32 +02:00
Nassim Jahnke c1bbde4bc6 Let's hope this is fine 2023-06-07 20:08:03 +02:00
Nassim Jahnke 3fbb00319f More work 2023-06-07 19:18:05 +02:00
Nassim Jahnke 965cf53cd5 Start working on 1.20 2023-06-07 19:06:55 +02:00
Owen bc4a6647c9 Paper Plugins Dependency Format Update (#9160)
* Rework dependency management (WIP)

* Revert "Rework dependency management (WIP)"

This reverts commit e046cd59c68743dc00303b1ab42317bf474abd6a.

* Correctly add soft dependencies to the dependency tree for classloading resolution

* Add support for new dependency config format

* Rebase

* swap load order meaning

* Dependencies should be required by default
2023-06-07 08:41:25 -07:00
Jake Potrebic 175a774247 [ci skip] Use a separate interface for bootstrapping (#9267) 2023-06-07 08:29:28 -07:00
Jake Potrebic 14cfd64d2d Schedule several things for removal in 1.21 (#9041) 2023-06-07 15:47:32 +02:00
Nassim Jahnke d8e07590e3 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
5dbedae1 PR-864: Fix Registry#match() failing namespaced inputs
49256865 PR-863: Fix boolean PersistentDataType
9f15450b SPIGOT-7195, SPIGOT-7197: Add DataPack API
ebef5b6a Disable InterfaceIsType Checkstyle check
01d577f5 Slight tweak to boolean PersistentDataType javadoc
d2b99e56 PR-857: Add boolean PersistentDataType

CraftBukkit Changes:
2270366cd PR-1196: Test Registry instances more thoroughly
863dacb7a PR-1191: Do not start on pre-release Java 17
1f2dd8e12 SPIGOT-7362: Properly handle null in CraftBlock#blockFaceToNotch()
dbc70bed5 SPIGOT-7195, SPIGOT-7197: Add DataPack API
2023-06-06 11:09:19 +02:00
Malfrador 956062a5d5 Add transient modifiers (#9244)
This allows adding modifiers as transient. Transient modifiers don't get saved with the NBT data.
Vanilla itself uses transient modifiers for speed modifications like sprinting or powder snow. This just exposes it in the API.
2023-06-05 13:15:18 -04:00
Jake Potrebic d8d3bd70b0 [ci skip] Add missing deprecations for legacy MaterialData api (#9253) 2023-06-03 11:09:43 -07:00
Jake Potrebic 8a18fc55ab [ci skip] add 'needs triage' label to invalid on issue close (#9252) 2023-06-03 10:43:38 -07:00
Jake Potrebic bacbf86ed2 Fixes and additions to projectile API (#9237) 2023-05-31 19:43:51 -07:00
Jake Potrebic 2eda177116 Expand PlayerItemMendEvent (#7382) 2023-05-31 16:58:25 -07:00
Jake Potrebic ea0b63992c Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9228)
Upstream has released updates that appear 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:
4727d326 Don't let Sign extend SignSide, mark API as experimental
9b29bdcc PR-845: Add preliminary support for multi sided signs

CraftBukkit Changes:
b346a5f6d PR-1170: Add preliminary support for multi sided signs
86c816189 Update SQLite version
d9324b4bc Fix addition of custom smithing trim / transform recipes

Spigot Changes:
7d7b241e Rebuild patches
2023-05-31 16:36:57 -07:00
Jake Potrebic fa8fa1ce08 Fix playing adventure sounds on World/Server (#8077) 2023-05-30 18:36:16 -07:00
Lulu13022002 0f91091ccc Re-implement the compost events (#9192) 2023-05-30 18:07:04 -07:00
Spottedleaf f9f90791e4 Pull a few Folia patches 2023-05-27 20:34:33 +02:00
Nassim Jahnke 90a0835f43 Fix incremental player saving patch 2023-05-27 20:14:04 +02:00
Lulu13022002 bcd8dc2c11 Use the spigot config for mangrove propagule / torchflower growth (#8597) 2023-05-15 14:25:38 -04:00
Lulu13022002 b6817605ce Fix note block sound property on player heads (#9158) 2023-05-15 13:32:26 -04:00
Warrior a61b4845f2 Fix MC-224454 (#9195) 2023-05-15 11:33:15 -04:00
Warrior 4ba5aacc37 More accurate isInOpenWater impl (#9194) 2023-05-15 11:21:57 -04:00
Lulu13022002 5b66d33a77 Call EntityChangeBlockEvent for frogs egg (#9213) 2023-05-15 12:56:12 +02:00
Owen f8603a46a8 Avoid Lazy Initialization for Enum Fields (#9210) 2023-05-14 20:46:17 -04:00
Noah van der Aa 57fdc668fa Undeprecate Server#getMap (#9185)
The only way to get a map is via its id, which is not a magic value. This implementation isn't going to be changing anytime soon, so it should be undeprecated.
2023-05-14 20:23:57 -04:00
Jake Potrebic ab7bc3fb34 Remove javadoc that doesn't apply to Paper (#9206) 2023-05-14 19:20:43 -04:00
booky10 9daa019d6c Added wither vanilla invulnerability API (#9124) 2023-05-12 15:24:50 -05:00
Redned 1edfefdef8 Add option to flush region files on save (#9149) 2023-05-12 15:07:24 -05:00
Nassim Jahnke efd47e3a68 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9188)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
2fcba9b2 SPIGOT-7347: Add missing documentation and details to ShapedRecipe
c278419d PR-854: Move getHighestBlockYAt methods from World to RegionAccessor
201399fb PR-853: Add API for directly setting Display transformation matrices
ecfa559a PR-849: Add InventoryView#setTitle
653d7edb SPIGOT-519: Add TNTPrimeEvent
22fccc09 PR-846: Add method to get chunk load level
a070a52c PR-844: Add methods to convert Vector to and from JOML vectors
cc7111fe PR-276: Add accessors to Wither's invulnerability ticks
777d24e9 SPIGOT-7209: Accessors and events for player's exp cooldown
ccb2d01b SPIGOT-6308: Deprecate the location name property of map items
cd04a31b PR-780: Add PlayerSpawnChangeEvent
7d1f5b64 SPIGOT-6780: Improve documentation for World#spawnFallingBlock
5696668a SPIGOT-6885: Add test and easier to debug code for reference in yaml configuration comments
2e13cff7 PR-589: Expand the FishHook API
2c7d3da5 PR-279: Minor edits to various Javadocs

CraftBukkit Changes:
01b2e1af4 SPIGOT-7346: Disallow players from executing commands after disconnecting
7fe5ee022 PR-1186: Move getHighestBlockYAt methods from World to RegionAccessor
bcc85ef67 PR-1185: Add API for directly setting Display transformation matrices
a7cfc778f PR-1176: Add InventoryView#setTitle
563d42226 SPIGOT-519: Add TNTPrimeEvent
ccbc6abca Add test for Chunk.LoadLevel mirroring
2926e0513 PR-1171: Add method to get chunk load level
63cad7f84 PR-375: Add accessors to Wither's invulnerability ticks
bfd8b1ac8 SPIGOT-7209: Accessors and events for player's exp cooldown
f92a41c39 PR-1181: Consolidate Location conversion code
10f866759 SPIGOT-6308: Deprecate the location name property of map items
82f7b658a PR-1095: Add PlayerSpawnChangeEvent
b421af7e4 PR-808: Expand the FishHook API
598ad7b3f Increase outdated build delay

Spigot Changes:
d1bd3bd2 Rebuild patches
e4265cc8 SPIGOT-7297: Entity Tracking Range option for Display entities

* Work around javac bug

* Call PlayerSpawnChangeEvent

* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
2fcba9b2 SPIGOT-7347: Add missing documentation and details to ShapedRecipe
c278419d PR-854: Move getHighestBlockYAt methods from World to RegionAccessor
201399fb PR-853: Add API for directly setting Display transformation matrices

CraftBukkit Changes:
01b2e1af4 SPIGOT-7346: Disallow players from executing commands after disconnecting
7fe5ee022 PR-1186: Move getHighestBlockYAt methods from World to RegionAccessor
bcc85ef67 PR-1185: Add API for directly setting Display transformation matrices

Spigot Changes:
7da74dae Rebuild patches
2023-05-12 13:10:08 +02:00
Warrior 688409279f Fix lightning being able to hit spectators (#9193) 2023-05-08 16:17:00 +02:00
Bjarne Koll 1d4c7806ff Fix BlockPosition#offset(double,double,double) (#9190) 2023-05-07 14:14:34 +02:00
Nassim Jahnke 813d0399f9 Make sure the player didn't disconnect when processing commands 2023-05-06 17:10:22 +02:00
Lulu13022002 9846d0d89e Fix some NPE for EntityCompostItemEvent (#9169) 2023-05-03 12:07:51 +01:00
Pedro 83da4b6101 Fix DamageSource for Falling Blocks (#9175) 2023-05-03 11:50:59 +01:00
Spottedleaf 4f9575eed8 Break redstone on top of trap doors early
This logic hooks into the neighbour update which should be invoked
as a result of redstone powering the trap door.
2023-05-01 18:32:30 -07:00
Lukas AltandShane Freeder bcec5b11e6 Fixed large packet handling (#9147)
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2023-04-27 19:50:14 +01:00
GodOfPro f4ce997a42 Add Mob Experience reward API (#9122) 2023-04-27 19:49:19 +01:00
Jason 2cccbbe1f4 [ci skip] Update Gradle plugins and wrapper (#9140) 2023-04-26 10:07:13 -07:00
Owen 936205beae Disable allowListing before received from client (#9167) 2023-04-23 21:24:12 -04:00
Owen 5c4671a9bf Fix LegacyPluginLoader dependency registration (#9165) 2023-04-23 02:55:10 +01:00
Owen 8e3009e0db Resolve Plugin Dependency Issues, Improve PluginLoading Compat, Small Loading Issues (#9129) 2023-04-22 12:44:40 -05:00
Jakub Zacek f7717c3712 Fix server ignoring fallback for translatable components (#9134) 2023-04-20 08:05:41 +01:00
Emily beed22d336 Undo making JavaPlugin#logger field public (#9125) 2023-04-19 16:46:09 +01:00
Luke Chambers dd216c1f09 Fix Inconsistencies with Paper Plugin Names (#9098) 2023-04-16 11:49:13 -05:00
Jake Potrebic 6d2121efde Removes some references to deprecated methods/types (#9043) 2023-04-15 18:13:59 -07:00
Warrior 23a443eeaa Fix demo flag not enabling demo mode (#9103) 2023-04-15 18:30:23 -05:00
Shane Freeder 8d040fad9b Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
465c4964 PR-843: Add damage methods to FallingBlock
46ba7c9f SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name

CraftBukkit Changes:
818582f40 PR-1169: Add damage methods to FallingBlock
15a3eac66 SPIGOT-7335: Fix typo in TextDisplay#TextAlignment enum name
f01fb4979 SPIGOT-7336: Fix typo in internal method name
2023-04-14 00:52:42 +01:00
Matt Artist bd35d605e8 [ci-skip] Fix missing closing quote (#9126) 2023-04-11 17:57:56 -07:00
DungeonDev e338793603 Optimize hoppers by not trying to merge full items. (#9110)
This can skip many very expensive call to ItemStack.tagMatches.
Makes canMergeItems return false for merging into ItemStacks that are already full.
2023-04-11 15:35:54 +02:00
Jake Potrebic 5ffdff8822 Fix a couple of bed bugs (#9112) 2023-04-10 15:12:22 -07:00
Shane Freeder e811927394 Revert "Resolve Plugin Dependency Issues, Improve PluginLoading Compat, Small Loading Issues (#9068)"
This reverts commit f8d2f823db.
2023-04-10 11:25:04 +01:00
Redned 8be7a60b76 Fix getBrightness and getRawBrightness throwing exception in BlockStateListPopulator (#9111) 2023-04-10 10:06:49 +02:00
caramel ab72b123ec Update Adventure to 4.13.1 (#9113) 2023-04-10 10:06:38 +02:00
Nassim Jahnke 058d7c1aa3 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
13eb4146 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent

CraftBukkit Changes:
5ee3419b7 SPIGOT-5217, SPIGOT-6183: Add RespawnReason to PlayerRespawnEvent

Spigot Changes:
514cf03a Rebuild patches and add RespawnReason.PLUGIN to Player#respawn
2023-04-10 10:03:36 +02:00
Shane Freeder b626528da0 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
de5ba402 PR-848: Mark get/setCatType methods deprecated in addition to the enum

CraftBukkit Changes:
50ee87fbc SPIGOT-7333: Correctly handle null in ColorableArmorMeta#setColor()
790be710b SPIGOT-7332: Persistent Data Container of Chunk not saving on stop or restart.
2023-04-09 23:38:03 +01:00
Owen f8d2f823db Resolve Plugin Dependency Issues, Improve PluginLoading Compat, Small Loading Issues (#9068) 2023-04-09 23:28:30 +01:00
Jake Potrebic 6a7fef0e4a Allow entity effect changes off the main thread for worldgen (#8942)
* Allow entity effect modification off the main thread for worldgen

* squash all async catcher patches
2023-04-09 11:38:32 -07:00
Jake Potrebic f8c01122e6 [ci skip] add missing labels to project status map (#9106) 2023-04-09 09:00:43 +02:00
Shane Freeder 9cda28480e Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
aeb62aa3 Remove obsolete documentation from ArmorMeta#setTrim

CraftBukkit Changes:
cb6f3c028 PR-1173: Change CraftMinecartTNT to public for consistency
2023-04-09 01:13:38 +01:00
Jake Potrebic b5ce6e3dc5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9104)
Upstream has released updates that appear 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:
eb4b416d PR-822: Add experimental armor trim API
33498e1d PR-831: Add a standard of annotations for Minecraft experimental things and API

CraftBukkit Changes:
19de3550d SPIGOT-7315: Bed placement duplicates crops if cancelled
1eb88374e PR-1147: Add experimental armor trim API
c4c0bb0e9 Show clean error for invalidly configured server.properties options
3ae90697f Fix UUID not being updated when changing world of MapView
e43000601 PR-1164, MC-227255, MC-253819: Fix rotation of beehives and bells

Spigot Changes:
d2fdfe39 Rebuild patches
2023-04-09 01:00:50 +01:00
Jake Potrebic 29b17a892d Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9088)
Upstream has released updates that appear 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:
5efeb7bd Also update compiler version
c13b867a Update some Maven plugin versions
deb28d9f PR-837: Add more bell API
e938d62a PR-819: Allow Player#sendBlockDamage() to specify a source entity
0e75532c PR-818: Add more Guardian API, particularly for its laser
a10155aa PR-839: Add BlockData#rotate and BlockData#mirror
77e690b4 PR-836: Add missing API for explosive minecarts
60722059 PR-832: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
0a2c4b4b PR-834: Add Player#sendHurtAnimation()

CraftBukkit Changes:
be8682aa8 Also update compiler version
08e305f5b Update some Maven plugin versions
187bdd463 PR-1160: Add more bell API
2f8e5bc7c PR-1145: Allow Player#sendBlockDamage() to specify a source entity
bcbb61b36 PR-1144: Add more Guardian API, particularly for its laser
722ddff6d PR-1162: Add BlockData#rotate and BlockData#mirror
80998277c PR-1159: Add missing API for explosive minecarts
1fddefce1 PR-1155: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks
20e8a486f PR-1157: Add Player#sendHurtAnimation()

Spigot Changes:
b31949f2 Rebuild patches
2023-04-07 19:39:13 +01:00
Jake Potrebic ad6c14c62e Fix unknown cmd msg for mc namespaced cmds (#9059) 2023-04-06 19:27:41 -05:00
Alex e9f6e7ae8a Properly resync player on Player#setPlayerProfile (#9080)
Currently breaking are potion effects and the XP bar, both are now being resent to make the client know about them again.
2023-04-06 18:21:33 -05:00
Shane FreederandOwen1212055 f5677aa472 Fix TPS command output (#9091)
* Fix TPS command output

* Cleanup + rebase

---------

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-04-06 18:08:44 -05:00
Lulu13022002 3c8c22323f Fix some broken block place logic (#9094)
- The dispensed shulker will not play the place sound (due to its logic been removed)
- The hanging sign text editor cannot be cancelled using the BlockPlaceEvent (not consistent with the other regular signs)
- The jukebox logic hasn't been synced with the RecordItem
2023-04-06 17:39:32 -05:00
Jake Potrebic dab4864a11 [ci skip] add workflow for auto-managing issue board (#8958)
* add workflow for auto-managing issue board

* make concurrency depend on the issue number

* generate token in the action
2023-04-06 14:19:06 -07:00
Warrior 9b77660f07 Port airplane's use array for gamerule storage patch (#9087) 2023-04-06 14:18:45 +02:00
Shane Freeder 9367e6e6b3 Prevent GameEvents being fired from unloaded chunks 2023-04-06 12:42:10 +01:00
BlockyTheDev e6ef1bae88 [ci skip] Update download urls (#9100) 2023-04-04 17:06:59 -07:00
Harry Devane 497b91939c Fix ignoreCancelled having no effect on events registered by direct EventExecutor (#9099) 2023-04-04 22:40:31 +01:00
Lulu13022002 641dafd0a8 Cleanup some patches (#9093) 2023-04-04 11:47:16 +02:00
Shane Freeder 08491449ae Do not send expired keys to players on login (#9090)
This patch will prevent sending expired keys to players when logging into a server, while the client does have some grace period to prevent issues, if a key has expired beyond the grace period, connecting clients will be disconnected from the server upon join. The client should update keys before this key even expires, and a new key will be broadcasted out if we somehow actually get one.
2023-04-03 10:45:02 +01:00
Jake Potrebic 9893e2b734 Deprecate ChatColor (#9069)
All API that uses it is deprecated
2023-04-02 11:53:29 -07:00
elmital 1d2fe64da8 fix: null SpawnReason for new player (#9015) 2023-04-02 13:37:53 -05:00
Cody 50e683de14 Added a config option for ticking markers (#9034) 2023-04-02 13:21:13 -05:00
Jake Potrebic dc08c74cb3 Remove duplicate animate packet for records (#8600) 2023-04-02 13:05:30 -05:00
Owen 5fb3ab0109 Allow non player entities in scoreboards by default (#9082)
This in general caused much more confusion than needed, and in general, made rather negligible performance gains on collision.
2023-04-02 12:53:11 -05:00
Fejby 1704bf782e [ci skip] Edit Paper download link in README (#9077) 2023-03-31 18:25:50 +02:00
powercas_gamer 7a96bf2095 Make debug dump file names consistent (#9075) 2023-03-31 13:17:57 +02:00
Shane Freeder 11ab383e4f Don't use plugin-profiling to enable timings
The paper config has taken precidence over this for a long time
with 0 complaints, and now it's tripping the deprecation warning,
even if timings is disabled in the paper config.
2023-03-31 05:47:59 +01:00
Lulu13022002 06fdc02537 [ci skip] Correct upstream/paper javadoc (#8286) 2023-03-30 21:09:13 -07:00
Nassim Jahnke bf92f3e4db Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
9153f77e PR-841: Remove incorrect ClickType.CONTROL_DROP from ClickType#isShiftClick
bceda6ab PR-840: Adjust annotations in Display entity interface
a6b85ac3 PR-835: Add Jukebox#hasRecord() and #startPlaying(), clarify #setRecord()

CraftBukkit Changes:
e142fb9fd SPIGOT-7188: ChunkSnapshot biome y coordinate doesn't match chunk biome y coord
eff1743b9 SPIGOT-7313: More accurately edit data on Jukeboxes
2023-03-30 15:40:15 +02:00
Riley Park cbcdfd03e7 Make other link in deprecation message clickable too 2023-03-29 19:35:26 -07:00
Jake Potrebic ef5fa90932 Fix crash relating to bad recipes in furnace-like tile entities (#9011) 2023-03-30 03:29:38 +01:00
Riley Park a13759afcc Turn deprecation message into a Component to be used in the command at a later date 2023-03-29 19:15:21 -07:00
Riley Park 32875b429a 8948: Nag when timings is enabled or a plugin creates a new Timing 2023-03-29 12:30:37 -07:00
Jake Potrebic 5c78e77da5 Fix api checking banned ips (#9026) 2023-03-27 20:23:34 -07:00
Nassim Jahnke 9940019ff8 Deprecate public Timings classes for removal (#8949) 2023-03-27 19:58:46 -07:00
Ryan ce2a36dbd6 Fix PluginMeta#getDisplayName (#9038)
* fix plugin versioning

* fix properly

* fix version command

* ngl idk where my logic was behind this
2023-03-27 19:56:09 -07:00
Jason bd62f2c2dd Fix chat messages being logged without formatting to console (#9058) 2023-03-27 10:19:23 -07:00
Jake Potrebic fbf74ba0ac Updated Upstream (CraftBukkit) (#9053)
Upstream has released updates that appear 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:
f92c94517 SPIGOT-7310: PlayerToggleSneakEvent is not called when a player sneaks while riding an entity
b5714184d SPIGOT-7316: Cancelling EntityUnmountEvent does not stop the all effects of the unmounting
e237f8c88 SPIGOT-7312: Entity#setVisibleByDefault on player causes skin reset on this player client
2023-03-26 13:29:41 -07:00
Jake Potrebic a622ebacd4 Fix beehives generating from using bonemeal (#9052) 2023-03-26 12:07:32 -07:00
Emily d5abb94e69 Expose Path to jar file in PluginProviderContext (#9030)
* Expose Path to jar file in PluginProviderContext

* rename accessor, reword jd
2023-03-24 23:30:48 -07:00
Jake Potrebic 38be4f873b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9018)
Upstream has released updates that appear 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:
2c64d8c4 SPIGOT-7309: Add API for jukebox inventories
a6d7e4ca PR-826: Add Sniffer API

CraftBukkit Changes:
93813509b SPIGOT-7309: Add API for jukebox inventories
2d5209e8d PR-1153: Handle teleport reason in spreadplayers command
f5b61387e SPIGOT-7308: Fix NullPointerException when calling Jukebox#setRecord()
388d458a6 SPIGOT-7306: Fix reset of coords in default teleportTo in EntityPlayer
40b87e1af PR-1150: Add Sniffer API and handle EntityItemDropEvent

Spigot Changes:
6ad4b93c SPIGOT-7298: Fix debug stick always permission left click toggle
2023-03-24 13:38:40 -07:00
Jake Potrebic a0f548f5ec Don't warn for deprecated PrepareGrindstoneEvent (#9036) 2023-03-24 13:19:17 -07:00
Jake Potrebic 23b0ef524a [ci skip] rebuild patches 2023-03-23 14:57:03 -07:00
Riley Park 9087a644a3 chore: cleanup annotations in api adventure patch 2023-03-23 10:51:08 -07:00
Nassim Jahnke 92f872c146 Fix bad diff in wandering trader spawn rate patch from .4 update 2023-03-23 14:35:17 +01:00
Jake Potrebic e8b82590d0 [ci skip] Properly document firing of Entity/BlockExplodeEvent (#9014) 2023-03-20 02:11:23 -07:00
Jake Potrebic 7af4cd3647 Updated Upstream (Bukkit/CraftBukkit) (#9013)
* Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear 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:
150a2861 PR-827: Add BlockData#getPlacementMaterial
58c9c8ce SPIGOT-7301: Prevent creating non-openable inventories
3741079b PR-824: Expand upon PotionEffect API to better accommodate infinite durations

CraftBukkit Changes:
e5a7921f0 PR-1149: Add BlockData#getPlacementMaterial
58504fa61 SPIGOT-7302: Fix more issues with EntityDamageByEntity - Fix Projectile damage by dispenser - Fix cases where only exists a direct entity damager
48394703d Increase outdated build delay

* Improve docs for BlockData#getPlacementMaterial
2023-03-20 01:47:10 -07:00
Jake Potrebic c7520ec49d Use class loggers without the fqn for non-debug logging (#9012) 2023-03-20 09:23:52 +01:00
JOO200 ff603cb76d adventure: make calls with generic component lists more usable (#9008)
This should allow the usage of ItemStack#lore and other methods with a List<TextComponent>
2023-03-20 09:18:06 +01:00
Jake Potrebic 7929540ba3 update paperclip to 3.0.3 2023-03-19 22:18:33 -07:00
Jake Potrebic 83948f6f59 Fire reload event after everything has been reloaded (#9003)
This event is going to be more important very shortly (hopefully)
2023-03-19 12:28:28 -07:00
Jake Potrebic eb0950290d Fix entity damage event triggers (#8995) 2023-03-19 11:58:34 -07:00
Jason 662b85e00e Use random UUIDs instead of incrementing long for click callback ids (#9007) 2023-03-19 11:25:45 -07:00
Emily 510082222b Re-enable multi-release plugin JARs (#9001) 2023-03-19 15:50:13 +01:00
Jake Potrebic 055f7228f0 Add back optimize hoppers (#8999) 2023-03-18 12:03:42 -07:00
Nassim Jahnke 2a024870de Fix setItem with air on chiseled bookshelves 2023-03-18 18:52:24 +01:00
Jake Potrebic 11f5158eaa Fix SpawnEggMeta#get/setSpawnedType (#8907) 2023-03-18 10:32:03 -07:00
Jake Potrebic 5730a94208 Updated Upstream (Bukkit/CraftBukkit) (#8991)
Upstream has released updates that appear 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:
2b4582fb SPIGOT-5916: getLastColors does not work with the rgb colors

CraftBukkit Changes:
f7707086d SPIGOT-7299: Fix indirect/anvil damage events and minor improvements
2023-03-18 10:05:04 -07:00
Owen 79db3a2a4b Add Shearable API (#6796) 2023-03-17 16:11:08 -05:00
Jake Potrebic 02bc2eca34 Fix reobf creating unintentional overrides (#8992) 2023-03-17 19:23:15 +01:00
Jake Potrebic 85a67dadf2 Fix certain inventories returning null Locations (#8985) 2023-03-16 11:47:05 -07:00
XanderDeKeijzer 646f590779 Fix changeGameModeForPlayer to use gameModeForPlayer MC-259571 (#8987) 2023-03-16 17:06:40 +01:00
Nassim Jahnke 5a1e1584aa Fix text display error on spawn
Fixes #8984
2023-03-16 16:28:48 +01:00
Nassim Jahnke fe881073af Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
2651717c SPIGOT-7292: Support for alpha channel in Color and a few improvements

CraftBukkit Changes:
dbc32ffa0 SPIGOT-7292: Support alpha channel in Display entities
cef8bd993 SPIGOT-7294: Call EntityDamageEvent for Interaction entity
2023-03-16 10:07:12 +01:00
Jake Potrebic 4f933b2405 Fix structure loading 2023-03-15 18:57:33 -07:00
Jake Potrebic a2918a5fea Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
3a54fb16 SPIGOT-7296: Add ItemFlag#HIDE_ARMOR_TRIM

CraftBukkit Changes:
55056ad80 SPIGOT-7295: Fix Sniffer data defined in incorrect position
2023-03-15 12:59:34 -07:00
Nassim Jahnke 9b0e97b75b Update DataConverter 2023-03-15 20:19:36 +01:00
Owen eb0232ef09 Camel EntityToggleSitEvent (#8970) 2023-03-15 15:37:41 +01:00
Nassim Jahnke 73cf1257ca Update adventure to 4.13.0 2023-03-15 13:21:52 +01:00
Jake Potrebic 647cf31e61 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
fdef9473 Correct Material#isFuel for new experimental materials
42811598 SPIGOT-7293: Add Biome#CHERRY_GROVE

CraftBukkit Changes:
968d28df0 Fix availability of experimental datapack features in unit tests
2023-03-15 04:54:45 -07:00
Nassim Jahnke 3bc992d8f2 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
e1fc95c50 Fix crash with 1.20 smithing table
04dfb921d Fix crash with juke boxes
1264a6fb5 Fix crash with composters
2023-03-15 10:33:43 +01:00
Jake Potrebic 72a9f8a9b8 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
02ff2f89 SPIGOT-7292: Deprecate display color APIs while specifics are worked out

CraftBukkit Changes:
703575fc7 SPIGOT-7291: Fix spurious invert in ender pearl disconnect check
2023-03-14 22:27:45 -07:00
Jake Potrebic 92a019385d HIDE_UPGRADES and fixes for sniffer and new smithing table 2023-03-14 20:04:41 -07:00
Jake Potrebic 28d49a1b58 Fix jukeboxes 2023-03-14 19:17:28 -07:00
Jake Potrebic 2c485d1485 Fix composter throwing UOE with new game event 2023-03-14 18:27:20 -07:00
Jake Potrebic ffab9f2bc1 Add back item entity global player list check 2023-03-14 17:36:12 -07:00
Jake Potrebic 482dfc2db0 make tests work again 2023-03-14 17:21:35 -07:00
Jake Potrebic b93379bd7f Add missing annotation 2023-03-14 17:08:41 -07:00
Jake Potrebic 3e54639d9c readd exploded block state patch 2023-03-14 17:06:28 -07:00
Jake Potrebic c225146bc9 Add component methods to TextDisplay entity 2023-03-14 16:52:28 -07:00
Jake Potrebic 94604b6474 Fix icon in timings 2023-03-14 16:44:53 -07:00
Jake Potrebic dbeef458b2 make tests pass 2023-03-14 16:29:38 -07:00
Jake Potrebic 0f17027652 fix more compile errors 2023-03-14 16:10:18 -07:00
Jake Potrebic 72923817d6 fix some compile errors 2023-03-14 15:13:41 -07:00
Nassim Jahnke 7954d96905 One fix 2023-03-14 22:35:03 +01:00
Nassim Jahnke 7d24f2ef06 Applied all patches 2023-03-14 22:29:14 +01:00
Nassim Jahnke 18d51375b8 More more more more more more more more patches 2023-03-14 22:10:53 +01:00
Nassim Jahnke 1295869b43 More more more more more more more patches 2023-03-14 21:58:00 +01:00
Jake Potrebic bacf389fc3 Use adventure serializer when serializing an adventure component in a codec (#8967) 2023-03-14 21:27:18 +01:00
Nassim Jahnke 9dccea73fb More more more more more more patches 2023-03-14 21:25:13 +01:00
Nassim Jahnke 0f5c422d24 More more more more more patches 2023-03-14 20:54:57 +01:00
Jake Potrebic f4c92b410c Add more experimental annotations 2023-03-14 12:53:01 -07:00
Nassim Jahnke 0e2d6d6550 More more more more patches 2023-03-14 20:24:52 +01:00
Nassim Jahnke bdeb519d1b More more more patches 2023-03-14 19:59:51 +01:00
Jake Potrebic 562e74263b update adventure docs link in bungeecord-chat javadocs 2023-03-14 11:59:28 -07:00
Jake Potrebic 8149f115ef update reobf-mappings-patch.tiny 2023-03-14 11:47:04 -07:00
Nassim Jahnke 9a731dc325 More more patches 2023-03-14 19:38:47 +01:00
Jake Potrebic cf4eac0a17 mark experimental api correctly and add missing isFuel 2023-03-14 11:08:41 -07:00
Nassim Jahnke 2b6be6f1b3 More patches 2023-03-14 19:05:23 +01:00
Nassim Jahnke 2cd29ddbb5 API 'done' 2023-03-14 18:21:11 +01:00
Nassim Jahnke 2ed604cf72 Start working on 1.19.4 2023-03-14 18:11:24 +01:00
Jake Potrebic 155aa36d89 Properly handle load before plugins in legacy loading (#8962) 2023-03-12 11:00:02 -07:00
Moulberry 18470db17f Fix getTargetEntity not targeting creative players (#8960) 2023-03-12 12:50:02 +00:00
Jake Potrebic 4e994669d3 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8874)
Upstream has released updates that appear 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:
6b3c598b PR-814: Add a method to send multiple equipment changes
181a984b Update Maven shade version to align with CraftBukkit
a5a36e32 Revert "Update Maven shade version to align with CraftBukkit"
7a8f4a42 Update Maven shade version to align with CraftBukkit
58327201 Add support for Java 20

CraftBukkit Changes:
b56426c7a PR-1142: Calculate explosion damage separately for each affected EntityComplexPart
fbe3410af PR-1140: Add a method to send multiple equipment changes
8434e3633 Add support for Java 20
c998a1d23 Increase outdated build delay
4a929b5d6 SPIGOT-7267: Fix EntityType#getTranslationKey() and add unit test
086d8dc8a SPIGOT-7268: CraftMetaPotion reads ShowParticles and ShowIcon properties incorrectly
8ba5e399e SPIGOT-7262: Improve visibility API

Spigot Changes:
a2190e30 Rebuild patches
2023-03-10 12:18:50 -08:00
Owen 4d7269e07c Correctly Remove Classloaders, Avoid Loading Providers in /paper dumpplugins, Fix library lookup (#8938) 2023-03-06 18:20:11 -06:00
Owen bf2053a156 Fix Player#setPlayerProfile (#8939) 2023-03-06 17:15:25 -06:00
Jake Potrebic 27c05030e5 Correctly handle ArmorStand invisibility (#8944) 2023-03-06 10:17:03 -08:00
Jake Potrebic 5cc78f2b6f Use configured log prefix for spigot library loading (#7934) 2023-03-05 11:02:52 -08:00
Noah van der Aa 6f57163e4a Add CompostItemEvent and EntityCompostItemEvent (#6356) 2023-03-05 11:59:48 -06:00
Noah van der Aa 75280ef51c Fix cancelling EntityDeathEvent for Armor Stands killed by players (#6478) 2023-03-05 11:48:34 -06:00
Jake Potrebic 541753be25 Fix HumanEntity#drop not updating the client inventory (#6761) 2023-03-04 14:57:02 -08:00
Lulu13022002 e5e75dd008 Include previous spawn angle in SpawnChangeEvent (#8606) 2023-03-04 16:42:10 -06:00
Lulu13022002 f2075c4d3c Take in account waterlogged block for the event (#8623)
There's some inconsistencies between the EntityChangeBlockEvent and the BlockDestroyEvent. The destroy event has always the right final type but the change block event has always air even for waterlogged blocks. This fix this behavior only for possible case to avoid a bigger patch.
2023-03-04 16:35:26 -06:00
Lulu13022002 3dcf4e4198 Add EntityFertilizeEggEvent (#8041) 2023-03-04 16:23:32 -06:00
Owen d30cda1273 Add TeleportFlags (#8855)
Abstracts relative teleport flags and instead makes a generic TeleportFlag option. This has the benefit of being able to easily add new flags in the future.
This adds a new flag, which allows you to keep inventories open when teleporting players (vanilla behavior).

These are breaking changes to the teleport api, however, it's still marked as experimental so I find this a fair change.
2023-03-04 16:07:23 -06:00
Moros 8a815a0eae Fix rendering for translatable death messages (#8534) 2023-03-04 15:56:38 -06:00
Glare 4151f752f1 /paper entity list QOL improvements (#8876)
This PR implements a QOL feature to /paper entity list <entity> where it will allow a user to teleport to chunk.
2023-03-04 15:35:07 -06:00
Jason Penilla a172880e7d Update ForgeFlower to 2.0.627.2, fixes dev bundle not applying with Java 19 runtime 2023-03-04 12:01:07 -07:00
Jake Potrebic e57441254d Replace ConfiguredStructure api with Structure (#8642) 2023-02-28 08:36:01 -08:00
Viktor Hrekh f408c253ec Log message if plugin bootstrap provided external plugin instead of throwing an exception (#8914) 2023-02-28 13:17:49 +01:00
Warrior dead691e8c Fix MC-157464 Prevent sleeping villagers moving towards food (#8923) 2023-02-28 13:14:17 +01:00
Lulu13022002 5170d6f159 Update the flag when a captured block state is outdated (#8860) 2023-02-28 13:13:59 +01:00
Emily b670798876 Close plugin jar file on classloader close and after retrieving name for updating (#8902) 2023-02-28 12:34:33 +01:00
Nassim Jahnke 4ae202eb82 Fix getBlockStateIfLoaded world bounds check
Closes #8922
2023-02-28 12:27:38 +01:00
Jake Potrebic 08e6622b81 fix runServer tasks 2023-02-27 16:30:33 -08:00
Jason 83a1304b37 [ci skip] Update Gradle wrapper to 8.0.1 (#8924) 2023-02-27 15:30:04 -07:00
Nassim Jahnke ad3e1bc121 Don't log or die on cyclic dependencies of Spigot plugins 2023-02-27 12:09:10 +01:00
Chris 9256248567 [ci skip] Update README and CONTRIBUTING (#8917)
Grammar fixes and other updates
2023-02-26 12:37:41 -07:00
Jason 16fc1a175e Make PluginProviderContext#getLogger return ComponentLogger, remove PluginProviderContext#getSLF4JLogger (#8921) 2023-02-26 12:13:15 -07:00
Jake Potrebic fc072c0954 Fix forced respawn with respawn anchor (#8845) 2023-02-26 09:38:42 -08:00
SoSeDiK 2f953a8843 Additional ExplosiveMinecart API (#8896) 2023-02-26 08:01:43 -08:00
Noah van der Aa e2b8e6b548 chore: update adventure documentation url in javadocs (#8912) 2023-02-26 08:00:55 -08:00
Jake Potrebic ed44f69c9b Fix NamespacedKey#equals not accepting other Key types (#8919) 2023-02-26 06:59:52 -08:00
Owen 81d7ff6e31 Properly re-add providers when reloading (#8881) 2023-02-23 12:58:50 -05:00
Nassim Jahnke 88367398d9 Update adventure doc links 2023-02-23 17:55:36 +01:00
Nassim Jahnke c7a82c1a50 Clean up hopper optimization patch 2023-02-23 17:37:56 +01:00
Lulu13022002 50eacd3c04 Avoid duplicate game event on initial fill (#8887) 2023-02-23 10:37:28 +01:00
Jake Potrebic 6b7764327c Fix chat messages logged in console (#8872) 2023-02-23 10:37:18 +01:00
Jake Potrebic ce2b6b2bcb Properly log any Throwable on plugin class creation (#8897) 2023-02-23 10:36:45 +01:00
Jakubk15 062028941f Do not send plugin headers when it is not required (#8889) 2023-02-22 17:59:42 -06:00
Bjarne Koll 87bb3e6f4c Close library classloader and improve PluginDescriptionFile (#8901) 2023-02-22 21:54:27 +01:00
Jake Potrebic a9ab68427c Fix update folder logging error when no folder exists (#8891) 2023-02-22 21:17:58 +01:00
Owen 60b83fee1e Validate providers when populating load order tree (#8890) 2023-02-22 10:59:12 -05:00
Jake Potrebic bb63a6156d Fix JavaPlugin static getPlugin methods (#8888) 2023-02-21 21:27:49 -06:00
Jake Potrebic ddc0a99f52 Further clarify functionality of damageItemStack methods (#8878) 2023-02-21 09:35:25 -08:00
Space Walker 8b37e9e2aa update alternate current to v1.5.0 (#8882) 2023-02-21 17:58:18 +01:00
Bjarne Koll d9699b5935 Configure mokitor Server mock as stubOnly (#8861)
A recent patch moved the internal unit tests to mokito, allowing
deep mocking to easily setup a mocked server instance.
While this change is useful, the server's Server#getItemFactory methods
is one of the hottest paths during unit testing, being called numerous
times by material tests.
As mokito mocks keep track of each invocation to allow for verifications
of invocations down the line, the server mock allocates a huge amount of
memory to keep track of all invocations, ultimately leading to an OOM
exception.

The previous solution solved this by increasing the tests memory to 2 GB,
however as of right now simply configuring the server mock as "stubOnly",
properly prevents the overflow of invocation records as none of the unit
test code relies on invocation verification.
2023-02-21 17:18:49 +01:00
Owen 8427c88987 Redefine Cyclic Dependencies (#8873) 2023-02-20 19:09:38 -06:00
0e4f2cc527 Small paper plugin fixes (#8866)
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2023-02-20 13:02:53 -05:00
Nassim Jahnke 8c4e81184b Update circular dependencies warning, properly crash
Also fixes logging errors
2023-02-20 15:20:49 +01:00
Owen 7baf427e90 Fix plugin updater logic, allow null update directory (#8864) 2023-02-19 12:17:51 -06:00
Owen 841da90501 Paper Plugins (#8108) 2023-02-19 08:57:10 -06:00
Jake Potrebic f9dc371fd8 Fix calling UnknownCommandEvent (#8232) 2023-02-16 18:07:30 -08:00
Jason 8fced9d5ab [ci skip] Update paperweight to 1.5.1 (#8856) 2023-02-16 09:03:25 -07:00
Shane Freeder 27516ee39e Temp fix for EntityType.translationKey
Upstream improperly used the enum name for looking up the vanilla entity
type to get the translation key; temp patch this until upstream fixes this,
also add some quick validation
2023-02-16 03:22:57 +00:00
Jake Potrebic 5c87711301 Make sure Registry is loaded after Bukkit.setServer() (#8853) 2023-02-15 15:00:22 -08:00
Jake Potrebic 03a4e7ac75 Updated Upstream (Bukkit/CraftBukkit) (#8832)
Upstream has released updates that appear 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:
37262de8 PR-812: Add Registry#match(String)
d6b40162 SPIGOT-4569: Add more BlockData API
f9691891 PR-809: Throw a more clear error for BlockIterators with zero direction, add Vector#isZero()
91e79e19 PR-804: Added methods to get translation keys for materials, itemstacks and more
426b00d3 PR-795: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
0e91ea52 SPIGOT-7224: Add events for brewing stands and campfires starting their actions

CraftBukkit Changes:
a50301aa5 Fix issues with fluid tag conversion and fluid #isTagged
6aeb5e4c3 SPIGOT-4569: Implement more BlockData API
7dbf862c2 PR-1131: Added methods to get translation keys for materials, itemstacks and more
7167588b1 PR-1117: Add new BiomeParameterPoint passed to BiomeProvider#getBiome
7c44152eb SPIGOT-7224: Add events for brewing stands and campfires starting their actions
2023-02-15 14:10:14 -08:00
Jake Potrebic afe633df08 convert API/server tests to mockito (#8848)
* convert API tests to mockito

* convert server tests to mockito

* add co-author
2023-02-15 13:27:40 -08:00
brickmonster f2f9e8cc4d Remove patch that was made obsolete by vanilla (#8847) 2023-02-13 18:52:27 +01:00
TM (Holly) 8d1acf68ed Call PlayerReadyArrowEvent for when items in the offhand are used (#8842) 2023-02-13 10:36:25 +01:00
Jake Potrebic bb05fcf4ca Add missing isFuel Material entries (#8843) 2023-02-12 13:02:01 -08:00
Lulu13022002 bd77b78e4f Fix desync of honeycomb when the event is canceled (#8713) 2023-02-11 12:14:03 -05:00
Andreas Prues 7e7e6b4bab More Win Screen API (#8805)
Adds methods to get and set whether a player has seen the win screen before.
2023-02-11 09:55:45 -06:00
SamB440 de38a45c34 Add projectile hit simulation API (#8816)
This adds API to force a projectile to hit a provided entity. Example usage could be if you have a player disguised as another entity, you could simulate an arrow colliding with the (fake) entity hitbox.
2023-02-11 09:41:06 -06:00
Matt Artist afa16e6b64 Modify offline mode warning to include Velocity line (#8812)
This adds a check to the offline-mode warning to see if Velocity is enabled. If it is enabled then it warns the user to make sure to secure their server and links to the Velocity documentation on that.
2023-02-10 17:10:11 -06:00
Nassim Jahnke 5eca9642e1 [ci skip] Rebuild patches 2023-02-09 18:45:15 +01:00
Drex 0c9ace8f78 Add AntiXray layered obfuscation mode (#8799) 2023-02-09 18:38:00 +01:00
Piotr Pasztor 0c3311c3b2 Add Entity Body Yaw API (#8822) 2023-02-09 18:31:51 +01:00
Emily 39aef524ee Fix Tick::addTo/::between causing SOE (#8824) 2023-02-09 18:30:30 +01:00
Martijn 96fd31b762 Fix chunk sending when the computed time overflows (#8833) 2023-02-09 18:27:24 +01:00
Nassim Jahnke 7569191fed Send disguised chat for vanished players 2023-02-09 18:15:21 +01:00
Jake Potrebic 57f1157871 Updated Upstream (Bukkit/CraftBukkit) (#8823) 2023-02-07 07:55:53 -08:00
Jake Potrebic b9b4c9a314 Deprecate duplicate API for arrow stuck count (#8829) 2023-02-07 07:43:20 -08:00
Jake Potrebic 4da844f1e3 Fix force-opening enchantment tables (#8820) 2023-01-27 13:01:36 -08:00
Jake Potrebic 9147456fc9 Updated Upstream (CraftBukkit/Spigot) (#8815)
Upstream has released updates that appear 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:
ab8ace685 SPIGOT-7236: Bone meal doesn't increase use statistic
7dcb59b8e Avoid switch on material in previous commit

Spigot Changes:
19641c75 SPIGOT-7235: World.Spigot#strikeLightningEffect doesn't do anything
2023-01-27 12:52:04 -08:00
Josh Roy 18fabc08d5 Remove CraftItemStack#setAmount null assignment (#8807)
This creates a problem with Paper's item serialization
api where deserialized items, which are internally
created as a CraftItemStack, will be completely lost if
#setAmount(0) is invoked (since the underlying handle
is set to null), while a regular Bukkit ItemStack
simply sets the amount field to zero, retaining the
item's data.

Vanilla treats items with zero amounts the same as items
with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack.
2023-01-24 15:30:51 +01:00
Aya b1b19b67f2 [ci skip] Fix PiglinBarterEvent JavaDoc (#8795) 2023-01-22 19:33:21 +01:00
Andreas Prues b082d8970b Win Screen API (#8802) 2023-01-22 14:21:45 +01:00
Aya 2eca2a27b0 Add Player#sendEquipmentChange(Map) API (#8800) 2023-01-22 14:00:37 +01:00
Bjarne Koll 42fecd0a5f Correctly shrink items during EntityResurrectEvent (#8780)
The EntityResurrectEvent logic is supposed to locate a totem of undying
in any of the interaction slots of the player inventory and then, if the
called EntityResurrectEvent is not cancelled, shrink that item by 1,
usually reducing it to zero.

For this, the logic iterates over the items in the interaction slots and
breaks out the loop if a totem of undying was found.
However, even if no totem of undying was found, the iteration item stack
variable remains as a refernce to the last interaction slot probed.

Plugins uncancelling a EntityResurrectEvent, which is published
pre-cancelled to listeners if no totem of undying could be found,
would hence cause the server logic to shrink completely unrelated items
found in, at the writing of this patch, the players off hand slot.

This patch corrects this behaviour by only shrinking the item if a totem
of undying was found and the event was called uncancelled.
2023-01-19 23:09:08 +01:00
Nassim Jahnke 0ed4b9148b Revert executor in authentication thread pool back to original patch 2023-01-18 17:20:24 +01:00
alex6777 567ff90111 Don't clone location in PreCreatureSpawnEvent (#8790) 2023-01-16 16:03:58 +01:00
Nassim Jahnke ec9dba85db Update netty to 4.1.87 2023-01-14 19:53:32 +01:00
froobynooby 5aee09dd28 Fix entity types not appearing in timings (#8786) 2023-01-14 01:03:13 +00:00
Jake Potrebic 171934562b Fix some explosion damage not scaling with difficulty (#8767)
Fixes https://github.com/PaperMC/Paper/issues/8735
2023-01-11 17:10:45 -08:00
Corey ShupeandNassim Jahnke 7a64b85f92 Fix player chat messages from vanished players resulting in kicks (#8777)
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
2023-01-10 14:01:42 +01:00
Jake Potrebic 8e08d9b023 Fix treasure map config for loot tables (#8739) 2023-01-10 13:09:19 +01:00
byquanton 92c1a3e392 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
79e39671 SPIGOT-7034: Add methods for set/get instrument in Goat Horn

CraftBukkit Changes:
4768df736 SPIGOT-7034: Add methods for set/get instrument in Goat Horn
941d7e954 SPIGOT-7225: FireworkMeta#getPower() can throw a NullPointerException for items with no power set
2023-01-09 21:46:23 +00:00
Jason fb90721a94 [ci skip] Automatically close PRs from master branches on opening (#8779) 2023-01-09 14:43:54 -07:00
Jake Potrebic 214a8c54a4 Use single player info update packet on join (#8773) 2023-01-08 18:46:54 -08:00
Hannes Greule 035f9d7157 Fix items never falling after being on ground (#8768) 2023-01-07 13:05:13 +01:00
Nassim Jahnke a0b59cad77 [ci skip] Update paperweight to 1.4.1 2023-01-06 09:43:31 +01:00
Nassim Jahnke b29e07bebd [ci skip] Fix instrument reference in item specific hide flag docs 2023-01-05 20:28:43 +01:00
Bjarne Koll f88384efb3 Persist paper lootable on entities (#8762) 2023-01-05 11:59:10 +01:00
Nassim Jahnke 940c9a3493 Replace ItemFlag.HIDE_POTION_EFFECTS (#8765) 2023-01-05 11:54:21 +01:00
Hannes Greule de5b1da681 Fix operator precedence bug (#8756) 2023-01-03 14:42:58 +01:00
Jake Potrebic 51cfcc88da Updated Upstream (Bukkit/CraftBukkit) (#8740)
Upstream has released updates that appear 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:
d352d965 SPIGOT-7221: Add Enemy (Entity) interface

CraftBukkit Changes:
397c5557c SPIGOT-7221: Add Enemy (Entity) interface
a0d3dfaf2 PR-1129: Fix state corruption while handling explosion damage on EntityComplexPart
d67777f8b SPIGOT-7218: Player's outer layer of skin disappears after respawn
2023-01-01 12:17:40 -08:00
Lulu13022002 ddd8745d14 [ci skip] Fix hoglin conversionTime javadoc (#8734) 2022-12-30 15:08:02 -05:00
Owen 8d7d92709d Return 0 if null for FireworkMeta (#8738) 2022-12-30 11:33:41 -06:00
Jake Potrebic 90750a6591 Rework filtering spawn egg and tile entity nbt config (#6613) 2022-12-27 18:59:15 -08:00
SoSeDiK fa42c68b73 Expose pre-collision moving velocity to VehicleBlockCollisionEvent (#8457) 2022-12-27 16:56:19 -06:00
TreyRuffy 2040c1ec71 Player Flying Fall Damage API (#5357) 2022-12-27 14:41:59 -06:00
Jake Potrebic 52718dba10 Updated Upstream (Bukkit/CraftBukkit) (#8714)
Upstream has released updates that appear 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:
aef9b6d2 PR-800: Add support for NoteBlock sounds in Skulls

CraftBukkit Changes:
ae8f5fc02 PR-1125: Add support for NoteBlock sounds in Skulls
0a1c89e4b SPIGOT-7212: Allow negative firework power
909a246af SPIGOT-7211: generateTree() with Consumer or Predicate is broken
c810c3ed8 Increase outdated build delay
2022-12-26 09:53:35 -08:00
Jake Potrebic 78a91dfb48 Fix (again) Player#getPlayerProfile no such method error (#8722) 2022-12-26 13:34:23 +01:00
Owen 1975fbe368 Respect SpigotConfig logCommands & fix stopDancing() NPE (#8715) 2022-12-25 22:22:08 -06:00
Jake Potrebic 3331501f8e Use team display name for quit message (#7127) 2022-12-25 08:57:54 -08:00
Owen f26e9ccdd0 Tadpole lock API (#8297) 2022-12-23 14:50:32 -06:00
aerulion 47abd1c50c Add EntityPushedByEntityEvent (#7704) 2022-12-23 13:59:11 -06:00
TehBrian e6f61f715d fix ArmorStandMeta not applying false flags (#8632) 2022-12-23 11:30:42 -06:00
Noah van der AaandBillyGalbreath 5717b84708 Add config option for spider worldborder climbing (#6448)
Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2022-12-23 10:51:24 -06:00
Noah van der Aa c59922d94e Expose signed message in chat events (#8694) 2022-12-23 09:54:04 -06:00
Jake Potrebic 8e83c3c7b4 Deprecate ProjectileCollideEvent (#8678)
replaced by ProjectileHitEvent
propagated the cancellation of the legacy event
to the modern one
2022-12-22 21:20:44 -08:00
Lulu13022002 e05ba9866d Avoid to spam the transform event for hoglin->zoglin conversion (#8712) 2022-12-22 14:39:07 -08:00
Jake Potrebic 048ee5872d Fix OfflinePlayer getPlayerProfile return type (#8710) 2022-12-21 20:30:21 -08:00
Nassim Jahnke 7b52db5f61 Fix buffer-joins-to-world patch 2022-12-21 22:55:42 +01:00
Jake Potrebic 94373f0143 Fix OfflinePlayer#getPlayerProfile returning deprecated type (#8543) 2022-12-20 10:56:33 -08:00
Jake Potrebic c1bca9ad34 Add exploded block state to BlockExplodeEvent (#6818) 2022-12-19 21:09:51 -08:00
Nassim Jahnke d5f1ffc2e6 Remove somewhat broken patch
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
2022-12-19 11:46:55 +01:00
Lulu13022002 e498ddaa61 Add missing EntityChangeBlockEvent (#8696)
* Add missing EntityChangeBlockEvent

* Fix duplicate empty bottle when canceled for creative player

* Use native update impl instead of craftbukkit -> nms
2022-12-17 10:20:14 -08:00
Jake Potrebic f7a13449e2 Improve PortalEvents (#8679) 2022-12-17 09:36:02 -08:00
Thomas Meaney cf3115158c [ci skip] Fix readme badge (#8693) 2022-12-17 08:53:49 +00:00
Jason Penilla f3eb2c70e0 Fix reobf issue in previous commit 2022-12-17 00:46:46 -07:00
Jason 86ed0d596a ChatProcessor fixes (#8690)
Fixes handling for `ForwardingAudience.Single` and passes the signed message to non-native `Audience` types
2022-12-16 23:05:48 -07:00
Jake Potrebic 44dc5a4c26 Don't call lock check event if the block entity doesn't exist (#8687) 2022-12-16 13:31:51 -08:00
Jake PotrebicandBillyGalbreath aa9c200ea1 Fix metrics reporting unknown paper version (#8683)
Co-authored-by: BillyGalbreath <Blake.Galbreath@GMail.com>
2022-12-16 09:37:06 -08:00
Jake Potrebic 39d3a03bff Fix Player#chat for 1.19.3 (#8684) 2022-12-16 09:15:21 -08:00
Jake Potrebic 262c08f64f Updated Upstream (CraftBukkit) (#8680)
Upstream has released updates that appear 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:
2ed3e3e6e SPIGOT-7210: Fix structures in custom worlds
585ab5ba1 SPIGOT-7207: WorldCreator creates world as super flat even when normal is specified
2022-12-15 17:16:34 -08:00
Jakub Žáček 28c7d40326 Add Sneaking API for Entities (#8485) 2022-12-15 11:43:14 -08:00
Jake Potrebic 0262de0ddb Deprecate TargetBlock/EntityInfo and assocated methods (#7381) 2022-12-15 09:10:03 -08:00
Jake Potrebic 3aec8630bb Add BlockLockCheckEvent (#7840) 2022-12-15 08:49:49 -08:00
Nassim Jahnke 20503beee5 Remove guardian beam render issue workaround
Messing with game time sent to the client isn't worth the trouble whenever it may be used by the client now and in the future for such a small issue. Mojang, plz fix
2022-12-15 14:19:09 +01:00
Jake Potrebic eec64a4e05 Fix explosion yield with new gamerules (#8674) 2022-12-14 20:01:31 -08:00
Jake Potrebic 7789bc5afa Improve some logging and errors (#8673) 2022-12-14 19:54:43 -08:00
Jake Potrebic 66437d059f Add more breakNaturally functionality (#7379) 2022-12-14 19:37:16 -08:00
Jake Potrebic 1c535f96ac Remove deprecated event warning for inventory result event (#8672) 2022-12-14 15:09:11 -08:00
Jake Potrebic c97581978a Fix inconsistencies in dispense events regarding stack size (#8653)
* Fix inconsistencies in dispense events regarding stack size

The javadocs for BlockDispenseEvent suggest the ItemStack is a single
item which is being dispensed. Before this fix, sometimes it was the whole
stack before a single item had been taken. This fixes that so the stack size
is always 1.

* Ensure stack size is correct in minecart and armor dispense behaviors
2022-12-14 13:05:11 -08:00
Jake Potrebic c919e944ff Updated Upstream (Bukkit/CraftBukkit) (#8663)
Upstream has released updates that appear 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:
f50ad1f8 PR-798: Add PrepareGrindstoneEvent and refactor related events to use PrepareInventoryResultEvent
0cac7963 SPIGOT-7204: Add TeleportCause#DISMOUNT
b4dd47b0 SPIGOT-7202: Deprecate removed door effects

CraftBukkit Changes:
ab1586c2f PR-1123: Add PrepareGrindstoneEvent
b402824ea SPIGOT-7204: Add TeleportCause#DISMOUNT
06a6a1012 PR-1121: Add unit test for spawn egg meta
c18668be3 SPIGOT-7192: Call PlayerInteractEvent with Action.LEFT_CLICK_AIR if the entity interacted is hidden to the player
47124f639 Increase outdated build delay
645993470 SPIGOT-7201: Spawner ItemMeta not working as expected
2022-12-13 21:03:57 -08:00
Jake Potrebic adb8e499db Fix fire charge not being consumed igniting a creeper (#8652) 2022-12-13 09:23:05 -08:00
Jason Penilla 3822cc891d Update paperweight to 1.4.0 2022-12-13 10:09:15 -07:00
SoSeDiK 0148283131 Fix locateNearestBiome nullability check (#8662) 2022-12-13 16:01:54 +01:00
Jake Potrebic 326a65e427 [ci skip] add missing final newline (#8659) 2022-12-13 14:16:45 +01:00
EpicPlayerA10 1845cec507 Fix death message containing empty string (#8656)
Resolves: #8654
2022-12-13 13:24:59 +01:00
Jake Potrebic d2cb347f71 Fix items equipped on AbstractHorse losing NBT (#8647)
* Fix items equipped on AbstractHorse losing NBT

* squash later mc fix into vanilla patch
2022-12-11 15:22:56 -08:00
Jake Potrebic eeeb8d5adc Add the non-flammable wood item tag (#8648) 2022-12-11 13:01:18 -08:00
Noah van der Aa a5ecfd6c30 [ci skip] Correct chat preview removal version in javadoc (#8646) 2022-12-11 18:34:31 +00:00
Jake Potrebic d8cf30dfd1 Deprecate isPreview method in decorate events (#8645) 2022-12-11 09:55:39 -08:00
Jason Penilla 0bdbcd9d56 [ci skip] Remove non-functioning patch 2022-12-10 21:40:18 -07:00
Jake Potrebic 1143b63663 Add Position (#7639)
* Add Position

* move Position patch to start
2022-12-10 16:50:32 -08:00
Jake Potrebic ecfb76a73a Fix empty effect clouds from lingering potions (#8641) 2022-12-10 14:52:37 -08:00
Lulu13022002 7d18c6b4ac Don't show particles when splash events are canceled (#8637) 2022-12-10 13:27:36 -08:00
Jake Potrebic 5bd8e1c191 Fix MapLike Codec missing key 'selector' (#8634)
* Fix MapLike Codec missing key 'selector'

* Make sure a new instance is created each time
2022-12-10 09:04:27 -08:00
Nassim Jahnke 7ba81b14dd [ci skip] Fix leaf'd patch names 2022-12-10 17:49:00 +01:00
Nassim Jahnke be50d5bcc3 Readd BlockBehavior inlining patch 2022-12-10 17:24:01 +01:00
Lulu13022002 812efd3826 Fix chunksnapshot biome getter (#8639) 2022-12-10 14:11:39 +01:00
Lulu13022002 075fb67c78 Add eating regain reason for Camels (#8638) 2022-12-10 14:07:35 +01:00
Nassim Jahnke 7e5f85ea31 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
4fa7e1c31 SPIGOT-7200: CreatureSpawnEvent is called with incorrect SpawnReason when using spawn eggs
2022-12-10 14:04:02 +01:00
Owen ec772bb8b8 Rabbit API (#8627) 2022-12-09 18:56:13 -06:00
Jake Potrebic 5e6ac3c46e Properly identify golem spawn reason (#8635) 2022-12-09 16:37:03 -08:00
Amaury Rousseau 0baf2ff1b9 [ci skip] Allow .git to be a regular file (#8631) 2022-12-09 16:33:00 +00:00
Jake Potrebic f6ffbc2720 Readd improve/fix EntityTargetLivingEntityEvent (#8630) 2022-12-09 12:30:55 +01:00
Jake Potrebic 20549ff2d7 Add new 1.19.3 fires of EntityInsideBlockEvent (#8629) 2022-12-09 02:46:47 -08:00
Nassim Jahnke 4d270892ec [ci skip] Thank you gradle, very cool 2022-12-09 11:12:15 +01:00
Nassim Jahnke d32f569f07 [ci skip] Update gradle wrapper 2022-12-09 11:07:41 +01:00
Jake Potrebic b4a8f14a67 last instrument fix, I promise 2022-12-09 02:03:06 -08:00
Jake Potrebic 2ad5f6f66b couple more instrument/note fixes 2022-12-09 01:49:15 -08:00
Jake Potrebic 9495a33cc9 fix Instruments 2022-12-09 01:34:39 -08:00
Jake Potrebic c7c3cf1dd7 Mark experimental api as such (#8628) 2022-12-09 10:13:22 +01:00
Owen df1f4ac26d Update adventure (#8625) 2022-12-09 10:11:28 +01:00
Jake Potrebic 53eb820c6b update reobf-mappings-patch.tiny 2022-12-08 18:21:29 -08:00
Jake Potrebic f29ab144be fix method rename issue in Camel 2022-12-08 18:17:06 -08:00
JasonandJake Potrebic f97bb11e4b Account for splash water bottles now extinguishing entities (#8622)
* Account for splash water bottles now extinguishing entities

* improvements and javadocs

* reorder patches

* rename event to WaterBottleSplashEvent

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-12-08 16:33:22 -08:00
Owen b2043f1c3a Deprecate PluginLoader and impls (#8619) 2022-12-08 22:27:37 +01:00
Jake Potrebic b8d33f406e fix a few structure seed configs 2022-12-08 12:15:18 -08:00
Jake Potrebic 244a523df3 readd missing structure set seeds patch 2022-12-08 11:06:54 -08:00
Jake Potrebic 6120bc9206 properly handle xray bypass perm 2022-12-08 10:35:33 -08:00
Jake Potrebic 9bace84b44 check now succeeds 2022-12-08 10:23:12 -08:00
Jake Potrebic 49f57cc170 fix some tests and DoNotUse violations 2022-12-08 09:47:29 -08:00
Nassim Jahnke 93ee9e63c9 Readd fixes for SpawnReason API patch 2022-12-08 17:51:06 +01:00
Jake Potrebic 5256716ffb fix ChatProcessor 2022-12-08 08:32:29 -08:00
Nassim Jahnke 12fee1cf81 Update Velocity modern forwarding reading 2022-12-08 12:16:44 +01:00
Nassim Jahnke 4074d4ee99 Fix bad AT 2022-12-08 12:00:10 +01:00
Nassim Jahnke dcc290167f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
dea9ce0a SPIGOT-7198: Add Sittable interface to Camel

CraftBukkit Changes:
eecb4c0dc SPIGOT-7196: Exception loading alternate worlds
0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel
676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg
e85280e02 Handle missing SpawnEggs in MetaSpawnEgg

Spigot Changes:
d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator
2022-12-08 11:53:14 +01:00
Jake Potrebic 66a288b4f4 fix some startup issues 2022-12-08 00:52:08 -08:00
Jake Potrebic 04801b7982 fix more compile issues 2022-12-07 22:11:20 -08:00
Jason Penilla 4a3753dbb1 more compile fixes 2022-12-07 21:24:59 -07:00
Jason Penilla 0b291cccce compile fixes 2022-12-07 20:24:00 -07:00
Noah van der Aa 7aa90a8535 More 1.19.3 registry fun (#8618) 2022-12-07 23:49:41 +00:00
Shane Freeder 7414739946 Disable ATs from unapplied folder 2022-12-07 23:25:00 +00:00
Owen e21c1b41a7 Properly resend entities (#8617) 2022-12-07 23:11:44 +00:00
Nassim Jahnke 0f275cc228 Fix MCVersions 2022-12-07 23:29:30 +01:00
Noah van der Aa be9a0677b1 Add missing spawn eggs: Electric Boogaloo (#8616) 2022-12-07 23:10:51 +01:00
Nassim Jahnke 93507a8e41 Almost all patches 2022-12-07 23:05:32 +01:00
Nassim Jahnke f8430d1de7 More patchidy patched patch patches 2022-12-07 22:57:15 +01:00
Noah van der Aa f207880ec8 Fix a handful of 1.19.3 compile issues (#8615) 2022-12-07 22:36:56 +01:00
Nassim Jahnke 4710881e40 More patchidy patched patches 2022-12-07 22:35:34 +01:00
Nassim Jahnke 5b6d903302 More patchy patched patches 2022-12-07 22:05:01 +01:00
Nassim Jahnke d0620624d7 Patching patched patched patches 2022-12-07 21:16:54 +01:00
Nassim Jahnke 7f3d2ff503 Patching patched patches 2022-12-07 20:22:28 +01:00
Nassim Jahnke dfab659e53 Moar, fix API 2022-12-07 19:52:24 +01:00
Nassim Jahnke 0edb5458e5 Patching patches 2022-12-07 19:32:25 +01:00
Nassim Jahnke 4d6f28bab3 Patches 2022-12-07 18:53:34 +01:00
Nassim Jahnke 4fbe8d0b9b First server patches 2022-12-07 18:08:55 +01:00
Nassim Jahnke fd58a696cb API patches 2022-12-07 17:46:46 +01:00
Jake Potrebic 476ef25d05 Add missing Fluid type (#8608) 2022-12-06 10:41:04 -08:00
Noah van der Aa b07d5e0aca Limit pet look distance (#8612) 2022-12-06 19:10:58 +01:00
Shane Freeder 407a445aac Fix dumplisteners missing folder creation 2022-12-06 04:02:44 +00:00
Yannick Lamprecht 96fdafd935 Player Entity Tracking Events (#4722) 2022-12-03 16:46:38 -06:00
Jake Potrebic ec6a9a3e47 Updated Upstream (Bukkit/CraftBukkit) (#8604)
Upstream has released updates that appear 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:
38866413 SPIGOT-6765: Pass WorldInfo, Random and coordinates to ChunkGenerator should methods

CraftBukkit Changes:
f3dab3a48 SPIGOT-7191: TNT minecart explosions crash the server
b5aa0bed9 SPIGOT-7184: ExplosionPrimeEvent not called for ExplosiveMinecart
e7aab5493 SPIGOT-6765: Pass WorldInfo, Random and coordinates to ChunkGenerator should methods
2022-12-03 10:19:09 -08:00
Bjarne Koll 425baed78f Fully deserialise persistent anger post async load (#8560)
The modified patch prevents entity loading off the main thread when
entities are initially loaded.

However, the initial loading of an entity is not the only time the
Entity#readAdditionalSaveData method is called. Commands like /data also
invoke the method (through Entity#load) to update an entities data
without completely re-creating it.

This however breaks with the current patch, as the patch moves parts of
the entity lookup for persistent anger deserialisation into the first
tick of an entity (which obviously is only called once and hence not
re-run when an already ticking entity is modified as laid out above).

This change actively runs the now split logic for deserialisation again
if the entity has already ticked its first tick. This way, initial
deserialisation is still split into one off thread and the first tick
parts, but following main thread deserialisations can happen completely
inside Entity#readAdditionalSaveData is called.
2022-12-02 18:09:41 +01:00
Jake Potrebic c40f8d59a9 Sync offhand slot in menus (#7341) 2022-12-01 13:01:49 -08:00
Jake Potrebic 41ab602f47 [ci skip] couple more fixes for build pr jar label (#8599) 2022-11-30 12:45:27 -08:00
Jason Penilla 54daefa0ca Fix whitespace error in recent patch 2022-11-28 11:10:26 -07:00
Lulu13022002 8796175d79 Handle legacy quirk in the console formatter (#8434) 2022-11-28 14:41:29 +01:00
Denery 309133e2e1 Fix preemptive connection dropping during shutdown process (#8546) 2022-11-27 11:20:31 -06:00
sandtechnology 28b4027d45 Fix packet duplicating at some points (#8566)
Due to the weakly consistent of ConcurrentLinkedQueue iterator, at some points, packet will be resent twice times or more, causing some weird behaviors (e.g. kicked for illegal movement since the same ClientboundPlayerPositionPacket was sent two times). This changes for the patch add a flag for marking if the packet was consumed to prevent such issue and ensure consistently of the packet queue.
2022-11-27 10:36:35 -06:00
Jason f1583fcd74 Add /paper dumplisteners tofile and increase detail of command output (#8592) 2022-11-26 10:36:11 -07:00
Ján Villim 21b964af4e Added ability to control player's insomnia and phantoms spawning (#6500) 2022-11-26 10:59:04 -06:00
Owen f59c802697 Schoolable Fish API (#7089) 2022-11-25 20:21:40 -06:00
SoSeDiK 4048d3ec68 Allow using degrees for ArmorStand rotations (#7847) 2022-11-25 19:42:30 -06:00
Noah van der Aa 9f7eef81fd Friction API (#6611) 2022-11-25 18:23:12 -06:00
Kezz 44bb5992ce Add Tick TemporalUnit (#5445) 2022-11-25 15:05:42 -06:00
Jake Potrebic d98c370fb5 Add displayName methods for advancements (#8584) 2022-11-24 23:05:48 -08:00
Jake Potrebic 414ea80d74 ItemStack damage API (#7801) 2022-11-24 22:52:00 -08:00
Jake Potrebic f637b1a0a7 Fix async entity add due to fungus trees (#7626) 2022-11-24 22:32:29 -08:00
Jake Potrebic b4beac0c9d Fixes potential issues arising from optimizing getPlayerByUUID (#8585) 2022-11-24 22:22:19 -08:00
Amy 185fa48ac4 Fix chest relooting mechanics (#8580) 2022-11-25 00:21:40 +01:00
Jake Potrebic b8919a7cc1 pr command action fixes (#8591) 2022-11-23 19:14:41 -08:00
8aff07afb0 Add /paper dumplisteners command (#8507)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: TwoLeggedCat <80929284+TwoLeggedCat@users.noreply.github.com>
2022-11-23 16:28:38 -06:00
Lulu13022002 da230d521c More vanilla friendly methods to update trades (#8478) 2022-11-23 15:38:49 -06:00
Jake Potrebic 716843890a [ci skip] Rework workflows to support optional paperclip build (#8583) 2022-11-23 11:19:31 -08:00
Jake Potrebic e6e37ba5d7 Add api to resolve components (#7648) 2022-11-22 20:53:50 -08:00
Shane Freeder 55a16d8581 Fix Varint21FrameDecoder cached length buf usage 2022-11-22 17:50:31 +00:00
Lulu13022002 3ab194e185 Avoid a cubed max search distance for POIs (#8576)
The max search distance used to get the closest Poi data on X/Z axis is cubed
instead of squared (one time in the parameter and another time in the function)
for almost all search.
Generally this has been hidden by another check that already does a pre
distance check between the poi pos and the source pos for individual
component but the issue still happens for diagonal distance search.
Discovered by Samsuik
2022-11-21 16:02:21 +01:00
Jakub Žáček a7df847aad Add Player Warden Warning API (#8470) 2022-11-20 12:53:58 -06:00
Jason 4a3ae59535 [ci skip] Add check for git repo (#8578) 2022-11-20 11:26:20 -07:00
Jake Potrebic b95d4b28b8 Moving ATs from the at file to individual patches (#8573) 2022-11-19 15:53:20 -08:00
Noah van der Aa 76503f8887 Strip coordinates from lodestone compasses (#8561) 2022-11-19 15:41:09 -06:00
Owen 0a6f100a2a Add more collision code skipping logic (#7581) 2022-11-19 15:14:19 -06:00
Fruxz 32998864c7 [ci skip] Add TheFruxz to the license MIT list (#8575) 2022-11-19 21:20:21 +01:00
Lulu13022002 8f498dc19a Sync chunk load command improvements (#8554) 2022-11-19 14:10:13 -05:00
William Blake Galbreath 669fed4b57 Fix MC-179072 (#8421) 2022-11-19 12:23:31 -06:00
Fruxz 825cb4390c [ci skip] Add .fleet/ folder to .gitignore (#8574) 2022-11-19 14:33:03 +01:00
Melncat b4c1ae645f Fix MC-121048 (#8429)
This moves the setHealth call to below the recordDamage call to prevent
recordDamage from clearing the CombatTracker, since recordDamage will
clear the CombatTracker if the entity is dead. This fixes death messages
such as the "doomed to fall" messages.
2022-11-18 22:04:52 -06:00
Lulu13022002 84b5d4a352 Reorder bukkit damage source entity for explosion (#8553) 2022-11-18 20:14:52 -06:00
Jake Potrebic 215111213b Fix/improve Affects Spawning API (#7329) 2022-11-15 11:15:01 -08:00
Jake Potrebic e22dacf4d2 update yarn param mappings (#8563) 2022-11-12 12:57:41 -08:00
braindead 7955bcc87b fix MC-252817 (green map markers do not dissappear) (#8545) 2022-11-12 13:16:25 -06:00
Jake Potrebic 564356d1e0 ensure reset EnderDragon boss event name (#8562) 2022-11-12 10:34:14 -08:00
Owen 5f4952fbce Cleanup reputation API + back with an EnumMap instead of array (#8258)
Resolves: #7142
2022-11-12 18:41:22 +01:00
Noah van der Aa 112fa18bac Show exception when headless JRE detection is triggered (#8559) 2022-11-12 13:09:54 +01:00
Owen 117579c6bb Add PrePlayerAttackEntityEvent (#8369)
Allows you to cancel player event attacking, preventing things like attack sounds from being played.
2022-11-09 22:05:58 -05:00
Jake Potrebic e6ee4cdffe Updated Upstream (CraftBukkit) (#8548) 2022-11-09 16:05:46 -08:00
Shane Freeder 3ac1a8d708 Cleanup misc import from last commit 2022-11-06 22:46:23 +00:00
Shane Freeder 3e9f39faa2 Prevent compass from loading chunks 2022-11-06 22:37:34 +00:00
Owen df5fb9475b Properly resend entities (#7041) 2022-11-05 13:50:16 -05:00
Jason 2b47227e38 Update Commodore modifications (#8542)
* Handle ldc insn for getOriginalOrRewrite in Commodore

* Remove fastutil rewrite

It's no longer relocated upstream
2022-11-04 22:16:57 -07:00
Jake Potrebic 3d15120f7e Fix Advancement#getDisplay() api break (#8541) 2022-11-04 15:59:15 -07:00
Astro Angelfish 8ee344f18e [ci-skip] Rename Paper stop tp Paper end. (#8539) 2022-11-04 16:08:01 +00:00
Jake Potrebic ab1c072320 Remove old redundant fix (#8530) 2022-11-03 14:03:31 -07:00
Lulu13022002 ebc0f6bfb5 Call PlayerLaunchProjectileEvent for trident (#8027) 2022-11-03 19:43:50 +01:00
Shane Freeder e30b082262 Fix setting difficulity inside of API (Fixes #8533)
Vanilla moved some logic around setting the world difficulty which
was not adopted for inside of upstream properly, this addresses another
such case
2022-11-01 18:29:52 +00:00
Jason Penilla 4a9c9b3fb0 Build updates 2022-10-31 15:25:30 -07:00
Denery 93b2246851 Fix EntityCombustEvent cancellation issues (#8529) 2022-10-31 17:31:40 +01:00
Jake Potrebic b3b04f2ca1 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8515)
Upstream has released updates that appear 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:
9a4de097 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of

CraftBukkit Changes:
f43634ae4 SPIGOT-7170: Cannot set slots in custom smithing inventory
48f3a2258 SPIGOT-7171: Ability to get the IP/hostname players are requesting status of
30e31b4d1 SPIGOT-7177: Certain blocks don't call BlockCanBuildEvent
982364797 SPIGOT-7174: Avoid adding air to CraftMetaBundle

Spigot Changes:
6198b5ae PR-122: Add missing parentheses to pumpkin and melon growth modifier
1aec3fc1 Rebuild patches
2022-10-30 19:44:25 -07:00
Noah van der Aa 13cf5461d4 Fix pumpkin growth modifier (#8517) 2022-10-30 13:27:37 +01:00
Owen aaf5e3997f Deprecate unused VehicleEntityCollisionEvent methods (#8498) 2022-10-29 12:18:17 -05:00
William Blake Galbreath b743144a12 Fix MC-147659 (#8423) 2022-10-27 19:53:16 -05:00
Hannes Greule 8a4b752fe2 Fix wrong descriptor in ASMEventExecutorGenerator (#8506) 2022-10-27 19:27:33 -05:00
Nassim Jahnke 304ab35e82 [ci skip] Remove old todo file 2022-10-27 22:25:19 +02:00
Owen c26401863e [ci skip] Undo modification to removed patches in latest commit (#8512) 2022-10-27 15:03:11 -05:00
Jason 8acb05d567 Make CommandSyntaxException implement ComponentMessageThrowable (#8513) 2022-10-27 10:10:28 -07:00
Jason 0249750b8f Fix EntityArgument suggestion permissions to align with EntitySelector#checkPermissions (#8511) 2022-10-26 18:31:55 -07:00
Jake Potrebic 32d95e9bab Track projectile source for fireworks from dispensers (#8044) 2022-10-26 17:44:28 -07:00
Jake Potrebic 954e6f00f3 Fix a bunch more forceDrops for dropping items (#8095) 2022-10-26 17:32:03 -07:00
Noah van der Aa 2432233d24 Add allow server listing & text filtering client options (#7595) 2022-10-26 18:09:03 -05:00
Lulu13022002 36869ccd90 Fix new block data in EntityChangeBlockEvent for silverfish when mobGriefing isn't enabled (#8099) 2022-10-26 17:05:15 -05:00
Pedro 7b3b5938fd [ci skip] Update checkout action in workflow (#8510) 2022-10-26 16:44:55 +01:00
Spottedleaf 25cd3eee99 Add dirty flag to chunk tick lists
For whatever reason, vanilla does not mark the chunk as
dirty when changing its tick lists.

We also have it return dirty if the time since the last
save has changed, since it would affect the tick offsets
in the ticklist.
2022-10-24 20:51:48 -07:00
Spottedleaf fc5ae5be82 Fix incorrect handling of mustNotSave
CB used the dirty flag to construct the chunk unload event,
but then sets mustNotSave to the inverted value of the event
after calling the event without considering that the chunk may
actually be brought up to loaded status again later. Then, CB
overrides the isUnsaved method of LevelChunk to additionally
use mustNotSave.

Thus, if the chunk is not marked dirty when unloading, the
mustNotSave value will be set to true. Then, once the chunk
is reloaded and edited the dirty flag will be set. However,
when unloading the chunk finally, the isUnsaved method
will return false due to mustNotSave being true. Thus, the
chunk will never be saved.

To fix these issues, no longer make mustNotSave override
isUnsaved and always set the save flag for the chunk unload
event.

This issue started popping up recently due to the recent
change to mark chunks as not dirty after saving them, which
increased the chance of the save issue occurring in the first
place.
2022-10-24 19:34:03 -07:00
Jason 519cb4b214 Move classes added to net.minecraft.server to paper packages (#8500) 2022-10-24 12:43:46 -07:00
evan 1c1aeb20e2 Only limit global sounds to same world if limiting radius (#8499) 2022-10-23 20:52:40 +02:00
Jake Potrebic 44ce9b3e9c Updated Upstream (Bukkit/Spigot) (#8445) 2022-10-23 10:41:34 -07:00
Spottedleaf b8131a09b2 Mark chunks as saved after saving them
Prevents re-saving them again later.
2022-10-23 09:09:18 -07:00
Owenanddannyball710 05bd9d67b7 Ignore impossible spawn tick (#8493)
Co-authored-by: dannyball710 <dannyball710@gmail.com>
2022-10-22 23:45:07 -05:00
Owen 0b8f40cf6a Don't fire EntityToggleSitEvent on deserialization & reorder some api patches (#8495) 2022-10-22 21:55:28 -05:00
Owen 6665076342 Add Moving Piston API (#7019) 2022-10-22 19:37:37 -05:00
SoSeDiK d713b47b14 Add EquipmentSlot convenience methods (#8477) 2022-10-22 18:50:12 -05:00
uku 4e67c73b03 Add config setting for grindstone overstacking (#8156) 2022-10-22 18:25:17 -05:00
vytskalt 58483c1e18 Add fire-tick-delay option (#8037) 2022-10-22 17:57:09 -05:00
IEatBeans 6ea5aa37bd Added EntityToggleSitEvent (#7579)
* Added EntityToggleSitEvent Patches

* Updated event phrasing, fixed Boolean not being primitive, pandas now fire event, and event is defined and called in 1 line

* Updated event phrasing, fixed Boolean not being primitive, pandas now fire event, and event is defined and called in 1 line

* Added EntityToggleSitEvent Patches

* Added EntityToggleSitEvent Patches

* Added EntityToggleSitEvent Patches
2022-10-22 17:20:52 -05:00
thelooter 3d50709776 Add MaterialTags for the different Types of Tools (#8049)
* Add MaterialTags for the different Types of Tools

* Add Netherite Tools Tag
2022-10-22 16:51:34 -05:00
Lukas AltandOwen1212055 5cdb5f9585 Optimized dirt and snow spreading (#5124)
* Optimized dirt and snow spreading

* Add optimization to bukkit event call

* Clarify var names

Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2022-10-22 13:13:59 -05:00
Lukas Alt 60da35e359 fixed entity vehicle collision event not called (#5053) 2022-10-22 12:09:45 -05:00
Noah van der Aa 7187cab3b6 Detect headless JREs (#8491)
Crashes caused by the missing AWT dependency come up in the support channels fairly often.
This patch detects the missing dependency and stops the server with a clear error message,
containing a link to instructions on how to install a non-headless JRE.
2022-10-22 11:57:21 -05:00
Noah van der Aa a163a96a8d Load Allay duplication cooldown as a long (#8410)
It is saved as a long, and the API exposes a long, so loading it as an int may cause issues like overflows.
2022-10-22 16:16:24 +02:00
Pedro eb494184a8 [ci skip] Update workflow dependencies (#8489) 2022-10-22 14:13:05 +02:00
Jason 3dcfec4499 Add stacktrace deobfuscation in more places (#8484) 2022-10-18 19:21:07 -07:00
Spottedleaf f7da209586 Fix inconsistent isChunkLoaded calls
When we update the chunk state to border, it should be
the case that isChunkLoaded returns true and that
getChunkIfLoadedImmediately returns a non-null value.
Now add the chunk to the loaded map before making any
callbacks after updating to border state.
2022-10-18 08:11:23 -07:00
Nassim Jahnke e1d4b26a62 Fix another case of missing chat headers 2022-10-18 10:20:35 +02:00
Melncat ed2c88ba89 Add LivingEntity knockback API (#8479) 2022-10-18 09:33:58 +02:00
Jakub Žáček 7d64d7ce77 Add converted Slot number to PlayerInventorySlotChangeEvent (#8482) 2022-10-18 09:32:22 +02:00
SoSeDiK 236a29623c Add LivingEntity#swingHand(EquipmentSlot) convenience method (#8456) 2022-10-16 13:49:56 +02:00
Jakub ŽáčekandJakub Zacek ec00f991a4 Fix package for PlayerInventorySlotChangeEvent (#8475)
Co-authored-by: Jakub Zacek <dawon@dawon.eu>
2022-10-16 08:49:47 +01:00
19MisterX98 603df98897 FIx bedrock patterns (#8474) 2022-10-16 00:34:10 +02:00
Lexi b560034488 Avoid usages of RecipeChoice#getItemStack() (#8453)
Replaces some internal usages of this method with RecipeChoice#test(ItemStack) and deprecates every other method still utilizing this legacy method.
2022-10-15 21:20:12 +02:00
SoSeDiK eb68bd49a2 Allow changing bed's 'occupied' property (#8458) 2022-10-14 10:37:01 +02:00
Lulu13022002 0bdf9973cd Avoid cycle deprecation (#8466) 2022-10-13 13:52:04 +02:00
Lulu13022002 2094011485 Update settings directory path in exceptions (#7968) 2022-10-13 13:38:06 +02:00
SoSeDiK 514a60647d Elder Guardian appearance API (#8455) 2022-10-13 12:26:51 +02:00
Shane Freeder 7fe34e9508 Make CraftMinecartTNT public
adding the getHandle method causes some issues with things like ProtocolLib
due to the expectation that all classes which provide a getHandle method
are public.
2022-10-12 16:10:52 +01:00
Jake Potrebic b9cf1ac580 Fix a classloading issue in tests (#8459) 2022-10-11 20:05:28 -07:00
Jason Penilla f7c8d79667 Fix stacktrace in server tests 2022-10-11 16:52:49 -07:00
Jakub Žáček de2d2d4d94 Add PlayerInventorySlotChangeEvent (#7321) 2022-10-11 22:49:10 +01:00
Owen 6b26cfcd31 Add missing Entity + Projectile API (#7632) 2022-10-11 22:04:26 +01:00
SoSeDiK b097a241c0 Expose isUnderWater to Entity (#8454) 2022-10-11 14:43:10 +02:00
Jake Potrebic 57555b8c6a Add missing structure set seed configs (#8030) 2022-10-09 22:19:35 +02:00
Jake Potrebic c389b1c408 Fix configs that relied on outdated min/max y levels (#6986) 2022-10-09 08:52:09 +02:00
Jake Potrebic 77a50b95da Add Unmodifiable annotations to getDrops methods (#8440) 2022-10-07 20:51:54 +02:00
Warrior 60c973e461 Exempt players in creative/spectator from nether ceiling damage (#8427) 2022-10-07 20:43:26 +02:00
Jake Potrebic bcb4220b5f Correctly handle interactions with items on cooldown (#8008) 2022-10-07 17:22:45 +02:00
Jake Potrebic ff67f1fa18 EntityPickupItemEvent fixes (#8096) 2022-10-04 21:38:39 -07:00
Jake Potrebic 9d63b070a1 Fix custom piglin interest items (#8097) 2022-10-04 20:28:46 -07:00
Nassim Jahnke ad3d35751a Remove unnecessary onTrackingStart during nav warning
Closes #8396
2022-10-03 20:50:53 +02:00
Gero 15e1748fd5 Avoid resizing of ArrayList in ChunkMap#getPlayers (#8416) 2022-10-03 19:22:01 +02:00
Nassim Jahnke 011caa4d8e [ci skip] Minor patch cleanup 2022-10-03 19:07:03 +02:00
Friwi 616db7118d Fix nothing mlg (#8432) 2022-10-03 18:44:19 +02:00
Nassim Jahnke 928bcc8d3a Updated Upstream (Bukkit/CraftBukkit) (#8430)
Upstream has released updates that appear 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:
09943450 Update SnakeYAML version
5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc
6f82b381 PR-788: Add getHand() to all relevant events

CraftBukkit Changes:
aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe
5329dd6fd PR-1107: Add getHand() to all relevant events
93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
2022-10-02 09:56:36 +02:00
TetraTheta ec3cfa9b7f Only create paper.yml-README.txt on config conversion (#8334) 2022-10-02 09:29:09 +02:00
Jake Potrebic ec76e36a4e Fix a handful of vanilla bugs (#8187) 2022-10-01 19:39:42 +02:00
Melncat 6d1409316e Add getDrops to BlockState and isPreferredTool to BlockData (#8284) 2022-10-01 12:30:00 +02:00
Nassim Jahnke e9618f8780 Add system property to dump stack on bad plugin class access (#8417) 2022-10-01 11:49:27 +02:00
Remynfv 2534e5cbbf Fix other jigsaw related disconnect bug (#8414) 2022-10-01 10:08:07 +02:00
Nassim Jahnke f5fa69173c Don't print full packages in new chunk system classes
Closes #8391, #8412
2022-09-30 23:19:51 +02:00
Pasqual Koschmieder 14c32bc43d Fix wrong yaw and pitch of CommandSourceStack#getBukkitLocation (#8411) 2022-09-30 21:03:42 +02:00
RemynfvandLegitimoose c6d737528d use BlockFormEvent for mud converting into clay (#8398)
Co-authored-by: Legitimoose <legitimoose@gmail.com>
2022-09-30 20:33:31 +10:00
Ilari Suhonen 8d69cfc6ce Reduce allocation rate for checkBlock
Use ObjectOpenHashSet instead of HashSet
Remove unnecessary chunkToSave modification
2022-09-29 09:04:52 -07:00
Spottedleaf 7d3a882670 Do not log throwable for duplicate entity adds 2022-09-29 08:55:47 -07:00
Bjarne Koll 8a7dd61348 Mark parsed PoiChunks with data as not loaded (#8405)
Previously, PoiChunk#empty would create a new empty poi chunk with
loaded already set to true, as no data was contained in the chunk.
This allowed the poi chunk to skip expensive trips to the main thread.

However, PoiChunk#parse used #empty to create the initial PoiChunk
instance that is then filled with data.
This leads to PoiChunks returned from #parse to already be marked as
loaded, preventing the then needed trip to the tick thread to update
things like the village distance tracker.

To fix this, this commit now marks the PoiChunks loaded state as false
if the parse logic actually read and parsed any data.
This allows the PoiChunk#load method to properly run its callbacks when
called for the first time.
2022-09-29 08:54:47 -07:00
F1rsi 017af785ff [ci skip] Added the missing "d" character (#8267) 2022-09-29 15:36:01 +01:00
Remynfv 21661a7557 Fix jigsaw block kicking user (#8404) 2022-09-29 12:37:56 +01:00
Jason 79f2aa3eed Update Velocity natives (#8387) 2022-09-29 12:18:20 +01:00
Shane Freeder bd496d0e0d [ci skip] shuffle patches and rebuild 2022-09-28 04:27:26 +01:00
Nassim Jahnke 1bbd273bbd Fix user auth thread pool queue 2022-09-27 18:00:46 +02:00
Jake Potrebic f7d16f656a Fixes a couple issues with entity spawn reasons (#8390) 2022-09-27 01:24:56 +01:00
Nassim Jahnke b58c0cf14a Update snekyaml 2022-09-26 19:47:22 +02:00
Spottedleaf 01a13871de Rewrite chunk system (#8177)
Patch documentation to come

Issues with the old system that are fixed now:
- World generation does not scale with cpu cores effectively.
- Relies on the main thread for scheduling and maintaining chunk state, dropping chunk load/generate rates at lower tps.
- Unreliable prioritisation of chunk gen/load calls that block the main thread.
- Shutdown logic is utterly unreliable, as it has to wait for all chunks to unload - is it guaranteed that the chunk system is in a state on shutdown that it can reliably do this? Watchdog shutdown also typically failed due to thread checks, which is now resolved.
- Saving of data is not unified (i.e can save chunk data without saving entity data, poses problems for desync if shutdown is really abnormal.
- Entities are not loaded with chunks. This caused quite a bit of headache for Chunk#getEntities API, but now the new chunk system loads entities with chunks so that they are ready whenever the chunk loads in. Effectively brings the behavior back to 1.16 era, but still storing entities in their own separate regionfiles.

The above list is not complete. The patch documentation will complete it.

New chunk system hard relies on starlight and dataconverter, and most importantly the new concurrent utilities in ConcurrentUtil.

Some of the old async chunk i/o interface (i.e the old file io thread reroutes _some_ calls to the new file io thread) is kept for plugin compat reasons. It will be removed in the next major version of minecraft.

The old legacy chunk system patches have been moved to the removed folder in case we need them again.
2022-09-26 01:02:51 -07:00
Bjarne Koll abe53a7eb4 Fix typos in isTickingWorlds API javadocs (#8382) 2022-09-25 01:01:17 +01:00
Lulu13022002 6d630052fd Fix setEggCount method from TurtleLayEggEvent (#8385) 2022-09-24 18:34:20 +02:00
Owen b4c025b92c Fix player desync on dimension change (#8253) 2022-09-24 06:45:13 +01:00
Lulu13022002 62680d5f83 Avoid item meta usage for itemstack enchantment getter (#8373) 2022-09-24 06:19:51 +01:00
willkrobothandShane Freeder 4d52f1d247 Add method isTickingWorlds to Bukkit (#8316)
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>

Also, restores un/loading worlds mid tick. This will not be officially supported API contract that such a routine is safe, and these restrictions may be restored in the future.
2022-09-24 06:19:05 +01:00
Shane Freeder 6736f390a2 Fix mangled patch 2022-09-24 05:48:46 +01:00
willkroboth d3326235f0 Avoid potential place where the world map could be modified after its iterator is created (#8315) 2022-09-24 05:33:20 +01:00
Shane Freeder 3996e6ef29 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
c7c11188 SPIGOT-2620: Add Player#sendBlockChanges()
f63d2b44 Improve annotation test on parameters
3372e7b4 SPIGOT-1244, SPIGOT-6860, SPIGOT-6874: Various Javadoc and formatting fixes
a1e8a9ab PR-793: Ignore .checkstyle file generated by Eclipse IDE

CraftBukkit Changes:
c2c39089e SPIGOT-2620: Add Player#sendBlockChanges()
8209158db PR-1113: Ignore .checkstyle file generated by Eclipse IDE

Spigot Changes:
4aa5ead2 Rebuild patches
2022-09-24 02:38:12 +01:00
Jake Potrebic f528f53e81 Correct javadocs on PlayerArmorStandManipulateEvent (#7719) 2022-09-23 06:55:02 +01:00
Lulu13022002 ec0c550482 Call BlockPhysicsEvent more often (#8264) 2022-09-23 06:35:15 +01:00
Lulu13022002 8681503d10 Call EntityChangeBlockEvent for frogs egg (#8136) 2022-09-23 06:32:32 +01:00
Shane Freeder 980c1d1f90 Updated Upstream (Bukkit/CraftBukkit) (#8378) 2022-09-23 06:08:43 +01:00
Jake Potrebic 339e85d491 Updated Upstream (CraftBukkit) (#8376) 2022-09-22 01:20:59 +01:00
Jake Potrebic 9e614e6f9a Fix ground pathfinding (#7683) 2022-09-20 14:06:11 -07:00
ChristopheG 8db45c4312 Copper clear on lightning strike calls EntityChangeBlockEvent (#8126) 2022-09-20 03:35:38 +01:00
Owen ad3dffe715 Respect preventMovingIntoUnloadedChunks for optimized collision checking (#8259) 2022-09-20 03:02:52 +01:00
tahmid-23 f7e68091a0 Fix Pathfinding After World Has Changed (#8068) 2022-09-20 02:39:46 +01:00
Nick Hensel f8742e26cc Also load resources from LibraryLoader (#8335) 2022-09-20 02:07:03 +01:00
Shane Freeder dbc2d60ce0 Make WorldCreator#keepSpawnLoaded return the WorldCreator (Fixes #8321) (#8371)
* Make WorldCreator#keepSpawnLoaded return the WorldCreator (Fixes #8321)

Thought that I fixed this before push/merge, apparently not, hence, fix
the return type and add mitigation for this.

* Fix patch/build

* Rebuild patches
2022-09-20 01:28:22 +01:00
Shane Freeder 470c6388d2 Configurable chat thread limit (#7878) 2022-09-20 01:16:23 +01:00
MelncatandMelnCat ea777c345b Add a consumer parameter to ProjectileSource#launchProjectile (#8374)
Co-authored-by: MelnCat <melncatuwu@gmail.com>
2022-09-20 01:03:59 +01:00
Nex 63cb7472ac Added byte array serialization/deserialization for PersistentDataContainers (#7505) 2022-09-18 05:06:53 +01:00
Lulu13022002 dbda887457 Missing some effect cause (#8307) 2022-09-18 04:46:20 +01:00
Lulu13022002 34777cdcbe Missing eating regain reason (#8244) 2022-09-18 04:24:28 +01:00
Jake PotrebicandShane Freeder b826065a4b fire EntityChangeBlockEvent in more places (#6371)
* fire EntityChangeBlockEvent in more places

* Rebuild patches

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2022-09-18 04:03:54 +01:00
elmital ef670ebafb EndDragonFight killed statuses should be false for newly created worlds (#8354) 2022-09-18 02:44:06 +01:00
Peter Crawley 05f6a5c005 Limit size of Authenticator Cache Thread Pool (#8360) 2022-09-17 22:58:51 +01:00
Fruxz f5f84ff476 Add custom destroyerIdentity parameter to the sendBlockBreak function (#5840) 2022-09-17 22:27:46 +01:00
Bjarne Koll 751d092af3 Properly close section storage managed files (#8364) 2022-09-17 19:50:01 +01:00
Shane Freeder 36f0c1b3cc Rebuild patches 2022-09-17 04:35:39 +01:00
Jaren 267dd180b6 Stop large look changes from crashing the server (#8326) 2022-09-17 04:30:00 +01:00
karthanistyr 178f035aa7 Restore no-crash behaviour when read-only config file(s) (#8318) 2022-09-17 04:22:17 +01:00
Nassim Jahnke ef0e5a642d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
48c0c547 PR-786: Add methods to get sounds from entities

CraftBukkit Changes:
5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event
4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation
4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
e5d6a9bbf PR-1100: Add methods to get sounds from entities
b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta

Spigot Changes:
4c157bb4 Rebuild patches
2022-09-12 13:31:45 +02:00
Jake Potrebic 51183af967 Fix console completer/highlighter having invalid source stack (#8346) 2022-09-09 14:25:54 -07:00
Jake Potrebic e51401e764 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8347) 2022-09-09 11:54:00 -07:00
okx-code 36a5f150c5 Allow preventing BlockDestroyEvent from dropping items (#8349) 2022-09-08 17:13:50 +02:00
Spottedleaf 09904fd780 Re-add legacy getChunkAtAsynchronously to ChunkProviderServer
Apparently some plugins use it
2022-09-02 04:42:05 -07:00
Spottedleaf e8c2c3bfda Fix World#refreshChunk not working for chunks in no-tick range
The chunk would not be marked as ticking in this case, so
retrieving the ticking chunk would not work.
2022-09-01 15:39:24 -07:00
SpottedleafandSpottedleaf 046466f3ba Re-arrange most chunk system patches to front (#8338)
* Re-arrange most chunk system patches to front

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2022-09-01 09:51:59 -07:00
Spottedleaf eff22eb054 Ensure players are removed from pendingLogin
Looks like they would not have been removed if they disconnected
during the chunk load, preventing the world from being unloaded.
2022-08-29 06:21:45 -07:00
Spottedleaf aabf676721 Prevent unloading worlds with pending player logins
Logging into an unloaded world isn't going to end well.
This may fix the cases of people seeing errors about regionfiles
being closed, as loading chunks in an unloaded world will cause this
as the regionfile cache is closed but not cleared.
2022-08-26 22:20:27 -07:00
Nassim Jahnke 0bf8790c9c Fix client lag spikes due to client light recalc 2022-08-25 12:59:08 +02:00
José Miguel Moreno a76998d235 Fix plugin loggers on shutdown (#5592)
Potentially this should be merged back into the original logging changes patches
2022-08-21 03:57:17 +01:00
Nassim Jahnke 2da891fcfa Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
0b32cbaa PR-782: ThrownPotion now extends ThrowableProjectile
474238ca SPIGOT-7138: Can't retrieve pixel color from map

CraftBukkit Changes:
cdef8fc72 PR-1097: CraftThrownPotion now extends CraftThrowableProjectile
419010b13 SPIGOT-7112: Mobs added 1.17 and after do not create an EntityTargetEvent properly
e71426201 SPIGOT-7079: Allays don't call EntityTargetEvent on ground items
f80adb8b9 SPIGOT-7138: Can't retrieve pixel color from map
2022-08-17 13:02:35 +02:00
petersv5 4ba43fe02a Grant temporary immunity to hopper minecarts while actively pulling (fixes #8281) (#8282)
Reduce the impact from EAR on hopper minecart based unloaders by making them immune to
EAR while pulling objects. The EAR is still active outside misc activation range when
the hopper minecart is idle, keeping lag low.
2022-08-14 19:41:15 +02:00
Nassim Jahnke 4516aedb43 More ThrownPotion API 2022-08-14 19:12:02 +02:00
Josh RoyandThonk 5bf259115c Add NamespacedKey biome methods
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
2022-08-14 13:09:10 -04:00
Pedro db17048325 [ci skip] Show @org.bukkit.UndefinedNullability in javadocs (#8291) 2022-08-14 17:18:39 +01:00
Nassim Jahnke 9592da1f84 Add method to get highest anger level of warden 2022-08-14 10:25:28 +02:00
Nassim Jahnke 0ddd20c6f7 Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appear 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:
ead719a65 SPIGOT-7136: Cancelling PlayerInteractEntityEvent with the Allay desyncs
8468e167e SPIGOT-7137: StructureGrowEvent isFromBonemeal and getPlayer have incorrect values
d45057c59 SPIGOT-7089: Crash when command blocks attempt to load worlds

Spigot Changes:
450dcaa8 Rebuild patches
2022-08-14 10:03:13 +02:00
Shane Freeder 3f0415b453 Use thread safe Random inside of ServerLoginPacketListenerImpl
Vanilla uses a Random instance which is not thread safe inside of the
constructor for ServerLoginPacketListenerImpl, this is an issue because
instances of that class are created on the network worker threads, which
means that there is a potential (which we have reports confirming) that
multiple users logging on could trip this
2022-08-11 14:38:45 +01:00
TheTuso 7e11afa426 Fix mad cursor addition via API (#8276) 2022-08-11 10:40:19 +02:00
Spottedleaf 2a74071bcb Simple patch changes for chunk system
Major ones soon
2022-08-10 08:07:49 -07:00
Shane Freeder 2cab6963a7 Don't manually send ClientboundPlayerPositionPacket for refreshPlayer
in 1.19, mojang made it so that teleporations validate that an awaiting pos was
set in the server when teleporting, thus we need to ensure that this is set when
sending the player pos, otherwise the player will be kicked when the client sends
back the aknowledgement
2022-08-10 15:01:55 +01:00
Nassim Jahnke 954b3fb7d5 Send signature headers when chat event viewers are modified
Fixes #8275
2022-08-10 09:59:28 +02:00
Owen 22ad9eedec Fix command pool submitting on shutdown (#8272) 2022-08-09 20:51:17 -07:00
Nassim Jahnke e6f8284125 Updated Upstream (Bukkit/CraftBukkit) (#8270)
Upstream has released updates that appear 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:
d43a1e72 SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots
9d6e4847 SPIGOT-7122: New Allay Methods from 1.19.1

CraftBukkit Changes:
c379a6b4e SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots
051fcced1 SPIGOT-7122: New Allay Methods from 1.19.1
2022-08-09 09:18:08 +02:00
FivePB (Xer) c7e118b394 Update modern forwarding to v3 (#8219) 2022-08-08 16:25:41 +01:00
Owen 78b19f89a4 Separate Command Sending to Separate Thread Pool (#8170) 2022-08-08 12:32:17 +01:00
Josh Roy a47301e40f Fix Player#chat kicking all clients (#8262) 2022-08-08 09:31:10 +02:00
Jake Potrebic 3624637a19 Improve documentation of Inventory#removeItem (#8263) 2022-08-07 23:17:51 -07:00
Jason 0118c0bd79 Improve MojangAPI docs and replace @Deprecated with @ApiStatus.Experimental on draft APIs (#8261) 2022-08-07 13:47:43 -07:00
Jason a15152e96a Allow old behavior for CommandRegisteredEvent (#8249) 2022-08-06 16:22:51 -07:00
Jake Potrebic bef2c9d005 1.19.2 (#8250) 2022-08-05 15:58:34 -07:00
Jake Potrebic 02831e3369 Updated Upstream (Bukkit/CraftBukkit) (#8240)
Upstream has released updates that appear 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:
caa7c486 SPIGOT-7109: Add WorldBorder#setSize using TimeUnit

CraftBukkit Changes:
1e3bf58cd SPIGOT-7109: Add WorldBorder#setSize using TimeUnit
2022-08-05 16:10:44 +02:00
ChristopheG a311dcecb3 Remove RAW_COPPER and add COPPER_BLOCK in MaterialTags.UNWAXED_COPPER_BLOCKS and MaterialTags.COPPER_BLOCKS (#8237) 2022-08-05 11:57:21 +02:00
Owen 69950d5a6a Block Ticking API (#7202) 2022-08-03 23:14:04 +02:00
ocelotpotpie 18a0337d6e [ci skip] Fix grammatical error in README. (#8189) 2022-08-03 22:51:37 +02:00
Nassim Jahnke 3af906befd Updated Upstream (Bukkit)
Upstream has released updates that appear 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:
0260da7a PR-776: Fixed javadocs for ItemFlag#HIDE_POTION_EFFECTS
2022-08-03 22:47:15 +02:00
Jake Potrebic ef42d2a575 Fix null profile key breaking nullability contracts for PlayerProfile API (#8233) 2022-08-03 22:46:33 +02:00
Spottedleaf a817697e8a Add async catcher to PlayerConnection internalTeleport 2022-08-03 12:59:54 -07:00
Nassim Jahnke 4a00cee9cc Readd patch to remove invalid signature on login error 2022-08-03 15:25:11 +02:00
Jake Potrebic 7044a9c538 Leave a paper.yml.txt stub pointing to new location (#8090) 2022-08-02 13:24:57 -07:00
Nassim Jahnke c032050ad8 Fix command preprocess cancelling and command changing
When a command with signed arguments is cancelled, message headers need to be sent out. Same thing for when the executed command is changed.
2022-08-02 19:19:16 +02:00
chickeneer e0486ae2cd Fix suggest command message for brigadier syntax exceptions (#8221) 2022-08-02 09:51:21 +02:00
Nassim Jahnke ceef4b9c09 Don't call AsyncTabCompleteEvent from netty IO thread (#8218) 2022-08-01 21:56:28 +02:00
Jake Potrebic dd3e4e7bd6 Initial support for signed messages (#8198) 2022-08-01 12:34:55 -07:00
Nassim Jahnke d60497ebf2 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
ff64962b SPIGOT-7124: MapPalette.getColor(0) returns the wrong color

CraftBukkit Changes:
8f3647242 SPIGOT-7127: /say doesn't work from console
2022-08-01 16:01:20 +02:00
Maddy Miller babffb5a46 Undeprecate and fix Boat#getBoatMaterial (#8217) 2022-08-01 23:02:23 +10:00
Jake Potrebic fd557b7d51 Undeprecate Bed's tile entity interface (#7330) 2022-07-31 11:25:24 -07:00
Jake Potrebic 1f0d70743e Fix issues with CreeperIgniteEvent (#7507) 2022-07-31 10:14:54 -07:00
Riley Park fcb7b73847 [ci skip] remove stale 2022-07-31 09:50:24 -07:00
Owen 307778fc70 Collision API (#6736) 2022-07-31 17:30:34 +02:00
Owen 532dc51d5f Add missing BlockFadeEvents (#8171) 2022-07-30 18:58:37 +02:00
Owen 6ecdbc09c2 Use Worldheight for Activation Ranges (#8061) 2022-07-30 18:47:35 +02:00
Owen 8a08b86f4b Custom Chat Completions API (#8212) 2022-07-30 18:28:24 +02:00
Owen 65f0b2e2e4 Add more needed BlockStateListPopulator Methods (#8021) 2022-07-30 00:28:46 +01:00
Owen b74c4d4587 Warn on plugins accessing faraway chunks (#8208) 2022-07-30 00:16:26 +01:00
Owen b72eafc04d Send block entities after destroy prediction (#8053) 2022-07-29 23:26:41 +01:00
Jake Potrebic e5bbb56ac6 Added 1.19 kick event causes (#8204) 2022-07-29 09:31:02 -07:00
Nassim Jahnke 3b895f36fd Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
401f1ad58 Re-enable outdated build delay
40eaff8a5 SPIGOT-7125: Command execution exceptions are not logged
639814683 SPIGOT-7123: NullPointerException thrown by Player#chat method
2022-07-29 09:11:11 +02:00
stonar96 2acb479b41 [ci skip] Fix xray patch code style (#8196) 2022-07-28 10:30:32 +02:00
Jake Potrebic 4a4ee79cd6 Separate out chat and commands sent via API (#8131) 2022-07-27 19:07:26 -07:00
Nassim Jahnke 71544ab01f Readd deobfuscation of chat executor stacktraces 2022-07-28 02:02:40 +02:00
Nassim Jahnke c488d15359 Don't fire preview event for non-player senders
Fixes #8195
2022-07-28 01:59:19 +02:00
Nassim Jahnke 2184cd2252 Fix chat message api using overlay 2022-07-28 00:38:37 +02:00
Nassim Jahnke d41ecbe5c3 Make it compie 2022-07-28 00:20:14 +02:00
Nassim Jahnke cb6f029de9 More compile fixed 2022-07-28 00:10:27 +02:00
Nassim Jahnke 063e6b288c Compile fixes 2022-07-28 00:04:27 +02:00
Jake Potrebic 64cb313386 some compile fixes 2022-07-27 15:00:14 -07:00
Nassim Jahnke c8f3d9ee8c More more more more more more more work 2022-07-27 23:50:05 +02:00
Nassim Jahnke 6b80b342d9 More more more more more more work 2022-07-27 23:32:15 +02:00
Nassim Jahnke c7304035b6 More more more more work 2022-07-27 23:19:52 +02:00
Nassim Jahnke aab40382a5 More more more more work 2022-07-27 22:55:55 +02:00
Nassim Jahnke 7a133678da More more more work 2022-07-27 22:46:05 +02:00
Nassim Jahnke 50710fa684 More more work 2022-07-27 22:17:18 +02:00
Nassim Jahnke 08828fde02 More work 2022-07-27 21:49:24 +02:00
Nassim Jahnke afb9e818fc Fix timings diff 2022-07-27 21:22:02 +02:00
Nassim Jahnke faafca851c New work 2022-07-27 21:18:51 +02:00
Nassim Jahnke 734a43657a Move patches over, start with first few 2022-07-27 20:52:03 +02:00
Nassim Jahnke 86f87ba400 Fix custom merchant trade event world reference 2022-07-25 19:21:31 +02:00
Nassim Jahnke 345a6a6205 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
ef0946409 PR-1091: Fix exit position in entity travel with portals
d12768f75 PR-1090: Remove no longer needed world reference from CraftMerchantCustom
7550f6854 SPIGOT-7115: Support hex color codes in custom merchant inventory titles
2022-07-25 18:44:24 +02:00
Nassim Jahnke 22ac7d6817 Add internal netty pipeline events 2022-07-25 16:13:09 +02:00
Nassim Jahnke b327e17634 Fix regenerate chunk method 2022-07-24 22:11:35 +02:00
Shane Freeder 44b6869fd2 Fix plugin update IO logic when replacing jars 2022-07-23 05:52:57 +01:00
Shane Freeder 46a9d2a4ac Cache Component MOTDs 2022-07-23 02:56:50 +01:00
Jake Potrebic 1a8bea734a Fix wrong world being passed into portal event (#8174) 2022-07-22 17:42:34 -07:00
Jake Potrebic 4952c04610 Don't use level random in entity constructors (#8122) 2022-07-22 16:42:13 -07:00
Jake Potrebic 0193a9db5d Add EntityPortalReadyEvent (#5619) 2022-07-22 16:23:12 -07:00
Owen 5deafd1969 Teleportation API (#6562) 2022-07-22 20:36:43 +01:00
Jake Potrebic 52a60ad946 Updated Upstream (Bukkit/CraftBukkit) (#8172)
Upstream has released updates that appear 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:
23f557a0 SPIGOT-5380, SPIGOT-6958, PR-772: Add some missing entity API

CraftBukkit Changes:
fc3071161 SPIGOT-5380, SPIGOT-6958, PR-1085: Add some missing entity API
2022-07-22 11:18:00 -07:00
Jake Potrebic d0e7fa4dc9 Updated Upstream (Bukkit) (#8158) 2022-07-21 20:53:04 +01:00
Pedro c6313e659c [ci skip] Update WSL docs in CONTRIBUTING (#7836) 2022-07-21 20:52:11 +01:00
ChristopheG 73dca00ba5 Add yaw and pitch to CommandSourceStack#getBukkitLocation() (#8167) 2022-07-21 09:26:36 +02:00
Noah van der Aa a76a1ab862 Make Biome implement Translatable (#8161) 2022-07-20 18:23:26 +02:00
Pedro 16ee379389 Add SpawnReason to Tadpoles spawned by Frogspawn (#8165) 2022-07-20 18:18:28 +02:00
Lulu13022002 bebfc79708 Call jump event for the beast (#8100) 2022-07-20 18:17:42 +02:00
Emily 10f09b938a [ci skip] Readd "Use" Javadoc tab (#8162) 2022-07-20 18:16:13 +02:00
Jake Potrebic b7faa655cb Fix update future return type (#8120) 2022-07-18 23:06:59 -07:00
Space Walker 384d63918c Fix missing redstone event call with Eigencraft redstone (#8148) 2022-07-18 13:46:52 +02:00
stonar96 90836d0da6 1.19 Anti-Xray cleanup (#8104) 2022-07-18 12:30:31 +02:00
Pedro fdd910e0cf Log IOException in plugin update (#7960) 2022-07-18 11:31:33 +02:00
Pedro 036a09c300 Fix spigot config not using commands.spam-exclusions (#8151) 2022-07-17 18:37:39 +02:00
Space Walker cd215af6eb Fix #8138 (#8139) 2022-07-13 23:20:26 +02:00
Noah van der Aa e4f21e3178 Move old user conversion down slightly (fixes #8050) (#8052) 2022-07-12 22:13:27 +01:00
Jake Potrebic b58063a949 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8124)
Upstream has released updates that appear 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:
607ce370 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
f14cea82 SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
8e43b278 PR-767: Add support checking/survivability methods for BlockData
b3dee151 SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

CraftBukkit Changes:
9a8e08010 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
26bd88ccd SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
7ba06e15b SPIGOT-7095: StructureGrowEvent doesn't fire for mangrove propagules growing to a tree
163e35c91 PR-1079: Add support checking/survivability methods for BlockData
4230f8f0e SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

Spigot Changes:
14a2382f Rebuild patches
2022-07-12 10:16:05 -07:00
Jason e294802977 Refactor paper command (#8112)
* Refactor paper command

* Improve paper dumpitem output

* Register paper command permissions

Would be nice to add descriptions for these too, but that's an enhancement for another time

* Update MobcapsCommandTest fail message

* Notify on bad radius for fix light

* fixup rebase
2022-07-08 16:01:42 -07:00
Jason Penilla 5ffeb70186 Use getChunkForLighting instead of getChunkAtImmediately in fixlight to properly ignore imposter chunks
We need chunks to actually have their light status future done to relight them, an imposter with for example only the empty future complete but with a light status cannot be relit.

getChunkForLighting gives the desired behavior and is the method used by the light engine, so updating fixlight to use it as well fixes #8115
2022-07-08 15:27:37 -07:00
Robert Olaru 41238a4e24 [ci skip] Fixed typo in README (#8031) 2022-07-08 00:41:35 +01:00
Bjarne Koll 95ac8745f0 Add ZombieVillager conversion without entity event (#8111)
The ZombieVillager#setConversionTime API method internally calls
startConversion which always broadcasts the entity event responsible for
playing the respective sound at the beginning of a conversion.

This is not always wanted by developers when modifying already
converting zombies in particular.

This commit expands the ZombieVillager interface with another overload
of the setConversionTime method that also takes a simple toggle flag
indicating whether or not the entity event should be published to the
world.
2022-07-07 22:43:28 +01:00
Lulu13022002 c4782f50a3 Add xp orb spawn reason for frogs (#8045) 2022-07-07 22:38:12 +01:00
Jake Potrebic 6ea73e7d63 Fix Bee setFlower NPE (#8107) 2022-07-06 15:21:56 -07:00
Shane Freeder a05e69b9fc Add a bit of extra debugging to chat order/time errors
I do wanna add some leeway to the kick, if message was sent within 30-60
seconds of the last message, assume clock drift and just ignore the kick
(send a message? just silently ignore?), but, I'm not 100% on this one
2022-07-06 06:00:16 +01:00
Bjarne Koll c879064bfe Call EntityDropItemEvent for goats dropping horns (#8094) 2022-07-04 21:26:43 +02:00
Jake Potrebic fbb11db9a5 Add missing EntityDropItemEvent calls (#5674) 2022-07-04 12:01:17 -07:00
Nassim Jahnke 385f313a8b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8092)
Upstream has released updates that appear 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:
d41796de SPIGOT-7071: Add Player#stopSound(SoundCategory category)
61dae5b2 SPIGOT-7011, SPIGOT-7065: Overhaul of structures

CraftBukkit Changes:
991aeda12 SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds
5c9a5f628 SPIGOT-7071: Add Player#stopSound(SoundCategory category)
68f888ded SPIGOT-7011, SPIGOT-7065: Overhaul of structures
0231a3746 Remove outdated build delay.

Spigot Changes:
475f6008 Rebuild patches
8ce1761f Rebuild patches
2022-07-04 16:38:06 +02:00
Noah van der Aa 1e5d1db2b7 Call StructureGrowEvent for mangrove propagule (#8023) 2022-07-04 15:20:43 +01:00
Spottedleaf d86fde5523 Do not sync load chunk for dynamic game event listener registration
These can be called while an entity is being added to the world,
and if the entity is being added from a chunk load context the
sync load will block indefinitely (because the chunk load context
is for completing the chunk to FULL).

This does raise questions about the current system for these
dynamic registrations, as it looks like there is _zero_ logic
to account for the case where the chunk is _not_ currently loaded
and then later loaded.
2022-07-03 22:42:58 -07:00
Spottedleaf 41647af74c Do not use worldgen executor for api profile completions
We cannot put blocking network I/O onto the worldgen threads,
this will crash the server if it stalls
2022-07-03 14:55:56 -07:00
u9g ed79fc947a Add Player#getFishHook (#7988) 2022-07-03 12:24:29 -07:00
pop4959 9d0650ed60 Don't print component in resource pack rejection message (#8084) 2022-07-02 11:19:53 +02:00
Noah van der Aa c029645443 Don't allow world unloading while ticking worlds (fixes #8080) (#8081) 2022-07-01 18:14:50 +02:00
Space Walker a22eb678af update eigencraft patch (#8076) 2022-06-30 09:20:40 +02:00
Riley Park 281834752c [ci skip] fix team name in codeowners 2022-06-29 20:10:55 -07:00
Jason 1bd678c494 [ci skip] Scan built jars for bad method usages (#8051) 2022-06-27 15:41:59 -07:00
Jason Penilla 0d79b867e5 Update paperweight to 1.3.8 2022-06-27 15:27:36 -07:00
Jake Potrebic 37afe987d9 Fix CCE for SplashPotion and LingeringPotion spawning (#7758) 2022-06-25 14:21:47 -07:00
Owen 11bd74bc56 Use safe method for handling Files#createDirectories (#7997) 2022-06-25 22:40:28 +02:00
Jake Potrebic e7036bb2d7 Updated Upstream (Bukkit/CraftBukkit) (#8042)
Upstream has released updates that appear 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:
d5a777e7 SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN

CraftBukkit Changes:
82f757467 SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN
c924fa531 SPIGOT-7072: Call events for stepping on sculk sensors and sculk shriekers
2022-06-25 13:26:00 -07:00
Noah van der Aa 04d080ed82 [ci skip] Fix tiny mistake in adventure javadocs (#8046) 2022-06-24 17:39:44 +01:00
Owen 5593f4edd3 Cleanup LivingEntity Hand Raised/Item Use API (#7995) 2022-06-24 10:04:02 +02:00
Space Walker bdb6816960 Update Alternate Current to v1.4.0 (#8028) 2022-06-24 09:58:59 +02:00
Jake Potrebic e52499e41d Fix Player#loadData and Player#saveData javadocs (#8039) 2022-06-22 20:46:13 -07:00
Shane Freeder 147a2b7f54 Parse MOTD as legacy sectioned string (Fixes #8036)
This is not ideal but this is how MOTDs have been parsed for years,
ensure that this is performed for all things getting the MOTD from
the server
2022-06-22 09:15:20 +01:00
Jake Potrebic 4c9317c9fb Use non-deprecated super ctor in PaperServerListPingEventImpl (#8029) 2022-06-21 17:54:52 +02:00
Nassim Jahnke fb2c24b36d Updated Upstream (Bukkit/CraftBukkit) (#8015)
Upstream has released updates that appear 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:
05ae036c PR-746: Add option to use cached map color palette
57849c1b PR-759: Add preview chat option in ServerListPingEvent
0169e65d PR-758: Add missing server properties methods from 1.19

CraftBukkit Changes:
622dbe6c2 SPIGOT-7068: SKULK and SKULK_VEIN BlockSpreadEvents Still do not reference the correct source (SKULK_CATALYST)
6c61b73f3 PR-1052: Add option to use cached map color palette
c882f38ea SPIGOT-7066: Fix custom END worlds not generating DragonBattle
6866aab59 SPIGOT-2420: Can't set exp drops for EnderDragon death
9dcd46530 PR-1067: Add preview chat option in ServerListPingEvent
36c2681af PR-1066: Add missing server properties methods from 1.19
031eaadd0 Increase outdated build delay
8fda4b12f SPIGOT-7060: SCULK and SCULK_VEIN BlockSpreadEvents do not reference the correct source
2022-06-20 19:12:05 +02:00
Shane Freeder ed9cf5ca08 Fix missing null check in ChunkGenerator#findNearestMapStructure 2022-06-20 15:01:29 +01:00
Spottedleaf 9797f081c2 Sync Starlight SaveUtil with 1.1.1
Code isn't used, but still should be synced
2022-06-18 14:48:08 -07:00
Jake Potrebic b0eb4e0c74 Fix number parsing (#8013) 2022-06-17 11:28:18 -07:00
Shane Freeder 7688112546 [ci skip] restore jd.io 2022-06-17 18:28:43 +01:00
Shane Freeder b77fe3a42b Temp: Disable javadoc.io for now 2022-06-17 08:26:11 +01:00
Jake Potrebic e269a0a00b Fix incorrect random nextLong to nextInt (#8009) 2022-06-17 09:00:17 +02:00
Shane Freeder 81f2eece54 [ci skip] rebuild patches 2022-06-17 06:10:23 +01:00
Jake Potrebic d1b1c6ffd9 Add missing deprecation to AdvancementDisplayType (#7876) 2022-06-16 15:19:47 -07:00
Jake Potrebic dd613194ed Couple fixes for command blocks (#8004) 2022-06-16 15:03:02 -07:00
Owen f428887cc1 Prevent empty items from being added to world (#7998)
The previous solution caused a bunch of bandaid fixes inorder to resolve edge cases where minecraft/the api might spawn items that are air.
Just simply prevent them from being added to the world instead.
2022-06-16 22:31:23 +01:00
Jake Potrebic 0ae78d381a Fix advancement saving before reloads (#8003) 2022-06-16 21:59:53 +01:00
Noah van der Aa 0c1643c02c Fix MC-252439 (#7994) 2022-06-16 20:23:36 +02:00
Owen 2dcfb2b11f Nameable Banner API (#7711) 2022-06-16 04:54:54 +01:00
OwenandBillyGalbreath 94ef34cd0f Fix incorrect ansi code being used for bold (#8000)
Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
2022-06-16 04:40:14 +01:00
Owen 17c1c6c3e7 Add missing important BlockStateListPopulator methods (#7952) 2022-06-15 18:30:58 +02:00
Jake Potrebic 4a48ed306d Add option for strict advancement dimension checks (#7954) 2022-06-14 16:31:20 -07:00
u9g 805423c90e Add ARMOR tag to MaterialTags (1.19) (#7987) 2022-06-15 00:04:19 +01:00
chickeneer e3042d2506 Fix the growth modifier for glowberries (#7986) 2022-06-14 23:37:14 +01:00
Dustin 48f7a1a9ef Add WardenAngerChangeEvent (#7943) 2022-06-14 12:34:41 +02:00
Jake Potrebic cb410bb612 [ci skip] Update CONTRIBUTING.md for config changes (#7977) 2022-06-14 10:53:02 +02:00
Jake Potrebic b844286f48 Fix command signs patch update (#7976) 2022-06-14 10:51:53 +02:00
Noah van der Aa 16541757f7 [ci skip] Update performance problem issue template to account for new config formats (#7967) 2022-06-14 10:50:38 +02:00
Jake Potrebic 3d37b42a89 Couple config fixes (#7975) 2022-06-13 15:29:44 -07:00
froobynooby 8bae82db21 Use deserialised row keys in config tables (#7962) 2022-06-13 13:50:43 -07:00
Nassim Jahnke bd097b4323 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
4d37bf30 PR-762: Add SpawnReason and TransformReason for Tadpole metamorphosis into Frog
788174ae PR-761: Add Hangable interface to MangrovePropagule

CraftBukkit Changes:
3571ca8d1 PR-1070: Add SpawnReason and TransformReason for Tadpole metamorphosis into Frog
8f097b92f PR-1068: Add Hangable interface to MangrovePropagule

Spigot Changes:
56be6a84 Rebuild patches
c6c8886d PR-118: Add config option to disable hopper-chunk-loading
2022-06-13 18:06:25 +02:00
Shane Freeder e4f5e1c9ab Bump netty 2022-06-12 23:53:18 +01:00
Josh Roy 90050ffd54 Update Adventure to 4.11.0 and implement ComponentLogger (#7937) 2022-06-12 23:07:40 +02:00
Jason Penilla 3690440aaa Update paperweight to 1.3.7 2022-06-12 13:43:58 -07:00
Jake Potrebic 4797e3a945 Dont reassign the hiddenConfigs field in TimingsManager (#7951) 2022-06-12 10:29:27 -07:00
Nassim Jahnke 8b6f4dd482 Add paper-settings-directory cl argument (#7949) 2022-06-12 10:07:43 +02:00
Jake Potrebic ee4916df7d Fire kick event for out-of-order chat on main thread (#7942) 2022-06-11 18:11:18 -07:00
Shane Freeder 6c52b5e2c8 Ensure that Log4J is shutdown when stopping the server (Fixes #7932) 2022-06-12 01:59:24 +01:00
Shane Freeder c044b14efd Add support for Velocity forwarding v2
This is strictly not needed, however, I wanted to write this in part
to test the new forwarding logic, parsing and advertising the latest
featureset is also not exactly a bad thing
2022-06-12 01:49:04 +01:00
Jake Potrebic 9ad94dcbc4 Adjust config headers 2022-06-11 13:43:59 -07:00
Spottedleaf dfc10448bb Fix keep spawn loaded patch
Needs to be in blocks
2022-06-11 08:03:56 -07:00
Spottedleaf 46954ee75b Don't explode on light data in the nether
It shouldn't be there but whatever
2022-06-11 08:03:56 -07:00
Jake Potrebic 55201f00e8 Updated Upstream (Bukkit/CraftBukkit) (#7936)
Upstream has released updates that appear 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:
c1d911a2 Add compat constructor to PlayerAnimationEvent

CraftBukkit Changes:
effea36a2 PR-1065: Add missing calls for BlockSpreadEvent when Sculk spreads
2022-06-11 11:02:57 +02:00
Nassim Jahnke d7165b0d56 Fix some references to obfuscated code 2022-06-11 11:02:09 +02:00
Owen1212055 1ccff4f5d1 Readd mc-4 fix 2022-06-11 10:41:59 +02:00
Owen c80df849c2 Readd remove vec allocations diff (#7930) 2022-06-11 10:30:20 +02:00
Evan f8beab5e5e correct argument check in PlayerHandshakeEvent#setFailMessage(String) (#7940) 2022-06-11 00:37:00 -07:00
Spottedleaf ee7d16111d Make starlight light read non-fatal if it throws
Brings behavior in line with the mod, we shouldn't kill the chunk
if the light data is corrupt, we can regenerate the light data
2022-06-10 21:08:37 -07:00
Spottedleaf 5a2973fd80 Correct dataconverter diff
Missed renames + game event listener walker stuff
2022-06-10 20:54:05 -07:00
Jake Potrebic 76f81aec25 Keep default keys in some maps
Fixes https://github.com/PaperMC/Paper/issues/7913#issuecomment-1152780671
2022-06-10 17:11:12 -07:00
Jake Potrebic 99aa5f2fa5 Fixes parsing tags in selectors in command functions
Fixes #7928
2022-06-10 10:02:09 -07:00
Jake Potrebic 698b3152cf Improve migration file errors (#7929) 2022-06-10 10:01:09 -07:00
Owen1212055 8bca9190a4 Remove unneeded patch 2022-06-10 16:15:38 +02:00
Owen a8a01bbb52 port Significantly improve performance of the end generation (#7919) 2022-06-10 16:11:41 +02:00
Nassim Jahnke cf384f5269 Don't print stacktrace when client with invalid signature logs in 2022-06-10 16:03:48 +02:00
Nassim Jahnke 9b6fb2fe71 Remove bad warning 2022-06-10 14:58:25 +02:00
Nassim Jahnke 07548192b1 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
cc7edd6bc SPIGOT-7051: Worldgen API does not run vanilla noise generation when shouldGenerateNoise is true
2022-06-10 14:45:58 +02:00
Nassim Jahnke 9a75a79edd Readd PlayerAnimationEvent constructor removed by upstream 2022-06-10 14:44:40 +02:00
Jake Potrebic 8141349df1 improve packet config serializer (#7920) 2022-06-10 10:45:41 +02:00
Jake Potrebic dd6a8e9394 couple more migration issues 2022-06-09 22:03:37 -07:00
Jake Potrebic 02b5ec4c78 fix 2 more migration issues 2022-06-09 18:40:07 -07:00
Jake Potrebic cfe3ad1b0f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
45d9c73c SPIGOT-7043: EnderChest does not implement Lidded
86b95f34 SPIGOT-7047: Add Player#getLastDeathLocation

CraftBukkit Changes:
b2557f6ac SPIGOT-7041: Custom BiomeProvider not used when world set to type FLAT
732c50cab SPIGOT-7043: EnderChest does not implement Lidded
6209029ea SPIGOT-7048: addPassenger() not working when vehicle is player
3aa7836df SPIGOT-7047: Add Player#getLastDeathLocation
7d522cd26 SPIGOT-7050: Enchantment data of items will not be saved correctly when saved in YAML configuration file

Spigot Changes:
1dffefb4 Rebuild patches
2022-06-09 18:20:55 -07:00
Owen 83e2a3582b Fix light (#7917) 2022-06-10 02:09:55 +01:00
Jason Penilla 4a51a54896 Don't use deprecated permission message method 2022-06-09 17:03:05 -07:00
Nassim Jahnke 5ac29fcb93 Fix migration of packet limiter 2022-06-10 01:55:53 +02:00
Owen d833c0c39a Update starlight + read null light data (#7912) 2022-06-10 01:49:23 +02:00
Jason Penilla 7c55e62abc Fix tests 2022-06-09 16:19:38 -07:00
Jason Penilla ade44f39ce Remove todo 2022-06-09 16:08:23 -07:00
Jason Penilla 0a21166a8b Update player chunk loader patch, re-add ticket level propagator patch 2022-06-09 16:01:48 -07:00
Noah van der Aa 181a8479b5 Make slime spawn checks use tag again and rename config option (#7910) 2022-06-10 00:48:46 +02:00
Jake Potrebic 6249dd5ecb remove more unused config options 2022-06-09 15:15:01 -07:00
Jake Potrebic 77de07a15d fix more config migration issues 2022-06-09 15:03:02 -07:00
Jake Potrebic e5ed99a29a fix compile issue 2022-06-09 14:50:05 -07:00
Jake Potrebic 3f1c6a45da move commands out of configuration 2022-06-09 14:44:20 -07:00
Shane Freeder ad51c406d5 Fix don't lookup profiles for blank names patch 2022-06-09 22:37:33 +01:00
Nassim Jahnke 09c9215b85 Add sendRichMessage and sendPlainMessage methods 2022-06-09 23:34:06 +02:00
Nassim Jahnke 5052a4515e Minor patch changes 2022-06-09 23:27:06 +02:00
Jake Potrebic c946526ab1 minimessage conversion 2022-06-09 14:25:16 -07:00
Owen c34a306393 Remove old config options (#7908) 2022-06-09 22:48:35 +02:00
Owen acd50c5287 Keyed cat Type (#7901) 2022-06-09 22:38:59 +02:00
Jake Potrebic f27aa33aba catch IAE from empty transformation builder 2022-06-09 13:06:08 -07:00
Owen d9fcf39f65 Remove locname (#7909) 2022-06-09 12:56:21 -07:00
Jake Potrebic 2e68ecc289 more configuration fixes/changes 2022-06-09 12:51:29 -07:00
Owen e47848f112 Correctly handle ElderGuardianAppearanceEvent canceling (#7902) 2022-06-09 21:04:10 +02:00
Noah van der Aa 84434e6ae9 Don't validate chunk before it's been run through DataConverter (#7907) 2022-06-09 17:39:02 +01:00
Nassim Jahnke a3a0390e3b Fix config migration error preventing server startup
There's at least two more, but those are less pressing
2022-06-09 14:27:48 +02:00
Nassim Jahnke d385af0e01 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
0a4b84d6 SPIGOT-7003: Add missing PlayerAnimationType
830db7d5 SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas
20caf8ff PR-754: Add DamageCause.SONIC_BOOM

CraftBukkit Changes:
576a03704 SPIGOT-7003: Add missing PlayerAnimationType
0dcc5fdd0 SPIGOT-5984: Add non deprecated / magic value way to set pixel in MapCanvas
d75aacb43 Update Netty version
3b34c6bea SPIGOT-7044: Modified RandomSourceWrapper to ensure random is not null before setting seed
4b60bfd18 PR-1059: Add DamageCause.SONIC_BOOM
2022-06-09 13:55:33 +02:00
Nassim Jahnke e1c2939c11 Update configurable feature seed patch 2022-06-09 13:16:00 +02:00
Nassim Jahnke b26d590d0c Fixes
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2022-06-09 11:57:19 +02:00
Nassim Jahnke 7be0194157 Readd dummy PaperConfig and PaperWorldConfig classes 2022-06-09 11:46:41 +02:00
Nassim Jahnke ffddec55d0 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
50ef122ef SPIGOT-7042: Subtitle is always equal to title
2022-06-09 11:40:30 +02:00
Jason d7cc306336 Update Optimise general POI access (#7903) 2022-06-09 11:37:28 +02:00
Jake Potrebic 172d260d67 Move to configurate for paper.yml (#7609) 2022-06-09 10:51:45 +02:00
Owen da8027352c Deprecate origin for vibrations (#7898) 2022-06-08 13:44:59 -07:00
Jake Potrebic 467a16642a fallback to default locate logic if no API found 2022-06-08 13:42:54 -07:00
Noah van der Aa 9107753202 (1.19) Make timings link clickable (#7897) 2022-06-08 13:27:24 -07:00
Owen cbb47cacdb Add missing spawn eggs (#7896) 2022-06-08 13:25:47 -07:00
Nassim Jahnke 11c2705ac2 Slightly untrash Spigot chat handling
Vanilla technically allows chat messages with starting slashes now,
Spigot still accepts them as commands, most likely due to being too
lazy to properly differentiate between chat and command intent in
their implementation. This disallows modified clients to send chat
messages with slashes and makes sure chat validation always happens
on the netty event loop, rather than there and possibly being moved
to the main thread, thus having the delayed handling cause a bad
process order of message ids.
2022-06-08 21:42:49 +02:00
Owen 86c16504d6 Dont resent entity on art update (#7887) 2022-06-08 21:25:15 +02:00
Jake Potrebic 29e918948a Fix structures issues/api (#7895) 2022-06-08 21:00:19 +02:00
Owen a93aa05bf8 Wrap NBTOps in RegistryOps (#7892) 2022-06-08 20:25:39 +02:00
Jake Potrebic e24a25097a correct patch description 2022-06-08 11:06:52 -07:00
Nassim Jahnke 897cc27c8b Remove no longer needed patch 2022-06-08 20:06:04 +02:00
Nassim Jahnke d1e1217a01 Only send empty chunk when player is dead
Currently not needed at all with chunk rewrites not yet updated, but considering it's only actually needed for dead players, no need to fuck up a chunk without the future applied patch
2022-06-08 19:50:57 +02:00
Noah van der Aa 44ccc15a30 Port Fix missing chunks due to integer overflow to 1.19 (#7891) 2022-06-08 19:39:07 +02:00
Nassim Jahnke 4c1b338e0f Remove level propagator patch for now 2022-06-08 19:33:07 +02:00
Space Walker bd134f856b Update Alternate Current patch (#7890) 2022-06-08 19:29:34 +02:00
Owen 222391f809 Check if is light status or above / isLightOn / starlight version fits (#7888) 2022-06-08 18:32:49 +02:00
Nassim Jahnke b3b63d3a02 Fix tests (again?) 2022-06-08 18:18:49 +02:00
Nassim Jahnke 57dfcdf4eb Reorder some patches 2022-06-08 18:13:02 +02:00
Owen a02874e014 Remove painting desync (#7886) 2022-06-08 17:45:54 +02:00
MiniDigger | Martin 8399e10c43 fix reobf issues around randomsource impls
prolly should be fixed in a mapping patch instead but I don't wanna
2022-06-08 17:43:25 +02:00
Nassim Jahnke 02804a49a2 Fix tests 2022-06-08 17:31:27 +02:00
Jake Potrebic 7a165c9c5d Add back fix swamp hut deadlock patch 2022-06-08 07:58:57 -07:00
Nassim Jahnke a6bc17b8bb IT COMPILES BOIS 2022-06-08 16:51:37 +02:00
Nassim Jahnke 913d2ae0b8 Fix 2022-06-08 16:46:39 +02:00
Jake Potrebic 9ab6893183 Add back Fix locateNearestStructure patch 2022-06-08 07:46:01 -07:00
Jake Potrebic d5216d8588 Add back Fix NotePlayEvent patch 2022-06-08 07:36:43 -07:00
Jake Potrebic af4b5ee4f0 add back removed kelp modifier patch 2022-06-08 07:29:32 -07:00
Nassim Jahnke 1d5b298c19 More compilation error fixes 2022-06-08 16:24:55 +02:00
Nassim Jahnke b561fd8b25 Compilation error fixes 2022-06-08 15:59:48 +02:00
Owen 7ece9454f7 Use biome source method to prevent loading chunks (#7885) 2022-06-08 15:57:04 +02:00
Noah van der Aa b1f5e70075 Moar 1.19 fixes (#7884) 2022-06-08 15:38:56 +02:00
Nassim Jahnke 55d7f562b8 More more more more more more more more more more more patches 2022-06-08 15:36:56 +02:00
Nassim Jahnke beab8a32c1 More more more more more more more more more more patches 2022-06-08 15:12:28 +02:00
Owen 2259098789 Misc fixes (#7883) 2022-06-08 15:03:33 +02:00
Nassim Jahnke 301cf577c2 More more more more more more more more more patches 2022-06-08 14:33:46 +02:00
MiniDigger | Martin 391e65f1af more misc compile fixes 2022-06-08 14:19:54 +02:00
MiniDigger | Martin 2f0b2b93df Add missing DataConverter and fix some imports
not fully sure those imports (or well, those classes being outside of the mc package) are right, but who cares 🤷
2022-06-08 14:01:30 +02:00
Nassim Jahnke d28b20944b Things, and Starlight (maybe) 2022-06-08 13:44:30 +02:00
Nassim Jahnke 8d5407b16f Things, and DataConverter (maybe) 2022-06-08 13:12:14 +02:00
Nassim Jahnke 82f712c096 More more more more more more more more patches 2022-06-08 12:40:44 +02:00
Nassim Jahnke f0e575f445 More more more more more more more patches 2022-06-08 12:20:57 +02:00
Nassim Jahnke 0e06c77264 More more more more more more patches 2022-06-08 11:31:06 +02:00
Noah van der Aa b464e02ba4 Misc. 1.19 fixes (#7881) 2022-06-08 10:45:59 +02:00
Jake Potrebic cc7979a6e0 bale o' patches 2022-06-08 01:00:56 -07:00
Jake Potrebic aabbfcdf8d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
4b08dbc5 PR-752: Make Leaves Waterlogged
de323fc9 Downgrade dependency version

CraftBukkit Changes:
c3f219edb Fix missing abstract in CraftLeaves
886e6d8c8 SPIGOT-7038: Setting title or subtitle to empty string causes the player to disconnect
6c302a5e3 Make Leaves Waterlogged
53b681be5 Downgrade dependency version

Spigot Changes:
ee737122 Fixed system messages shown in action bar
f343df82 SPIGOT-7036: Don't use CHAT message type
63a06049 SPIGOT-7035: Actionbar Sending in Main Chat
2022-06-08 00:49:02 -07:00
Jake Potrebic a1d0432c2c batch o' patches 2022-06-08 00:40:34 -07:00
Jake Potrebic 89c3c31af9 bag o' patches 2022-06-08 00:30:41 -07:00
Jake Potrebic feca8d248c bouquet o' patches 2022-06-07 23:25:32 -07:00
Jake Potrebic 2304bb3d6f bundle o' patches 2022-06-07 23:06:17 -07:00
Jake Potrebic 0745f97bb5 bunch o' patches 2022-06-07 22:46:52 -07:00
Jake Potrebic dc12a6e9fe a bunch more patches done 2022-06-07 22:02:19 -07:00
Jake Potrebic c3fc3de622 even moar patches 2022-06-07 21:39:43 -07:00
Jake Potrebic f04e64dfc6 moar patches 2022-06-07 21:22:42 -07:00
Spottedleaf f371b4e374 <3 jmp 2022-06-07 21:07:14 -07:00
Jake Potrebic c5db5371bf Fix more issues 2022-06-07 20:59:40 -07:00
Spottedleaf 7bbeef26ba i really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really hate jmp 2022-06-07 20:42:55 -07:00
Jake Potrebic d41a026555 few more server decompile fixes 2022-06-07 20:12:24 -07:00
Jake Potrebic 515da2fb1b update reobf-mappings-patch.tiny 2022-06-07 19:56:15 -07:00
Spottedleaf 26ea0402d8 i really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really love jmp 2022-06-07 19:25:49 -07:00
Spottedleaf a27b508dea i really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really love jmp 2022-06-07 18:34:11 -07:00
Jake Potrebic 68b585fba7 Fix cook speed patch 2022-06-07 18:19:35 -07:00
Jake Potrebic a16970ac1b Fix CanPlaceOn/CanDestroy API issues 2022-06-07 18:13:05 -07:00
Spottedleaf c515eb9a08 rebuild after rebase 2022-06-07 17:43:52 -07:00
Spottedleaf 32c195bd4f i love jmp 2022-06-07 17:43:03 -07:00
Spottedleaf 87ca0fa790 hate jmp and his gradle 2022-06-07 17:43:03 -07:00
Jake Potrebic 3a0b9487d4 temporary fixes for adventure chat 2022-06-07 16:49:14 -07:00
Owen1212055 58133bdfdf Update PreCreatureSpawnEvent patch 2022-06-07 23:54:21 +02:00
Jake Potrebic 4e13355af1 some server compile fixes 2022-06-07 14:48:14 -07:00
Nassim Jahnke addf9c9155 More more more more more patches 2022-06-07 23:45:11 +02:00
Jake Potrebic 7d7779a667 Fix even more errors 2022-06-07 14:15:14 -07:00
Jake Potrebic 3773770230 Fix more errors 2022-06-07 14:01:17 -07:00
Nassim Jahnke aac58bb772 More more more more patches 2022-06-07 22:45:38 +02:00
Jake Potrebic c321ca57db fix unmerged diff 2022-06-07 13:43:05 -07:00
Jake Potrebic 13fe88643e API now compiles successfully 2022-06-07 13:31:10 -07:00
Jake Potrebic 88f74d1bac Fix some api compilation errors 2022-06-07 13:23:21 -07:00
Nassim Jahnke cac4deb882 More more more patches 2022-06-07 22:12:48 +02:00
Nassim Jahnke 1669c6b097 More more patches 2022-06-07 21:55:39 +02:00
Nassim Jahnke 2710efc693 More patches 2022-06-07 21:15:06 +02:00
Nassim Jahnke a9c507310b First server patches 2022-06-07 20:43:28 +02:00
Nassim Jahnke 028e2d9f00 API patches 2022-06-07 19:20:30 +02:00
Nassim Jahnke 56e64243ed Patch cleanup 2022-06-07 19:03:07 +02:00
Nassim Jahnke cb05aa6b8b Prepare for 1.19 dev 2022-06-07 18:52:56 +02:00
Joseph Burton 276d830d22 Fix campfire walker in V1920 2022-06-06 17:51:12 -07:00
Jake Potrebic 4b27254e6a Fix treasure maps discovered settings (#7627) 2022-06-05 17:17:27 -07:00
Joseph Burton d8ef841114 [DataConverter] Fix generator options parsing 2022-06-05 22:49:42 +01:00
Jake Potrebic b3deb2589e Move some methods to RegionAccessor (#7635) 2022-06-05 13:51:44 -07:00
Nassim Jahnke 5befb5586e Updated Upstream (Bukkit/CraftBukkit) (#7875)
Upstream has released updates that appear 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:
6a039faf PR-745: Expose more information about advancements
52148c47 PR-749: Various javadoc improvements
23c2d841 PR-748: Remove permissible recalculation from Permission constructor

CraftBukkit Changes:
a59dc59e SPIGOT-7025: Use existing item in hand for ranged Drowned attack
e4cca0ca PR-1050: Expose more information about advancements
2022-06-05 10:43:06 +02:00
froobynooby 5b6397af2c Make leave messages for kicks the same as for quitting (#7874) 2022-06-05 08:43:35 +01:00
Jake Potrebic 071a4a2444 throw exception if worlds are created while being ticked (#7653) 2022-06-04 14:48:24 -07:00
Matt Artist 4d83ed0ae1 [ci skip] Changing the order of the rebase with autosquash command in the contributing.md (#6974) 2022-06-03 16:34:54 +01:00
Nassim Jahnke bed5cb2b81 Limit resolved selectors when enabled 2022-06-03 16:06:05 +02:00
Jake Potrebic fd069dd5af Remove incorrect throws javadoc in Team (#7869) 2022-06-02 22:05:42 -07:00
Jake Potrebic 8fc0999b09 Fix some nullability things (#7275) 2022-06-02 21:42:00 -07:00
Jake Potrebic a3ad720749 Remove ChatColor usages (#7543) 2022-06-02 21:26:56 -07:00
Shane Freeder 2033dba4fa Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
9d46b56e2 SPIGOT-7009: Stuck on "Loading terrain..." after disconnecting on respawn screen
2022-06-03 04:31:18 +01:00
Nassim Jahnke 80d5e71908 Updated Upstream (Bukkit)
Upstream has released updates that appear 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:
d565a710 SPIGOT-7027: Documentation for ItemMeta#getCustomModelData is incorrect
2022-06-02 20:47:09 +02:00
Nassim Jahnke 1d08ce8583 Disable book selector resolving by default 2022-06-02 20:40:24 +02:00
Owenandstonar96 b1ac25fdb8 Respect x-ray permission in World#refreshChunk (#7214)
Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
2022-06-02 03:08:51 +01:00
Emily 71fe3c64f0 Add numeric string completion suggestions as int suggestions (#6360) 2022-06-02 02:56:24 +01:00
Owen c5caee307e Prevent entity loading causing async lookups (#7553) 2022-06-02 02:35:57 +01:00
Jake Potrebic 2d17a50b8b Add translation keys to GameMode enum (#7081) 2022-06-01 18:30:29 -07:00
Owen 7602dd2014 Sanitize Sent BlockEntity NBT (#7010) 2022-06-02 02:27:36 +01:00
Jake Potrebic 00c6ae8419 Implement Translatable on CreativeCategory (#7587) 2022-06-01 17:07:10 -07:00
PureGero 04e1b070ef Check HAProxyMessage type is PROXY (#7864) 2022-06-01 22:58:22 +01:00
Jake Potrebic 78e6431008 Add default kick msg component (#6886) 2022-05-31 23:20:12 -07:00
Jake Potrebic 3f7111d4e1 Fix EntityEquipment and related javadocs (#7380) 2022-05-31 13:40:21 -07:00
Jake Potrebic f210f67c4a Update the rewriteForIde for new cb package version (#7242) 2022-05-30 22:18:45 -07:00
Jake Potrebic 6b035fd9a1 Update default vanilla command perms (#7386) 2022-05-30 21:57:32 -07:00
Jake Potrebic f7382f5f4b Remove unneeded UOE when copying biome sources (#7629) 2022-05-30 19:35:46 -07:00
Jake Potrebic c123915afc Fix FurnaceInventory for smokers and blast furnaces (#7249) 2022-05-30 19:03:18 -07:00
Jake Potrebic 9667181d1d Fix OfflinePlayer#getBedSpawnLocation (#7861) 2022-05-30 18:42:51 -07:00
Jason af3b3778f6 Update ForgeFlower (#7857) 2022-05-29 12:54:25 -07:00
Jake Potrebic 3f7fbe316d Fix cb's janky level name in WorldCreator (#7851) 2022-05-27 16:42:36 +01:00
Jake Potrebic b6a6544ad1 Provide ComponentSerializer services (#7527) 2022-05-26 12:12:14 -07:00
Jake Potrebic 182a609b85 Fix duplicate world keys via createWorld (#7614) 2022-05-26 10:59:53 -07:00
Jake Potrebic 79e07f34ac Fix addPassenger for Marker (#7762) 2022-05-25 18:00:47 -07:00
Jake Potrebic a90092e758 Updated Upstream (CraftBukkit/Spigot) (#7848)
Upstream has released updates that appear 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:
95d233dc SPIGOT-1807: PlayerTeleportEvent is called twice

Spigot Changes:
b0819150 PR-116: Slightly reduce item merge radius in Y-direction
ef2aa765 PR-119: Fix off-by-one and allow disabling max-tnt-per-tick option
2022-05-25 21:21:51 +02:00
PanSzelescik 31ccc579b5 Add support for Proxy Protocol (#7710) 2022-05-24 05:56:58 +01:00
rgnter d8108b5416 team color parameter may be null, causing NPE 2022-05-24 05:27:24 +01:00
Jake Potrebic 123cad5d3e Remove incorrect parent perm from debugstick.always (#7846) 2022-05-24 05:09:20 +01:00
Jake Potrebic fc1752ff15 Fix more upstream javadocs (#7837) 2022-05-20 09:57:07 -07:00
Noah van der Aa ed4e9163ef [ci-skip] Update repository and API urls (#7835) 2022-05-20 08:12:30 -07:00
Owen 9b492cff36 Deprecate set/doesBounce from Projectile (#7800) 2022-05-19 01:46:01 +01:00
Noah van der Aaandstonar96 ca623865b0 Hide ores with deepslate at Y=4 and below (#7792)
Fixes #7771

Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
2022-05-18 22:16:12 +02:00
HexedHero 7045f18469 Change link to screamingsandals 2022-05-18 09:25:43 +02:00
Nassim Jahnke 73bd35d076 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
218294b1 PR-743: Support setting individual Wither head targets

CraftBukkit Changes:
d48f2d1a PR-1047: Support setting individual Wither head targets
518f1bee SPIGOT-6948: Motion from Explosion after Respawn
f3c7a6ac SPIGOT-7019: Add yaw in World#getSpawnLocation
2022-05-17 11:51:46 +02:00
Peter Crawley 0116751101 List world on tile entity placement exception (#7709) 2022-05-16 11:38:14 +01:00
Jake Potrebic 8d1de8de8d deprecate old MaterialData api (#7585) 2022-05-15 19:33:03 -07:00
Jake Potrebic 9fd870db0b Fix cancelling PlayerItemFrameChangeEvent (#7761) 2022-05-09 17:22:57 -07:00
Jake Potrebic 5928327f90 Remove unneeded patch (#7806) 2022-05-09 20:22:43 +02:00
Nassim Jahnke 18f0f8d1ca Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
312281ea PR-742: Make World implement Keyed

CraftBukkit Changes:
2ac7fa7a SPIGOT-7014: getLootTable API should not persistently update loot table
7fdd7941 PR-1046: Make World implement Keyed
7bc728a6 PR-1045: Revert changes to persistence required checks

Spigot Changes:
b6d12d17 Rebuild patches
2022-05-09 11:03:07 +02:00
Jason Penilla 268476bba3 Fix whitespace error in Alternate Current patch 2022-05-08 09:25:34 -07:00
Spottedleaf e399754320 Do not accept invalid client settings 2022-05-07 14:59:20 -07:00
Jake Potrebic 87d2eb2d3b Fix door breaking difficulty defaults for vindicator (#7795) 2022-05-07 11:38:15 -07:00
Nassim Jahnke 1a17a83f8a Move redstone config changes to Eigencraft patch 2022-05-07 19:52:32 +02:00
Space Walker 7a6163b41d Add Alternate Current's redstone implementation as an alternative to Vanilla and Eigencraft's. (#7701) 2022-05-07 18:47:28 +02:00
Spottedleaf b831784aed Only log for passenger / vehicle world mismatch
Exception thrown may corrupt passenger/vehicle state
2022-05-07 08:48:29 -07:00
Pedro 8c9d98e100 Clean unused field for Configurable door breaking difficulty (#7793) 2022-05-07 06:57:41 +01:00
Pedro 2515bc4751 Improve configurable door difficulty (#6985) 2022-05-06 17:52:14 +02:00
Noah van der Aa 421938915c Don't tick markers (#7299) 2022-05-06 17:33:07 +02:00
Owen f3a8a0b953 FallingBlock auto expire setting (#7037) 2022-05-06 17:21:24 +02:00
u9g a117da6b26 Add PlayerStopUsingItemEvent (#7787) 2022-05-06 17:14:06 +02:00
HexedHero f6a69dedb9 Undeprecate getOfflinePlayer (#7773) 2022-05-06 14:21:58 +02:00
Noah van der Aa 2ab0258b5a Use mojang item ids for alternative item despawn rate (#6997) 2022-05-04 23:29:15 +01:00
Jake Potrebic e5da93a608 Deprecate duplicate SoundGroup API (#7509) 2022-04-30 13:44:22 -07:00
Jake Potrebic e564110f9e Couple fixes/improvements to PlayerSetSpawnEvent (#6754) 2022-04-30 13:24:47 -07:00
Shane Freeder 4166632333 Updated Upstream (Bukkit/CraftBukkit) (#7776) 2022-04-30 17:27:41 +01:00
Shane Freeder 608482d512 cleanup filtered sign text (#7777) 2022-04-30 16:49:57 +01:00
Jason Penilla 6f5e6c60d3 Use setMessage instead of arraycopy
setMessage affects messages, filteredMessage, and renderMessages, we were only doing an arraycopy for messages

fixes #7774
2022-04-28 20:08:08 -07:00
Joseph Burton ce059b4f99 Fix V1451 dataconverter stat types 2022-04-25 18:06:04 +02:00
Jake Potrebic d70ac039e8 fix powder snow cauldrons not turning to water (#7229) 2022-04-24 11:35:24 -07:00
Jake Potrebic 0bf7c95c8d Fix opening inv in PlayerRecipeBookClickEvent handler (#7552) 2022-04-23 18:48:00 -07:00
Jake Potrebic 4dc78ae8b9 Fix some team color docs and added hasColor (#7602) 2022-04-23 18:37:10 -07:00
Jake Potrebic 5b85ee37e2 Fire CauldronLevelChange on initial fill (#7678) 2022-04-23 13:40:34 -07:00
Jake Potrebic fbbc03a740 Add EntityDyeEvent and CollarColorable interface (#7625) 2022-04-23 12:38:42 -07:00
Jake Potrebic 47f43da438 Add missing javadoc deprecation msgs for PlayerProfile (#7688) 2022-04-23 07:40:37 -07:00
Nassim Jahnke caf4a6f0d6 Remove or replace a few dumb deprecations (#7760) 2022-04-23 11:25:30 +02:00
Jake Potrebic 16f224a79a Trigger bee_nest_destroyed trigger in the correct place (#7436) 2022-04-22 18:17:14 -07:00
Jake Potrebic 0f8aa4e6fd Fix NPE for BlockDataMeta#getBlockData (#7670) 2022-04-22 17:21:38 -07:00
Bjarne Koll ef6a1a5f99 Revert to old createProfile(UUID, String) logic (#7723) 2022-04-22 19:54:08 +01:00
Jason Penilla c449f6a1f7 Build updates
- update paperweight to 1.3.6
- update tiny-remapper to 0.8.2
2022-04-21 19:27:56 -07:00
Jason 567fce6c76 Don't apply previous potion when item is potion (fixes #7756) (#7757) 2022-04-21 17:07:56 -07:00
petersv5andPeter Svensson 76ed156764 Grant temporary immunity from EAR to moving entities (Fixes #7637) (#7644)
Co-authored-by: Peter Svensson <petersv@psv.nu>
2022-04-20 10:34:00 +01:00
Owen 873bfa6000 Remove World#refreshChunk deprecation (#7684) 2022-04-20 10:28:53 +01:00
Shane Freeder 4ecc338e09 WorldCreator#keepSpawnLoaded (#7673) 2022-04-20 10:26:09 +01:00
Shane Freeder c7d4c0188e Ignore invalid jars inside of the updates folder (Fixes #7751)
This really needs a deeper look here, the way updates are handled is
fairly immature, but, this wasn't ever intended to be a large scale thing

Ideally, imho, we'd collect the list of update files into some form of Map,
that way we just have a reference of Name > File refs, and can filter out
cases where there are two versions of a plugin in there and warn expectidely,
but, that creates some complications, you would need to fall back to a dir
scan in the case of a plugin calling loadPlugin, but, it would at least
give us more defined behavior, as well as improve performance here vs
repeatidely trying to deserialise the plugin.yml defs for every file
in there on every load
2022-04-20 10:11:35 +01:00
Xemor c642d25f63 Improve update folder behavior (#7687)
Closes #6570
2022-04-18 18:12:39 +02:00
Noah van der Aa 86fb3d201d Don't send itemmeta for books with the hide option enabled (#7734) 2022-04-18 12:23:37 +02:00
HexedHero c66b0f99f2 Add pre-unbreaking amount to PlayerItemDamageEvent (#7724) 2022-04-18 11:51:45 +02:00
Owen 8bfb1d22f8 Pass ServerLevel for gamerule callbacks (#7668) 2022-04-18 11:46:21 +02:00
Nassim Jahnke 6b9f7a073e Don't fire worldborder events for virtual borders (#7749)
Fixes #7748
2022-04-18 11:26:18 +02:00
Jake Potrebic af943641e2 Fix slime spawners not spawning outside slime chunks (#7741) 2022-04-16 11:32:20 -07:00
Nassim Jahnke 1cfd363d32 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
fc460d1b PR-735: Add Villager#zombify
c8c8331e PR-690: Add method to read ItemStack input
62845f2f SPIGOT-6829: Add per-player world border API

CraftBukkit Changes:
a459f4d4 PR-1033: Add Villager#zombify
d65d1430 PR-975: Add method to read ItemStack input
b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil
6c308e1b SPIGOT-6829: Add per-player world border API

Spigot Changes:
42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
2022-04-16 10:29:50 +02:00
Pedro c6e631aacb Use username instead of display name in PlayerList#getPlayerStats (#7740) 2022-04-15 15:23:10 -07:00
Jason Penilla b8fa41ecdf [ci skip] Remove Mojang repo from test-plugin 2022-04-13 20:16:14 -07:00
Jason a9f252e56a Replace third party repos with Paper repo (#7733)
we now mirror Fabric, Forge, and Mojang
2022-04-13 19:58:48 -07:00
Shane Freeder d4a712d957 [CI-SKIP] Remove unused import from last patch 2022-04-13 09:15:28 +01:00
Shane Freeder a9ee1046a5 Prevent tile entity copies loading chunks 2022-04-13 08:27:16 +01:00
Jason Penilla e42d683d75 Fix StructureGrowEvent species for RED_MUSHROOM 2022-04-12 16:40:30 -07:00
Owen f8e8d6c3cd Strip enderpearl owners when they are no longer ticked (#7559) 2022-04-08 01:52:25 +01:00
Jason 4322c05f02 Use patched spigot decompiler (#7706) 2022-04-07 09:36:19 -07:00
Nassim Jahnke 2f16393ad9 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
2542945e Remove broken quickMoveStack implementation
5631e8bf SPIGOT-6973: Setting biome calls String#intern for every biome placed
2022-04-07 10:56:36 +02:00
Etil 11e0dcdf86 Fix NBT pieces overriding a block entity during worldgen deadlock (#7692) 2022-04-07 10:42:20 +02:00
Pedro 29144573e6 Allow seting custom podium location for ender dragon (#7695) 2022-04-07 10:31:30 +02:00
Jason Penilla 62dcff3e8d Update actions 2022-04-05 10:44:21 -07:00
Jason Penilla 92426e39be Update Gradle wrapper 2022-04-05 10:37:45 -07:00
Jason Penilla 820e9ca70b Update decompiler & param mappings 2022-04-05 10:37:36 -07:00
Jake Potrebic 87e11bf7fd Cache resource keys instead of trying to create them (#7643) 2022-04-02 18:10:13 -07:00
Nassim Jahnke ea2c81e4b9 Fix lectern quick move 2022-04-02 09:15:39 +02:00
Peter Crawley 443c5062c1 Fix Nullability Annotations for PrepareItemEnchantEvent (#7681) 2022-04-01 20:14:56 -07:00
Jake Potrebic 04c7b16bde Undeprecate Material#isLegacy (#7679) 2022-03-31 09:13:19 -07:00
Spottedleaf 7bf9446d9e Add per player chunk loading limits
Configurable under "settings.chunk-loading.player-max-chunk-load-rate",
defaults to -1. This commit also changes the chunk loading to be
distributed equally for all players, rather than distance based. This is
to ensure players flying around do not take priority over everyone else.
The exception to this new rule is the min-load-radius, which still has
priority over everything else.
2022-03-31 06:33:13 -07:00
Jake Potrebic 7f47b9b7f8 Remove KeyedObject interface (#7680) 2022-03-30 13:28:38 -07:00
Jake Potrebic d3c102373f fix player loottables running when mob loot gamerule is false (#7651) 2022-03-29 13:15:26 -07:00
Owen fa68bb1e81 Fix entity position desync for hanging entities (#7659) 2022-03-29 10:42:46 +02:00
Jake Potrebic 7fa8870043 Updated Upstream (Bukkit/CraftBukkit) (#7672)
Upstream has released updates that appear 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:
7902647a PR-737: Update WorldCreator#generatorSettings docs
67556a50 PR-736: Update README

CraftBukkit Changes:
10922194 Java 18 support
d53c4fb6 PR-1039: Use correct ops in GeneratorSettings
a567e4ae PR-1038: Removed the no longer needed getChunkUnchecked method from ChunkProviderServer.
4ac8fcce SPIGOT-6980: Since 1.18.2, World#isChunkLoaded returned false for chunks that have just been loaded (e.g. inside ChunkLoadEvent).
e6cc7c70 PR-1035: Update README
3ec79a27 SPIGOT-5140: Call EntityChangeBlockEvent when a ChorusFlower is destroyed by a projectile
2022-03-29 10:32:18 +02:00
Jason e2f743d914 Fix PalettedContainer synchronization (#7663) 2022-03-27 10:51:39 -07:00
SoSeDiK e7d928a8e1 Fix EntityChangeBlockEvent#getBlockData for when sheep eats grass block (#7646) 2022-03-21 11:43:52 -07:00
Jake Potrebic ab666a48ee Deprecating remaining blockkey methods (#7638) 2022-03-21 11:06:42 -07:00
Jake Potrebic a939d6e08e Fix generator settings string for flat-type worlds (#7568) 2022-03-21 11:06:26 -07:00
Owen 993f8288fa Add TameableDeathMessageEvent (#5392) 2022-03-20 00:50:33 +00:00
Owen a686ff5670 Add more missing entity API (#7592) 2022-03-19 15:30:16 +01:00
Bjarne Koll 7b46444bea Properly create profiles with custom name/uuid (#7558) 2022-03-19 14:39:38 +01:00
Shane Freeder 5eb61dd432 Buffer OOB setBlock calls
lets debug mode throw a trace in order to potentially see where
such calls are cascading from easier, but, generally, if you see one setBlock
call, you're gonna see more, and this just potentially causes a flood of logs
which can cause issues for slower terminals, etc.

We can limit the flood by just allowing one for a single gen region,
we'll also only gen a trace for the first one, I see no real pressing need
to generate more, given that that would *massively* negate this patch otherwise
2022-03-19 12:35:56 +00:00
Jake Potrebic 855637f967 Updated Upstream (CraftBukkit) (#7624)
Upstream has released updates that appear 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:
e9f972d6 Improve CreativeCategory conversion
c2698249 PR-1034: Fix exception on init of CraftCreativeCategory
f48739ca Add tests for material creative categories
2022-03-19 10:33:49 +01:00
Jason Penilla bc68ee09be Remove redundant GameProfileCache diff 2022-03-17 21:21:01 -07:00
Jason Penilla 319d5fa29f Fix state locking for getTopMRUProfiles & getProfileIfCached
Also add missing last access update in getProfileIfCached
2022-03-17 21:21:01 -07:00
Philip Kelley 2eeca6f108 Fix world saving in unloadWorld 2022-03-17 13:24:02 +01:00
Jason 8897cea0b0 Add enchantWithLevels API (#7615) 2022-03-17 09:51:43 +01:00
Jake Potrebic b8c90d2428 Added method to check snapshot state of TileStates (#7325) 2022-03-16 18:28:06 -07:00
Jake Potrebic 8788bf7441 fix datapacks not being able to modify nether/end (#7588) 2022-03-16 17:54:52 -07:00
Jason f0d0078deb Add debug for invalid GameProfiles on skull blocks/items (#7512) 2022-03-16 13:34:09 -07:00
Jake Potrebic 1c5f8b0fce Updated Upstream (Bukkit/CraftBukkit) (#7604)
Upstream has released updates that appear 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:
33a2b476 PR-734: Make PlayerInventory#getItem Nullable

CraftBukkit Changes:
953d3ddc SPIGOT-3034: PlayerKickEvent.setLeaveMessage(String) doesn't actually do anything
2c47af0c SPIGOT-6963: CraftMetaBlockState#getBlockState applied TileEntity ids without the minecraft namespace prefix.
2022-03-16 16:57:51 +01:00
Nassim Jahnke f35a0ceb93 Remove Java version check once and for all (#7612)
Closes #7611
2022-03-16 14:10:32 +01:00
Bjarne Koll 2d3e8f7729 Properly lookup random-ticked precipitation blocks (#7606) 2022-03-15 19:44:25 +01:00
Jason 0ca80c7ee8 Add getComputedBiome API (#5668) 2022-03-15 11:38:36 -07:00
Spottedleaf a5be178ac3 Use correct toX/Y/Z in player move packet handling 2022-03-14 12:44:36 -07:00
Owen c8e49cc53e Add get/set wait time for fish hooks. (#5595) 2022-03-13 22:33:01 +00:00
Noah van der Aa 1ce3555ada [ci-skip] Fix typo in feature request issue template (#7593) 2022-03-13 21:41:05 +00:00
Jason Penilla b65b48fd31 [ci skip] Update gradle wrapper 2022-03-13 14:25:04 -07:00
Nassim Jahnke 1358d1e914 Updated Upstream (CraftBukkit/Spigot) (#7580)
Upstream has released updates that appear 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:
881e06e5 PR-725: Add Item Unlimited Lifetime APIs

CraftBukkit Changes:
74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall
64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn
2d760831 Increase outdated build delay
9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel
fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent
59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta

Spigot Changes:
ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue
e19ddabd PR-1011: Add Item Unlimited Lifetime APIs
34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
2022-03-13 08:47:54 +01:00
Jason Penilla ab03538fa1 Fix colors in some console messages 2022-03-12 18:47:04 -07:00
Jake Potrebic 87927e176c Fix CreativeCategory API (#7586) 2022-03-12 15:32:42 -08:00
Jason bfa33d955c Various improvements to console color formatting (#7560) 2022-03-12 14:31:21 -07:00
Owen dc96bba6de Ensure the item sent isn't air (#7584) 2022-03-12 21:34:03 +01:00
Spottedleaf aab1f8a74e Fix swamp hut cat generation deadlock
The worldgen thread will attempt to get structure references
via the world's getChunkAt method, which is fine if the gen is
not cancelled - but if the chunk was unloaded, the call will block
indefinitely. Instead of using the world state, we use the already
supplied generatoraccess which will always have the chunk available.

Missed patch from tuinity merge
2022-03-12 06:32:31 -08:00
Owen ea1efef116 Remove Patches (#7541) 2022-03-11 21:13:46 +01:00
Owen 1790528a61 More projectile API (#5731) 2022-03-11 17:37:08 +01:00
Nassim Jahnke d714682f8f Add more entity api (#7564) 2022-03-11 15:24:45 +01:00
Owen 657d163740 Prevent despawned navigators being readded (#7574) 2022-03-11 02:39:11 +00:00
sulu5890 b55ba19ad3 Update README for new docs (#7561) 2022-03-09 10:10:59 +01:00
Noah van der Aa 4423e1221a Update docs link in paper.yml (#7562) 2022-03-09 10:10:53 +01:00
froobynooby 7a21333019 Fix setting the view distance to 32 (#7503) 2022-03-09 10:09:20 +01:00
Max Lee 718fab1f6b Add CPU name and JVM vendor info in timings (#7490) 2022-03-09 10:06:58 +01:00
Riley Park e0b3f3f8cb Adventure 4.10.1 2022-03-07 14:39:52 -08:00
Nassim Jahnke c34fb0942a Add ghast api (#7554) 2022-03-06 22:20:38 +01:00
Jake Potrebic d9bf5e740b Add method to set noclip on arrows (#7263) 2022-03-06 22:19:08 +01:00
Nassim Jahnke 7b9c30fb82 Fix scoreboard objective name length limit 2022-03-06 16:32:33 +01:00
Nassim Jahnke a36d7f6427 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
808cb7ca PR-1023: Improve consistency of tag API
2022-03-06 09:08:26 +01:00
Spottedleaf 1e12cf8db6 Add more to the save fixes
- Set forceTicks to true, so that player packets are always
  processed so that the main process queue can be drained
2022-03-05 17:36:57 -08:00
Spottedleaf 196271de4e Fix save problems on shutdown
- Save level.dat first, in case the shutdown is killed later
- Force run minecraftserver tasks and the chunk source tasks
  while waiting for the chunk system to empty, as there's simply
  too much trash that could prevent them from executing during
  the chunk source tick (i.e "time left in tick" logic).
2022-03-05 17:29:47 -08:00
Jake Potrebic 6564f70f4c Fix cancelling ProjectileHitEvent for piercing arrows (#7492) 2022-03-05 21:45:57 +01:00
Owen 935151388a Fix handling message in PlayerHandshakeEvent (#7542) 2022-03-05 20:20:52 +00:00
Pheotis f9b05cc3f1 Expose furnace minecart push property. (#7548) 2022-03-05 21:15:24 +01:00
Spottedleaf 1d7a6a0732 Add missing glow_item_frame walkers
Needs one for ItemStack and Entity. It looks like I missed
the entity one because Mojang defined it as being simple,
which it certainly isn't (they "missed" it too).
2022-03-04 20:57:59 -08:00
Riley Park 42a9c3789d Move Adventure patch up 2022-03-04 13:45:31 -08:00
Jason 6d4784392d replace bungeecord-chat dependency with deprecated version (#7539) 2022-03-04 13:53:36 -07:00
Nassim Jahnke b6616c8a18 Fix falling block spawn methods
For some reason Spigot broke both behavior and the method as a whole
2022-03-04 20:47:30 +01:00
JOO200 0ee6ddaf33 Add javadoc linking for adventure-text-minimessage (#7538) 2022-03-04 11:27:26 -07:00
Noah van der Aa 63aa4d3319 Clarify exception messages for invalid view distances (#7510) 2022-03-04 11:23:28 +01:00
Shane Freeder b9f26bb1e9 Add printPaperVersion task 2022-03-04 09:41:03 +00:00
Nassim Jahnke 719daa8bbf Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
4ed5af5e SPIGOT-6956: Reduce differences caused by setKeepSpawnInMemory(false)
21fe78aa SPIGOT-6957: Bad default value for WorldCreator#generatorSettings
ce373be6 PR-1022: Fix get HighestBlockAt in chunk snapshot
2022-03-04 09:33:13 +01:00
Jason c09365aeac Fix deadlock on watchdog crash (#7535) 2022-03-04 09:26:22 +01:00
Jake Potrebic 15b6b3db2c Add StructuresLocateEvent as replacement for StructureLocateEvent (#7524) 2022-03-04 09:09:43 +01:00
Jason Penilla 753bf2c103 Update paperweight to 1.3.5 2022-03-03 19:06:19 -07:00
Jake Potrebic d33cdcf2e6 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
e25c6a75 PR-638: Add CreativeCategory API for Materials

CraftBukkit Changes:
86292d3e0 PR-876: Add CreativeCategory API for Materials
2022-03-03 10:21:48 -08:00
Jason Penilla 90788a556c clean up prepareTickingChunk diff 2022-03-02 11:24:32 -07:00
Shane Freeder 12d89fe5ae Revert chunk postprocessing back to 1.18.1 logic 2022-03-02 18:08:10 +00:00
Shane Freeder c6ea84c7fa Drop unneeded desync patch
spigot no longer even fires the event for this case, so, this may
actually be a regression, not too sure here, but, as-is this patch
is dead
2022-03-02 09:44:22 +00:00
Nassim Jahnke d3caeeb6c2 Fix early registry access in xray patch 2022-03-02 10:28:32 +01:00
Nassim Jahnke b1afebbd52 Force close world loading screen on join (#7529)
Fixes infinite loading screens for dead players due to async chunk loading and player chunk loading patches and prevents players from missing messages and similar if chunk loading is slow
2022-03-02 10:21:30 +01:00
Jake Potrebic 178802ab94 Fix various 1.18.2 update issues (#7523) 2022-03-01 14:40:34 -08:00
Jake Potrebic 14add2b049 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
6e755020a SPIGOT-6952: Tag#isTagged throws NullPointerException in 1.18.2
2022-03-01 14:05:10 -08:00
Jason Penilla 0859f59469 1_18_R2 2022-03-01 00:10:23 -07:00
Jason PenillaandJake Potrebic ab8a139612 Configure javadoc overview and doc-files copying
closes #7462

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-02-28 22:52:40 -07:00
Jason Penilla 126ca7376e Add TODO for leaf 2022-02-28 22:52:40 -07:00
Jason Penilla b9037a5c7d fix issue resulting from kenny's apatch addiction 2022-02-28 22:52:40 -07:00
Jake Potrebic 146ac7bcd6 address failing mob goals test 2022-02-28 22:52:40 -07:00
Jake Potrebic cc45a355a4 move decompile fixes to start of git history 2022-02-28 22:52:39 -07:00
Jake Potrebic 5071d50207 clean up view distance api diff 2022-02-28 22:52:39 -07:00
Jason Penilla fd7432601d update reobf-mappings-patch.tiny 2022-02-28 22:52:39 -07:00
Jake Potrebic 3526f22211 move patch relying on TraceUtil to after its creation 2022-02-28 22:52:39 -07:00
Jake Potrebic fbe43d6a1d clean up patch changes 2022-02-28 22:52:39 -07:00
Spottedleaf c6fc144ba0 Fix unload stall
Also added required tickets that should not be removed during
shutdown
2022-02-28 22:52:39 -07:00
Jason Penilla 37436ac61a Move comment up 2022-02-28 22:52:38 -07:00
Riley Park 9a73213f88 Adventure 4.10.0 2022-02-28 22:52:38 -07:00
Jake Potrebic 9da236fe6a re-add config for stronghold seed patch 2022-02-28 22:52:38 -07:00
Jake Potrebic 490517d31e fixed flat bedrock patch 2022-02-28 22:52:38 -07:00
Nassim Jahnke c98499113f Fix mc dev fix by removing it 2022-02-28 22:52:38 -07:00
Nassim Jahnke 02e2402161 Update README 2022-02-28 22:52:37 -07:00
Nassim Jahnke 706c98a603 Update Datafixer 2022-02-28 22:52:37 -07:00
Jake Potrebic f4eb08a477 Readd 'Fix entity type tags suggestions in selectors' 2022-02-28 22:52:37 -07:00
Jake Potrebic 19f9520b3a 1.18.2 compiles successfuly now 2022-02-28 22:52:37 -07:00
Jake Potrebic 60af9b0cb3 moar fixes 2022-02-28 22:52:37 -07:00
Nassim Jahnke 12efc3fcf5 Fixes 2022-02-28 22:52:36 -07:00
Nassim Jahnke c2e2281f29 Initial 1.18 update 2022-02-28 22:52:35 -07:00
Shane Freeder 30cb7d0407 ignore excessive vel for Minecarts (Fixes #7515) 2022-02-28 15:31:41 +00:00
Spottedleaf 7f65b0b589 Add DataConverter to StructureCheck, for structure lookups
Mojang added a partial conversion here to quickly check for
structures, which bypasses the chunk system. So we need a
hook here.
2022-02-25 08:46:35 -08:00
Jake Potrebic bfa50ad5b3 Custom Potion Mixes (#6744) 2022-02-22 19:09:15 -08:00
Jake Potrebic 2a55e35124 Option to have default CustomSpawners in custom worlds (#7493) 2022-02-23 02:44:06 +00:00
Owen b6dad9c903 Fix desync on teleporting entity on first tick (#7183) 2022-02-23 02:20:29 +00:00
Noah van der Aa 04a337af59 Add some missing deprecations to the adventure patch (#7500) 2022-02-23 02:11:52 +00:00
Jake Potrebic 501834e57a Fix custom inventory holders (#6199) 2022-02-22 15:00:45 -08:00
Spottedleaf db811631ae Execute mid tick tasks during tile entity ticking
It was never done here in the past since the old TE management
system was barely functional, and could not handle chunk loading
remotely well
2022-02-22 14:42:00 -08:00
Spottedleaf 854f3d35c1 Put world into worldlist before initing the world
Some parts of legacy conversion will need the overworld
to get the legacy structure data storage
2022-02-22 14:28:34 -08:00
Spottedleaf cdb893bb9e Add mid-tick task execution to block ticking
Dropped from the ticking block list rewrite
2022-02-22 14:24:28 -08:00
Jason Penilla 9cab01ed1d [ci skip] Update Gradle wrapper to 7.4 2022-02-21 13:44:17 -07:00
Jake Potrebic b757019dc5 Add missing block data mins and maxes (#6790) 2022-02-20 13:58:31 -08:00
Jake Potrebic 392acfdaa4 Configurable sculk sensor listener range (#6443) 2022-02-20 13:44:14 -08:00
Jake Potrebic 36a1650dbf Furnace RecipesUsed API (#7399) 2022-02-19 14:00:33 -08:00
Nassim Jahnke 7b8e0c3acf Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
6fac07eb SPIGOT-6935: Make Arrow color nullable
abbc5c55 PR-730: Added a checkstyle rule to check for missing package declarations.
97157b12 PR-730: Added missing declaration of the org.bukkit.profile package.
9dcee1dc PR-727: Fix typo in StriderTemperatureChangeEvent javadocs

CraftBukkit Changes:
1e87776a SPIGOT-6935: Make Arrow color nullable
2022-02-19 13:50:20 +01:00
Jake Potrebic 5bb4549f48 Fix entity armor not showing on death animation (#7355) 2022-02-18 10:16:41 -08:00
Spottedleaf 286bd1bfb5 1.18 misc performance dev branch (#7368)
- Port player chunk loader patch
Makes the chunk system act as it did in 1.17, no additional tickets (and thus logic) to make a chunk ticking.
Adds simulation distance API, deprecates old no-tick method.
- More collision optimisations
Ancient patch from tuinity that never could be pushed to master.
- Fix Optimise ArraySetSorted#removeIf patch
- Execute chunk tasks fairly for worlds while waiting for next tick
- Port Replace ticket level propagator
2022-02-18 09:44:46 -08:00
Bjarne Koll b173c3ee2c Use access transformers for player profile API (#7468) 2022-02-18 09:30:37 -08:00
Jake Potrebic f5b9e07a2a Add GameEvent tags (#6439) 2022-02-17 18:42:22 -08:00
Shane Freeder 2a4aef3d97 Mark ChatRender#render as ApiStatus.Override 2022-02-18 01:32:48 +00:00
Nassim Jahnke c50fc3a026 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7480)
Upstream has released updates that appear 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:
8d818032 PR-723: Add Furnace#getRecipesUsed
d7b5a313 PR-726: Add Particle dataTypes to javadocs
72fe8b71 PR-724: Add PDC to World

CraftBukkit Changes:
c0326c28 PR-1009: Add Furnace#getRecipesUsed
cc5ddd79 PR-1010: Add PDC to World
6a54e5d3 PR-1012: Always save as skull owner and not as internal data

Spigot Changes:
699290cd Rebuild patches
2022-02-15 11:30:58 +01:00
Jason Penilla a8f2d67491 - properly fix IllegalArgumentException in /paper mobcaps command
- fix IllegalArgumentException in `/paper playermobcaps` command
- add missing Validate calls to CraftServer#getSpawnLimit(SpawnCategory)
2022-02-12 12:50:27 -07:00
Noah van der Aa e6898ff61e Fix IllegalArgumentException for /paper mobcaps command (#7472) 2022-02-12 19:02:14 +00:00
Nassim Jahnke 92c777d393 Fix PlayerProfile BukkitObject serialization, deprecate setName and setId for removal (#7471)
Having a modifiable hash here is a bit flawed and most developers should never need these methods
2022-02-12 19:29:41 +01:00
Noah van der Aa 9567753460 Don't load plugins prefixed with a dot (#7392) 2022-02-12 15:03:51 +01:00
Jake Potrebic 3d91ecac51 Fix cancelled snow bucket placement (#6751) 2022-02-12 14:56:27 +01:00
Jake Potrebic 2c4a5892ec Fix issues with LimitedRegion (#7343)
These issues stemmed from Paper integrating new upstream API
that was duplicated by a lot of existing Paper API
2022-02-12 14:51:13 +01:00
Jake Potrebic 2c8d48c555 Make Panda implement Sittable (#7414) 2022-02-12 14:36:41 +01:00
IzzelAliz 4a745f9163 Optimize Util#sequence (#7115)
Basically the same diff is already in Vanilla 22w06a, so might as well merge this now/have a conflict to know to remove the stream they added
2022-02-12 14:28:41 +01:00
Nassim Jahnke 26734e83b0 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7454)
* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
8085edde SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
04c7e13c PR-719: Add Player Profile API
71564210 SPIGOT-6910: Add BlockDamageAbortEvent

CraftBukkit Changes:
febaa1c6 SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
9dafd109 Don't send updates over large distances
bdac46b0 SPIGOT-6782: EntityPortalEvent should not destroy entity when setTo() uses same world as getFrom()
8f361ece PR-1002: Add Player Profile API
911875d4 Increase outdated build delay
e5f8a767 SPIGOT-6917: Use main scoreboard for /trigger
a672a531 Clean up callBlockDamageEvent
8e1bdeef SPIGOT-6910: Add BlockDamageAbortEvent

Spigot Changes:
6edb62f3 Rebuild patches
7fbc6a1e Rebuild patches

* Updated Upstream (CraftBukkit)

Upstream has released updates that appear 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:
de951355 SPIGOT-6927: Fix default value of spawn-limits in Worlds
2022-02-12 14:20:33 +01:00
Bjarne Koll 00da0989f3 Log exceptions thrown during chat processing (#7467) 2022-02-11 19:42:12 -07:00
Nassim JahnkeandJason Penilla 0cc2503b88 Implement World#regenerateChunk (#7425)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2022-02-05 20:47:11 +01:00
PureGero 6df46412cf Use destination world when preloading spawn chunk (#7441) 2022-02-04 09:30:13 +01:00
Jason 46ed080d3b fix portal linking in upgraded chunks (fixes #7419) (#7438) 2022-02-03 12:28:39 -07:00
Jason 9940bcabcc API for creating command sender which forwards feedback (#7432) 2022-02-02 19:44:57 -07:00
Nassim Jahnke f23c03955b Fix infinite recursion in spawnCategoryForChunk/Position 2022-02-02 21:57:11 +01:00
Spottedleaf 2ec04e0938 Use correct headerLocation for regionfile initialisation
If the regionfile cannot be recalculated (i.e entity/poi type),
then attempts to remove the invalid entry would blow up
2022-02-02 06:02:16 -08:00
Shane Freeder 2121aed33d Rebuild patches
Cos, you know, pushing the correct changes the first time woulda been
overrated
2022-02-01 13:06:41 +00:00
Shane Freeder f79c0daece Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
5c21a63f PR-717: Add PlayerHideEntityEvent and PlayerShowEntityEvent

CraftBukkit Changes:
c26a7b54d PR-1000: Add PlayerHideEntityEvent and PlayerShowEntityEvent
2022-02-01 11:35:36 +00:00
Shane Freeder 17eb8845f3 Use a CHM for StructureTemplate.Pallete cache
fixes a CME due to this collection being shared across threads

This patch was in 1.16.5 for a good while and noticed somebody
getting impacted by the same thing
2022-02-01 09:47:46 +00:00
Jake Potrebic 3109dd87ee Updated Upstream (Bukkit/CraftBukkit) (#7428) 2022-01-31 15:56:54 -08:00
Jason Penilla 41263d9231 [ci skip] Update paperweight to 1.3.4 2022-01-27 13:19:45 -07:00
Noah van der Aa 2e99e5e677 Updated Upstream (Bukkit/CraftBukkit) (#7411)
Upstream has released updates that appear 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:
af88996a SPIGOT-6890: Add repair cost amount in AnvilInventory
bc7bd363 PR-716: Fix scheduler javadocs (previously, the <b> tag broke the rendering)
6db1ab70 Improve item cooldown JavaDocs

CraftBukkit Changes:
13670b44 SPIGOT-6890: Add repair cost amount in AnvilInventory
0d109e86 PR-999: Prevent non-item cooldowns
2022-01-27 15:35:36 +01:00
Jason Penilla ca523abbdd [ci skip] Fix param mismatch from last commit 2022-01-25 20:53:18 -07:00
Jason Penilla f7dbd062e7 [ci skip] Update parameter mappings 2022-01-25 20:44:24 -07:00
Jason Penilla b164899084 Update tiny-remapper 2022-01-25 20:22:49 -07:00
Jake Potrebic 9490475b02 Add STRUCTURE_TYPE registry entry (#6400) 2022-01-23 11:12:42 -08:00
Jake Potrebic 7978121c7c More PotionEffectType API (#5737) 2022-01-23 10:42:38 -08:00
Jake Potrebic f6c7d536a8 Add configurable stronghold seed (#7334) 2022-01-23 15:26:22 +01:00
Owen a058ac05d8 Dolphin API (#7102) 2022-01-23 14:55:11 +01:00
Owen 9a1930867b Lock Frozen Ticks API (#7207) 2022-01-23 14:35:07 +01:00
MrPowerGamerBRandJake Potrebic 0a9602c412 [ci skip] Fix multiple ItemStack array nullability mistakes (#7055)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2022-01-22 17:40:57 -08:00
Jake Potrebic 512995c2a5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7359) 2022-01-22 16:59:56 -08:00
Kezz 60e46abb00 Fix NotePlayEvent (#5180) 2022-01-21 23:42:10 -08:00
Jake Potrebic dcca6cb1be Make tag presets unmodifiable (#7378) 2022-01-21 15:07:35 -08:00
JanandJan Boerman feb72b8ae1 Update ASM EventExecutor generator patch to respect event handler return types. Fixes #7311 (#7317)
Co-authored-by: Jan Boerman <janboerman95@gmail.com>
2022-01-20 12:54:57 -07:00
Brody Beckwith 2a306f513c Add Multi Block Change API (#7333) 2022-01-20 18:50:50 +01:00
Riley Park 128691a963 Deprecate log4j logger method in Plugin 2022-01-19 18:39:27 -08:00
Noah van der Aa c904da6eab Offset spigot item optimizations instead of Mojang's (#6290) 2022-01-19 11:18:24 -08:00
Jake Potrebic 45338214b0 Fix setSpawnedItem from 1.18 update (#7328) 2022-01-18 19:09:04 -08:00
Jake Potrebic 6b526f9645 Fix setting unplaced furnace cook speed multiplier (#7327) 2022-01-18 11:33:37 -08:00
Jason 7c3893c0c4 Warn on strange @EventHandler return types (#7372) 2022-01-18 11:47:54 -07:00
Noah van der Aa f1db23e47f [ci skip] Fix incorrect javadoc for Mob pathfinding API (#6842) 2022-01-17 23:26:11 -08:00
Nassim Jahnke 919e59494c Push illegal char kick to main thread (#7363) 2022-01-17 23:16:36 -08:00
Jake Potrebic 048e030914 Change default for hoppers ignoring occluded blocks (#7342) 2022-01-17 23:11:11 -08:00
HexedHero 17e1f65669 Fix Lure infinite loop (#6850) 2022-01-17 22:54:31 -08:00
Camotoy 60b7d5ee0c Add unsupported field to disable username validation (#7350)
* Add unsupported field to disable username validation

* Add unsupported field to disable username validation
2022-01-17 19:52:47 -08:00
Owen 6d67504ab5 Expand Panda API (#7061) 2022-01-17 15:23:44 -08:00
Jake Potrebic 99cf01f993 Fix and deprecate ItemStack#getI18NDisplayName (#7358) 2022-01-16 16:53:26 -08:00
Jake Potrebic 5c74af2efa Fix NPE for bucket empty result stack being null (#7354) 2022-01-16 12:08:24 -08:00
Jake Potrebic 36ce000793 Fix xp reward for baby zombies (#7353) 2022-01-16 20:15:16 +01:00
PureGero 78999b5778 Remove redundant getRemoteAddress that can cause an NPE (#7331) 2022-01-13 19:56:45 -08:00
Jake Potrebic 6663747b89 Some block state hunks were in the wrong patch (#7308) 2022-01-13 11:31:48 -08:00
Jake Potrebic 0c64d401aa Updated Upstream (Bukkit/CraftBukkit) (#7323) 2022-01-12 13:39:20 -08:00
John ebaca20edd Added getHostname to AsyncPlayerPreLoginEvent (#6656) 2022-01-12 09:21:29 -08:00
Nassim Jahnke cb198ff936 Fix chunk range int overflow 2022-01-11 19:34:25 +01:00
Shane Freeder 6f0762c012 Fix defaults for slime-spawn-height in paper config
do note that if you happened to grab the previous build in the few minutes it
was alive, you'll want to reset your settings here

also, i
2022-01-11 02:55:05 +00:00
Pedro 31f01379ce Add configurable height for slime spawn per world (#6310) 2022-01-10 18:27:16 -08:00
Nassim Jahnke 3ea224d128 Reset placed blocks on exceptions 2022-01-10 14:03:18 +01:00
Tom Miller 87d8ef9f24 Add/Remove multiple entries with Scoreboard Team (#6640) 2022-01-09 21:08:55 -08:00
Jacob Andersen 2be9beb5dc Add material tags for deepslate ores (#7174) 2022-01-09 20:25:22 -08:00
a736c1a3c7 Add new overload to PersistentDataContainer#has (#7278)
Co-authored-by: u9g <winworkswow@gmail.com>
Co-authored-by: Josh Roy <joshroy126@gmail.com>
2022-01-09 11:35:45 -05:00
Jake Potrebic 7d7ae7b881 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7246) 2022-01-08 21:12:05 -08:00
Jason d9fb602057 Expose vanilla BiomeProvider from WorldInfo (#7295) 2022-01-07 15:35:32 -08:00
Spottedleaf eb48ada00b Merge chunk task urgent executor thread into the worker queue
By keeping them separate, urgent tasks could not be executed
by the worker queue.
2022-01-07 15:15:35 -08:00
Spottedleaf 5ccd3050ed Fix incorrect old oversized chunk data merging
All legacy oversized chunks were created before the new
chunk format, so don't try to merge into the new format.
2022-01-07 13:49:39 -08:00
Brokkonaut c3d812d341 Make water animal spawn height configurable (#7135) 2022-01-07 11:38:51 +01:00
Nassim Jahnke 9a47cf1834 Don't print utterly useless brig exception 2022-01-06 13:11:08 +01:00
Nassim Jahnke e64ac41fe2 Catch more json parse errors 2022-01-06 12:40:51 +01:00
Jake Potrebic 55a1756ade Fix saving configs with more long comments (#7248) 2022-01-05 11:54:42 -08:00
Nassim Jahnke 20c131b96b [ci skip] Add forums to readme (#7286) 2022-01-05 13:58:11 +01:00
Nassim Jahnke 5e30e19e20 Fix compile 2022-01-03 10:23:56 +01:00
Nassim Jahnke 00d6cca4df Fix filtered text not being applied on sign update
Fixes #7266
2022-01-03 10:17:27 +01:00
Jake Potrebic eb98398158 Fixed FishingHook param mappings being swapped (#7243) 2022-01-02 22:24:33 -08:00
Nassim Jahnke d0b8b1e972 Fix disarmed tripwire block updates
Fixes #7259
Closes #7261
2022-01-02 21:33:53 +01:00
Jason 79dd62ae62 Use AreaMap for per-player mob spawning (#7235) 2022-01-02 11:06:08 -08:00
Pierre Maurice Schwang 19bc612483 Make BlockData creation thread safe again (#6876) 2022-01-02 18:29:21 +01:00
sean d3f3429d03 Use simulation distance for per-player mob spawns (#7247) 2022-01-02 15:05:08 +01:00
Shane Freeder 503ac8f1cb Provide option to disable username validation (Closes #7250) (#7254) 2022-01-02 12:51:22 +00:00
Noah van der Aa cee7e0df01 Fix soul speed particles with hide-itemmeta enabled (#7239) 2022-01-01 15:26:53 -08:00
thamid-gamer fb4ff200f4 Use isSensitiveToWater in nerfed check for water-sensitive mobs (#7236) 2022-01-01 13:56:41 -08:00
Spottedleaf 3c5284dae9 Allow . in usernames 2022-01-01 11:50:44 -08:00
Spottedleaf 4bf2aef745 Validate usernames 2022-01-01 05:48:17 -08:00
Jake Potrebic 3a43821c38 Updated Upstream (Bukkit/CraftBukkit/Spigot) 2021-12-31 19:05:42 -08:00
Jason 8b1734123e Fix vanilla LocalMobCapCalculator being used when per-player mob spawning is enabled (#7230) 2021-12-31 18:07:21 -08:00
Jason Penilla fa438331e0 [ci skip] Update shadow and remove semicolons from kotlin code 2021-12-31 14:28:13 -08:00
Simon Gardling 58c41d0f60 [ci skip] Update log4j-api in Paper-API to 2.17.1 (#7227) 2021-12-31 14:26:20 -08:00
Jason Penilla c40e04e9e7 Remove wrong update call in distance map add method 2021-12-31 13:59:34 -08:00
Noah van der Aa 64f9225c94 Fix riding distance statistics (#7021/SPIGOT-6475) (#7033) 2021-12-30 23:17:08 -08:00
LemonCaramel 686bbd33d4 Fix EntityLoadCrossbowEvent Sync Issue (#5739) 2021-12-30 22:54:23 -08:00
LexiandJake Potrebic 2d458ee14f Check player world in endPortalSoundRadius (#6226)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-12-30 19:50:44 -08:00
Owen1212055 721f14842f [ci skip] Change test logging settings to log by default (#7203) 2021-12-30 13:52:30 -08:00
Owen1212055 a99a33cdd9 Bucketable API (#7204) 2021-12-30 11:58:38 -08:00
Jake Potrebic 7b833ca18f Fix bees aging inside hives (#6466) 2021-12-30 11:44:39 -08:00
BillyGalbreath 329912b816 Expose isFuel and canSmelt methods to FurnaceInventory (#7181) 2021-12-30 00:42:16 -08:00
Jake Potrebic a219c497bd Dont register multiple ASK_SERVER suggestions under one parent node (#7188) 2021-12-29 23:11:40 -08:00
Shane Freeder 6852c657cd Add debug stack for removed player teleporation check 2021-12-29 15:06:51 +00:00
Nassim Jahnke 7d48a46bc2 Fix block key with negative y unpacking (#7219)
Fixes #7218
2021-12-29 10:34:38 +01:00
Jason Penilla aa8a835912 [ci skip] Populate test plugin api-version from mcVersion
closes #7216
2021-12-28 16:50:02 -08:00
Nassim Jahnke 1931bb53bf https://youtu.be/NIH6j7-w198 2021-12-28 22:07:25 +01:00
BillyGalbreath 5883773e37 Fix Chunk#isSlimeChunk when all-chunks-are-slime-chunks is true (#7211) 2021-12-28 11:15:04 -08:00
Owen1212055 6cb62bf003 Deprecate localized name API (#7212) 2021-12-28 11:13:27 -08:00
Shane Freeder 87e443bf9a Fix migration logic for old player saving config option
This is an ode to all those times when you shoulda just gone to bed
2021-12-28 08:10:41 +00:00
Glare 8f65f378ce [ci skip] Fix typo in getNearbyLivingEntities documentation (#7205) 2021-12-27 15:45:36 -08:00
Spottedleaf 2cf4b82d71 Correctly parse last update for old chunks for regionfile recalc
It's required so that comparisons between two chunks can be
made
2021-12-27 13:35:09 -08:00
Spottedleaf 22be4d5c60 Defensively copy chunk data in upgradeChunkTag
The data provided is always from the regionfile thread, which
does not copy the data out. So if two separate calls need
the data, then there's going to be a problem.
2021-12-27 04:16:22 -08:00
Jason Penilla 692283dbe2 Remove making unused copy of visible chunks in ChunkMap#processUnloads 2021-12-27 03:53:25 -08:00
Jason Penilla e9947f8145 [ci skip] sync dependency versions in paper-mojangapi with paper-api 2021-12-25 15:12:28 -08:00
Jason 464b1715bb Add uncaught exception handler using logger to usages of ThreadFactoryBuilder (#7179) 2021-12-23 02:32:26 -08:00
Jason Penilla bf826b3fac [ci skip] Update Gradle wrapper to 7.3.3 2021-12-22 15:56:47 -08:00
Josh Roy 1ce4281666 Fix ABI breakage for plainSerializer (#7178) 2021-12-22 14:56:37 -08:00
Jake Potrebic cf621c5eb3 Load effect amplifiers greater than 127 correctly (#7175) 2021-12-22 10:20:33 -08:00
Jake Potrebic 82eaf4ee15 Fix duplicated BlockPistonRetractEvent call (#7111) 2021-12-22 10:02:31 -08:00
Nassim Jahnke 6e5ceb34eb Fix ChunkMap distanceManager field reobf
Not the most ideal, but works for now
2021-12-22 14:18:58 +01:00
Nassim Jahnke 10bfb63f6c Configurable max block light for monster spawning (#7129) 2021-12-22 12:47:15 +01:00
Riley Park 26fbb02aae Adventure changes for Java 17 and Component support for resourcepack prompt 2021-12-21 23:51:07 -08:00
Jake Potrebic 8a21c1742b Add API for item entity health (#6514) 2021-12-21 23:07:15 -08:00
Jake Potrebic 2cf6a57bca Fix entity type tags suggestions in selectors (#6468) 2021-12-21 21:34:20 -08:00
Jason Penilla a6a6a3db24 [ci skip] Revert change to apatch script 2021-12-21 19:58:24 -08:00
Jake Potrebic 264b11d9f3 Entity powdered snow API (#6833) 2021-12-21 19:52:54 -08:00
Jake Potrebic 9012ae8880 Improve scoreboard entries (#6871) 2021-12-21 16:45:18 -08:00
Jake Potrebic d4c819056d Forward CraftEntity in teleport command (#7025) 2021-12-21 16:40:24 -08:00
Jake Potrebic 76f327471d Move VehicleCollisionEvent HandlerList up (#7112) 2021-12-21 16:34:44 -08:00
Jake Potrebic 9adc0b243b Fix breakNaturally for fluid-logged blocks (#7134) 2021-12-21 16:32:54 -08:00
Jake Potrebic 75f4cb074a Move setShouldBurnInDay to AbstractSkeleton (#7120) 2021-12-21 16:31:33 -08:00
Jake Potrebic 3d9385e665 Add material tags for copper blocks (#7141) 2021-12-21 16:24:03 -08:00
Jake Potrebic 9259558b58 Fix remapping issue with RangedAttackMob and RangedEntity (#7167) 2021-12-21 16:23:19 -08:00
Jason Penilla df8d28a450 Update checker framework & log4j-api for paper-api (also rebuild patches)
Note that the log4j-api version used in paper-api does not affect the version used in paper-server, this just affects the version people will see in their IDE when compiling against paper-api.
2021-12-21 01:17:52 -08:00
Jason Penilla 8a9979c85a Update gradle wrapper to 7.3.2 2021-12-21 01:14:52 -08:00
Jason Penilla 5cb294299c Update paperweight to 1.3.3 and shadow to 7.1.1 2021-12-21 01:14:41 -08:00
Noah van der Aa ae6fec6d13 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7116) 2021-12-20 22:46:51 +00:00
Nassim Jahnke 6178609e1d Fix tripwire state inconsistency 2021-12-20 12:10:26 +01:00
Spottedleaf 8c5be16686 Only write chunk data to disk if it serializes without throwing
This ensures at least a valid version of the chunk exists
on disk, even if outdated
2021-12-19 09:15:22 -08:00
Spottedleaf 8c189d0faf Create sections for chunk conversion if non-existant
Required to add in the new biome sections
2021-12-18 01:06:37 -08:00
Nassim Jahnke 358ceb80a5 Update log4j to 2.17.0 2021-12-18 09:02:34 +01:00
Spottedleaf 4b0b72554f Add missing return when datafixers fail for chunk conversion
Caused the chunk to be later deserialized, which would
result in spamming unrelated errors (possibly) +
double chunk completion.
2021-12-17 06:55:39 -08:00
Spottedleaf 5b5f0aa6c8 Bounds check biomes length before using.
Missed the diff by Mojang that added this, apparently some
ancient code created zero-length biomes.
2021-12-17 06:38:18 -08:00
DefineOutside 5ad1d9a01d Fix empty voxel shape usage (Fixes #7043) 2021-12-15 18:15:04 +00:00
JasonandNassim Jahnke 95d881f916 Fix WorldGenRegion leak when converting pre-1.18 chunks (#7097)
Co-authored-by: Nassim Jahnke <jahnke.nassim@gmail.com>
2021-12-14 22:07:42 +01:00
Nassim Jahnke 51d168752b Update log4j to 2.16.0
No confirmed attack vector, and definitely no attack vector for normal setups, but, just in case.
2021-12-14 20:08:40 +01:00
LemonCaramel 7f310957bc Add more Campfire API (#5779) 2021-12-13 12:57:39 -08:00
Owen1212055andRiley Park d8747c13e5 [ci skip] Add nullable annotation to field (#7042)
Co-authored-by: Riley Park <riley.park@meino.net>
2021-12-12 20:31:32 -08:00
Lexi df1301b53a Make org.bukkit.Keyed extend Adventure's Keyed (#7090) 2021-12-12 20:26:19 -08:00
Jake Potrebic c1bd3cc8fd Updated Upstream (CraftBukkit) (#7105) 2021-12-12 19:59:43 -08:00
Jason Penilla 91f3edaac4 Update paperweight to 1.3.2 2021-12-12 01:23:12 -08:00
chickeneer 874532613c Remove java 8 and prior reflection code from CustomTimingsHandler (#7096) 2021-12-11 23:03:06 -08:00
Jason 29bd57b4c8 Remove codec usage in chunk snapshot creation (#7093) 2021-12-11 17:50:45 -08:00
Nassim Jahnke 901fd942f6 [ci skip] Update README 2021-12-10 16:40:23 +01:00
Nassim Jahnke 1c779c2d2e Update to 1.18.1 (#7076) 2021-12-10 15:24:07 +01:00
Glare dce79f333c Update Log4J (#7069) 2021-12-09 18:02:41 -08:00
Nassim Jahnke 4e355c488d Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
35d3986e Disable log4j message formatting
040e0c3b Increase outdated build delay
2021-12-09 21:59:59 +01:00
Nassim Jahnke b475c6a683 Backport log4j fix 2021-12-09 17:55:19 +01:00
Jason Penilla bbc745158d Fix issue with snapshotted biomes in last commit 2021-12-09 04:36:03 -08:00
Jason Penilla 188a8dfc4c Fix ChunkSnapshot#isSectionEmpty(int) 2021-12-09 04:11:04 -08:00
Spottedleaf 0e91b6ae9b Return 0 for light values if a dimenion does not have them
Fixes https://github.com/PaperMC/Starlight/issues/99
2021-12-08 22:01:02 -08:00
Spottedleaf 758e2a7ee2 Fix bad ticking checks for blocks
Caused blocks to tick outside of simulation distance
2021-12-08 22:00:45 -08:00
Jake Potrebic 74fd151adc Fix entity equipment on cancellation of EntityDeathEvent (#5740) 2021-12-08 10:25:57 -08:00
Nassim Jahnke 33ea869a65 Bump Starlight light version 2021-12-08 08:42:44 +01:00
Nassim Jahnke 772e880f29 Fix light propagation in high y sections 2021-12-07 20:33:10 +01:00
Jason Penilla 53d026edcd Fix unused EntitySectionStorage#getEntities(AABB, Consumer) method being broken 2021-12-06 19:40:26 -08:00
Jake Potrebic 0e25db214f Fix mis-placed processEnchantOrder from 1.18 update (#7052) 2021-12-06 12:28:36 -08:00
Noah van der Aa b4a77a84a7 Updated Upstream (Bukkit/CraftBukkit) (#7045)
Upstream has released updates that appear 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:
ffd8b289 PR-687: Fix NPE from previous commits

CraftBukkit Changes:
3c2af1b7 SPIGOT-6831: Fix llama strength crash
2021-12-06 13:43:46 +01:00
Riley Park 04897b1333 [ci skip] Revert "Create workflow to add new PRs to the PR Queue project (#6918)" (#7046)
This reverts commit b8d486cbc4.
2021-12-06 01:05:10 -08:00
Jason af95df8d40 Port Actually unload POI data from Tuinity 1.16 (#7044) 2021-12-06 00:09:07 -08:00
Jake PotrebicandJason Penilla a50e2736a7 Include axolotls in affected entities for water splash potions (#7024)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-12-05 17:56:55 -08:00
MiniDigger | Martin b8d486cbc4 Create workflow to add new PRs to the PR Queue project (#6918) 2021-12-05 17:52:47 -08:00
Jason fd263ef962 Fix empty/null chunk section check in LevelChunk#getBlockData, rename… (#7039)
… patch and methods to make more sense with Mojang mappings
2021-12-05 15:32:02 -08:00
Jake Potrebic 7c8fdc1fb6 Add dropped hunk from mid-tick tasks (#7034) 2021-12-05 13:58:01 -08:00
Jake Potrebic 83aee0f551 [ci skip] Clarify setSize consequences for Slimes (#7036) 2021-12-05 13:16:55 -08:00
Jason Penilla a4782f72f7 [ci skip] fixup indent 2021-12-05 13:07:44 -08:00
LemonCaramel c83700291a Fix client world difficulty sync issue (#7035) 2021-12-05 20:44:17 +01:00
Shane Freeder 323c087397 Revert "#686: Fix contains for default section generating real sections"
This commit causes an NPE when getting from the config in some states,
given upstream issue and PR in the works, I have 0 inclination to debug
this

This reverts commit e4358b8217126bbcc3a38b0d17097ad5ab87c50a.
2021-12-05 15:20:52 +00:00
Shane Freeder 5b6445aaaf Revert "fix NPE from changes in e4358b82171"
This reverts commit b4192fd8e6.
2021-12-05 15:10:39 +00:00
Gabriel Wolf b4192fd8e6 fix NPE from changes in e4358b82171 2021-12-05 14:36:47 +00:00
Nassim Jahnke 6b072ee589 Revert "Fix #6779"
This reverts commit 78faaa4f8e.
2021-12-05 15:05:41 +01:00
Jake Potrebic fd4f6c5e31 Update Optimise chunk tick iteration (#6950) 2021-12-05 15:00:13 +01:00
Jason Penilla c3ff7e0ff7 Update Optimise collision checking in player move packet handling 2021-12-05 02:56:09 -08:00
Jason Penilla 78faaa4f8e Fix #6779 2021-12-05 02:45:09 -08:00
Jason Penilla fcca15ff0b Update Highly optimise single and multi-AABB VoxelShapes and collisions 2021-12-05 02:45:09 -08:00
Jason ccabae4fb6 Update and deprecate Allow delegation to vanilla chunk gen (#7031) 2021-12-05 02:27:20 -08:00
Jason a42917dd10 [ci skip] Remove reobfJar from paper-server publication (#7027) 2021-12-04 23:42:28 -08:00
Jason 62fd374c36 Remove debug checks from ZeroBitStorage (#7029) 2021-12-04 23:41:44 -08:00
Jake Potrebic fd352861b0 Updated Upstream (Bukkit/CraftBukkit) (#7022) 2021-12-04 23:11:59 -08:00
Jason Penilla a8e5141f2a [ci skip] Fix double actions on PRs from main Paper repo 2021-12-04 21:19:04 -08:00
Jake Potrebic 54b0c41c20 further mitigate possible NPEs 2021-12-04 19:39:52 -08:00
Shane Freeder 52f95706d2 Fix trader merchants NPE when interacting with a merchant with non-active trades 2021-12-05 03:00:13 +00:00
stonar96 76ee105811 Optimize HashMapPalette (#5074)
HashMapPalette uses an instance of CrudeIncrementalIntIdentityHashBiMap
internally. A Palette has a preset maximum size = 1 << bits.
CrudeIncrementalIntIdentityHashBiMap has an initial size but is
automatically resized. The CrudeIncrementalIntIdentityHashBiMap is created
with the maximum size in the constructor of HashMapPalette, with the aim
that it doesn't need to be resized anymore. However, there are two things
that I think Mojang hasn't considered here:
1) The CrudeIncrementalIntIdentityHashBiMap is resized, when its initial
size is reached and not the next time, when a further object is added.
2) HashMapPalette adds objects (unnecessarily) before checking if the
initial size of CrudeIncrementalIntIdentityHashBiMap is reached.
This means to actually avoid resize operations in
CrudeIncrementalIntIdentityHashBiMap, one has to add 2 to the initial size
or add 1 and check the size before adding objects. This commit implements
the second approach. Note that this isn't only an optimization but also
makes async reads of Palettes fail-safe. An async read while the
CrudeIncrementalIntIdentityHashBiMap is resized is fatal and can even lead
to corrupted data. This is also something that Anti-Xray is currently
relying on.
2021-12-04 15:56:34 +01:00
Sam 63a97a64a3 Add Player#sendHealthUpdate (#6904) 2021-12-04 15:10:57 +01:00
Sam bae37ad2d8 Add PlayerItemFrameChangeEvent (#6897) 2021-12-04 14:49:34 +01:00
Noah van der Aa 614ed1de72 Don't get block light level if the sky level is 15 (#6922) 2021-12-04 14:24:40 +01:00
Shane Freeder 77ff1f3005 Prevent ContainerOpenersCounter openCount from going negative (Fixes #6865) 2021-12-04 02:50:35 +00:00
Shane Freeder 7323594d59 Do not use ForkJoinPool common exector for creating client command struct (Fixes #6936) 2021-12-04 02:37:33 +00:00
Jake Potrebic 2b97750f60 Fix kelp modifier having reverse effect (#6806) 2021-12-03 18:12:42 -08:00
Jason 675d1e3f58 Fix kelp modifier changing growth for other crops (#7012) 2021-12-03 17:40:42 -08:00
Jake Potrebic b653ee1a91 Updated Upstream (Bukkit/CraftBukkit) (#7009) 2021-12-03 17:33:56 -08:00
Jake Potrebic a41444735a [ci skip] adjust upstreamCommit script to not mention paper issues (#6956) 2021-12-04 01:20:19 +00:00
Shane Freeder 2f31569807 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
9115281f SPIGOT-6832: Improve Player#getPing docs

CraftBukkit Changes:
fd3478bc7 #967: Store last lava contact location for events

Spigot Changes:
dbf49382 Rebuild patches
58cb9d26 #113: Use simulationDistance for entity activation range base
2021-12-03 21:28:15 +00:00
Finn Künstner 05a2271884 Updated Upstream (CraftBukkit) (#7007) 2021-12-03 21:11:19 +00:00
Jake Potrebic 1f5b013cbe Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
4b5f9882 Fix when bundler directory is a symlink
6f3509d1 Release POIs when villagers are removed by plugins
2021-12-03 11:53:17 +01:00
Shane Freeder cfa5b37fa8 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
03b725233 SPIGOT-6823: Fix loading custom world in combination with superflat
359d0533a #970: Correct typo in README.md
110492932 Fix per-world worldborder command
2021-12-03 00:26:54 +00:00
Jake Potrebic 057adb04f1 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6990) 2021-12-02 12:21:33 -08:00
Jason 956124f86a Build updates (#6992) 2021-12-01 23:21:14 -08:00
SoSeDiK a5a7782f40 Fix NPE when getting destroy speed of air (#6989) 2021-12-02 01:48:15 +00:00
Jake Potrebic 0cd411efdf Don't populate a useless spigot.yml field (#6976) 2021-12-01 10:03:46 -08:00
Nassim Jahnke 892c292dc9 Fix itemmeta patch and move oversized fix into its own (#6980) 2021-12-01 13:32:36 +01:00
Shane Freeder 13a445c083 Update paperclip to v3.0.2 2021-12-01 09:28:26 +00:00
Jake Potrebic 72983892cf Don't set last hand/armor lists to stripped items (#6977) 2021-12-01 00:36:48 -08:00
Jake Potrebic cb195e1958 Skip stripping metadata from empty stacks (#6973) 2021-11-30 18:59:09 -08:00
Jake Potrebic 4bfb8d7130 Add missing AT (#6970) 2021-11-30 18:28:16 -08:00
Noah van der Aa cd9fe9ca64 Port flat bedrock (generator settings) to 1.18 (#6960) 2021-11-30 17:31:13 -08:00
Kyle Wood effa3bad36 Update to paperweight 1.3.0 2021-11-30 19:10:15 -06:00
Noah van der Aa 0152c9c41c Updated Upstream (CraftBukkit) (#6966) 2021-11-30 16:43:02 -08:00
e955cb5b26 Hide unnecessary itemmeta from clients (#6318)
Co-authored-by: Nassim Jahnke <jahnke.nassim@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-11-30 14:47:10 -08:00
Jake Potrebic bd9c2b75c7 Fix removing recipes (#6965) 2021-11-30 12:27:27 -08:00
Nassim Jahnke 612fc733a5 [ci skip] remove core team from catch-all codeowners (#6958) 2021-11-30 10:48:50 -08:00
Nassim Jahnke c728c78c7b Update gradle.properties 2021-11-30 19:26:33 +01:00
Nassim Jahnke b2bc5b9ee7 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
b46ac671 Update to Minecraft 1.18

CraftBukkit Changes:
bc14cb64 Update to Minecraft 1.18

Spigot Changes:
a5dea1cb Update to Minecraft 1.18
2021-11-30 19:26:33 +01:00
Nassim Jahnke 971ca7e4d1 1.18 Release 2021-11-30 19:26:33 +01:00
Jason Penilla 754dfd1eb2 re-inline Goal.Flag iteration 2021-11-30 19:26:33 +01:00
Jake d8d7f52324 another patch 2021-11-30 19:26:33 +01:00
Jake 5ff792342c couple more patches 2021-11-30 19:26:33 +01:00
Nassim Jahnke bcc11dd95a Remove old anti xray patch 2021-11-30 19:26:33 +01:00
Nassim Jahnke 903aa737d8 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
ab6e73a2 Correct copied javadoc from previous commit

CraftBukkit Changes:
9fb3aa4c SPIGOT-6817: Revert back to old block state behaviour again
2021-11-30 19:26:33 +01:00
stonar96 4ab59e1326 Port Anti-Xray to 1.18 (#6947) 2021-11-30 19:26:33 +01:00
Jake ebb727e629 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
810cb078 Add hideEntity / showEntity API

CraftBukkit Changes:
04f8e7e2 SPIGOT-6814: (Chunk) PersistentData is lost after restart
37fd1917 Add hideEntity / showEntity API
7e2214da Move checkstyle to slightly later compile phase
45c3f826 SPIGOT-6816: Fix ChunkSnapshot#getBiome

Spigot Changes:
b11f318f Rebuild patches
622b2310 SPIGOT-6811: Fix mob spawning mismatch
2b2a3d56 Rebuild patches
2021-11-30 19:26:33 +01:00
Jake d3ffbcdd52 Fixes chunks not loading PDC sometimes
If a chunk had no entities or block entities, it would fail
to load the PDC. This adds an additional check to see if there is
PDC and then to load that if so.

See: https://hub.spigotmc.org/jira/browse/SPIGOT-6814
2021-11-30 19:26:33 +01:00
Nassim Jahnke a372cea5d2 Update readme, rename incremental chunk saving 2021-11-30 19:26:33 +01:00
Jake Potrebic ba722a8c9d Update paperclip and yarn mappings (#6943) 2021-11-30 19:26:33 +01:00
Jake 7382bd2847 add mobcaps command patch 2021-11-30 19:26:33 +01:00
Jake 9beac6a2a4 Fix hostile mob spawning
Upstream adds this check and didn't flip it since mojang flipped the
return boolean from previous versions. This will end up removed
from this patch when (if) upstream fixes this
2021-11-30 19:26:33 +01:00
Jake afbaa18bf6 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
c9b35cdb PR-684: Make PotionEffectType implement Keyed

CraftBukkit Changes:
c86a3f7a PR-959: Fix World#refreshChunk
af8a8b70 PR-962: Make PotionEffectType implement Keyed

Spigot Changes:
7514aa37 SPIGOT-6806: Add setting to disable new chunks generation under existing chunks
2021-11-30 19:26:33 +01:00
Kyle Wood 0af80abdca Bump Paperclip and fix configuration cache issue 2021-11-30 19:26:33 +01:00
Nassim Jahnke 8c78a82906 Cleanup unnecessary hopper optimization diff
Fixes #6941
2021-11-30 19:26:33 +01:00
Nassim Jahnke a461ff8d07 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
806bb02c SPIGOT-6810: Improve / fix biome setting code
2021-11-30 19:26:33 +01:00
Nassim Jahnke 08939b2db8 Move seed based feature search to no longer needed 2021-11-30 19:26:33 +01:00
Nassim Jahnke 0440a08b8d Fix oversized chunk merging 2021-11-30 19:26:33 +01:00
Spottedleaf 8e5d5b8753 Add Starlight 2021-11-30 19:26:33 +01:00
Jason 3c586898a5 Use old dataconverter hooks (#6938) 2021-11-30 19:26:33 +01:00
Jason Penilla 21cb7a63fb Further manifest fixes 2021-11-30 19:26:33 +01:00
Jason Penilla 8d5f9137b4 Fix issue with manifest util in tests 2021-11-30 19:26:33 +01:00
MiniDigger b395c374ac my patches are still MIT btw
gpl is evil!
2021-11-30 19:26:33 +01:00
MiniDigger 4a466ac7d1 change my email in all patches 2021-11-30 19:26:33 +01:00
Jason Penilla c0f2385c99 Remove redundant json-simple dependency and move isTransitive = false from server to api 2021-11-30 19:26:33 +01:00
Jason Penilla 231e0cd3b5 Rebuild patches with record field access fix 2021-11-30 19:26:33 +01:00
Jason Penilla 251b568882 Fix manifest util for bundler jars 2021-11-30 19:26:33 +01:00
Jason Penilla 7abff79737 Remove client-side code using deprecated for removal
AccessController

Fixes warnings on build
2021-11-30 19:26:33 +01:00
Josh Roy bc0dd0df3d Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
716b4fce Revert SnakeYAML upgrade
ca6f8942 Update to Minecraft 1.18-rc3
57e7e952 #683: Add Player#showDemoScreen

CraftBukkit Changes:
c98abfb0 Update to Minecraft 1.18-rc3
9b258501 #960: Add Player#showDemoScreen
d9542247 Produce remapped jars after bootstrap jar
99f3ddde SPIGOT-6808: Fix RegionAccessor#getBiome

Spigot Changes:
b7a4222e Update to Minecraft 1.18-rc3
2021-11-30 19:26:33 +01:00
Nassim Jahnke 134a61c111 Readd incremental chunk saving, merge with player saving 2021-11-30 19:26:33 +01:00
Nassim Jahnke 738788079b Remove deprecated protoworld api 2021-11-30 19:26:33 +01:00
Nassim Jahnke 10c6a1bd9e Fix configurable feature seed patch 2021-11-30 19:26:33 +01:00
Jason Penilla 9ea33aa222 Update test plugin 2021-11-30 19:26:33 +01:00
Nassim Jahnke a4d9687be8 Update readme and contributing guidelines 2021-11-30 19:26:33 +01:00
Jason Penilla 7230cbbd55 lowercase root project name as well 2021-11-30 19:26:33 +01:00
Kyle Wood 0675784032 Fix stacktrace deobf when running as a bundler jar 2021-11-30 19:26:33 +01:00
Kyle Wood e519a51f95 Upgrade paperweight with bundler jar updates
This allows creating paperclip jars pre-patch (only the reobf'd jar for
now).
2021-11-30 19:26:33 +01:00
Nassim Jahnke e8f01f89d2 Rename optimize isOutsideRange patch 2021-11-30 19:26:33 +01:00
Nassim Jahnke 86b1213a0b Readd configurable feature seed patch 2021-11-30 19:26:33 +01:00
Nassim Jahnke 4e60e11b6b Fix incremental player saving check 2021-11-30 19:26:33 +01:00
Nassim Jahnke 5a90a2033d More more more more more more more more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke e85e1f4e49 Fix fuckups from previous commit 2021-11-30 19:26:33 +01:00
Nassim Jahnke dabbf5b193 More more more more more more more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 011df7dc84 More more more more more more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Jason Penilla 055b8ab9cf even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even more patches 2021-11-30 19:26:33 +01:00
Jason Penilla b39fa92d5d even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even more patches 2021-11-30 19:26:33 +01:00
Jason Penilla f04f3321e3 even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even more patches 2021-11-30 19:26:33 +01:00
Jason Penilla dc58f85df2 even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even more patches 2021-11-30 19:26:33 +01:00
Jason Penilla fdde23eecf even even even even even more patches 2021-11-30 19:26:33 +01:00
Josh Roy aa948d8338 more i guess pepeW 2021-11-30 19:26:33 +01:00
Josh Roy c1d14dc076 all api patches done*
*still waiting for leaf to port datafixer to 1.18 so i can do entity serialization
2021-11-30 19:26:33 +01:00
Jason Penilla 4df6820f86 Remove pom for paperclip install to maven local 2021-11-30 19:26:33 +01:00
Jason Penilla e6fe6effee Fix JarManifests util 2021-11-30 19:26:33 +01:00
Jake 2e347b629d and yet again, more patches 2021-11-30 19:26:33 +01:00
Jake 4664528315 more patches done 2021-11-30 19:26:33 +01:00
Jake c4ef2add48 patches and remap fixes 2021-11-30 19:26:33 +01:00
Jake 00be0b7b30 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
d25437bc Update to Minecraft 1.18-pre8

CraftBukkit Changes:
5a39a236 Update to Minecraft 1.18-pre8

Spigot Changes:
7840c2af Update to Minecraft 1.18-pre8
2021-11-30 19:26:33 +01:00
Jake 5a2d3b2b29 more patches 2021-11-30 19:26:33 +01:00
Jason Penilla 35aeb0ddeb Update server build file 2021-11-30 19:26:33 +01:00
Jake 6ccc23f457 even MOOOOOOOOOOOOAAAAAAAAAAAAAAAARRRRRRRRRRRRR patches 2021-11-30 19:26:33 +01:00
Jake 1cb76e15be moaaaaaaaar patches 2021-11-30 19:26:33 +01:00
Jake 6f5b43e290 moaaaaar patches 2021-11-30 19:26:33 +01:00
Jake e141126891 even moaar patches 2021-11-30 19:26:33 +01:00
Jake f331ac28e0 add back Optimize collision to not load chunks 2021-11-30 19:26:33 +01:00
Jake c280dbeed0 moar patches 2021-11-30 19:26:33 +01:00
Jake 3436ed93c2 a bunch more patches done 2021-11-30 19:26:33 +01:00
Jake 3dbf41c443 updated more patches 2021-11-30 19:26:33 +01:00
Jake 0f7ca21add several more patches updated 2021-11-30 19:26:33 +01:00
Nassim Jahnke 26dcf812a4 More more more more more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 97a4a70766 More more more more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 45c36e5d0c More more more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 4e81c1fe78 More more more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 8f67d293a2 More more more more more more more more more more more work 2021-11-30 19:26:33 +01:00
Jason Penilla 0358549f7b p a t c h e s 2021-11-30 19:26:33 +01:00
Jason Penilla e208af9741 patches 2021-11-30 19:26:33 +01:00
Jason Penilla 0050c2a090 Remove no longer needed patches 2021-11-30 19:26:33 +01:00
Kyle Wood 1ac7223aae Verify and fix build-data adjustments for 1.18 reobf 2021-11-30 19:26:33 +01:00
Nassim Jahnke 8f64c190ef Fix Paper comments 2021-11-30 19:26:33 +01:00
Nassim Jahnke f43f1e217e More more more more more more more more more more work 2021-11-30 19:26:33 +01:00
MiniDigger 6ac2614a5f hey, look ma, am doing my part! 2021-11-30 19:26:33 +01:00
Jason Penilla 1d74ffcb7c Fixup indent in async chunk io patch 2021-11-30 19:26:33 +01:00
Jake 0f23d73d1a a bunch more patches 2021-11-30 19:26:33 +01:00
Jake 2b29fe37a2 more patches updated 2021-11-30 19:26:33 +01:00
Jason Penilla 5d0d11e4b6 Patches 2021-11-30 19:26:33 +01:00
Jason Penilla 35d0ab1ca8 Squash annotation test changes patches 2021-11-30 19:26:33 +01:00
Jake 2004ff214a more work 2021-11-30 19:26:33 +01:00
Jake 753267a57e and here's some more patches 2021-11-30 19:26:33 +01:00
Jake d9c1c30c58 move mojang api server patches up 2021-11-30 19:26:33 +01:00
Jake e481692afd move extra plugins patch up & more work 2021-11-30 19:26:33 +01:00
Jason Penilla 7665ae86d6 Update runServer gradle properties 2021-11-30 19:26:33 +01:00
Jake 9ae92d26b8 and some more patches 2021-11-30 19:26:33 +01:00
Jason Penilla 76879ba957 Fix issues with IntIdentityHashBiMiap 2021-11-30 19:26:33 +01:00
Jake 5cfc0781d6 even more patches 2021-11-30 19:26:33 +01:00
Jake 18ad44eabc several more patches 2021-11-30 19:26:33 +01:00
Jason Penilla 28b02df594 Update ticklist saving 2021-11-30 19:26:33 +01:00
Jason Penilla 18c9e5f964 Remove no longer needed mapping patches
Spigot uses mojang method names now
2021-11-30 19:26:33 +01:00
Josh Roy 06629d562b Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
a58fde42 Fix crash with composters
a11ec5d7 Remove unnecessary CraftBlock creation in CraftRegionAccessor#setBlock
2021-11-30 19:26:33 +01:00
Josh Roy 98330439e8 More more more more more more more more more work 2021-11-30 19:26:33 +01:00
Josh Roy 11709feb21 More more more more more more more more work 2021-11-30 19:26:33 +01:00
Josh Roy e131aff8ad these aren't needed 2021-11-30 19:26:33 +01:00
Josh Roy 3cd2c987cf Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
ea30a299 Add docs in ServerListPingEvent based on changes from 1.18

CraftBukkit Changes:
03f249f0 Generate bootstrap jar separately
3b214b5a SPIGOT-6803: Fix ServerPing not using the new logic for show players in 1.18

Spigot Changes:
c07753b0 Rebuild patches
2021-11-30 19:26:33 +01:00
Jake Potrebic 66dbf41a65 async chunk patch progress (#6930) 2021-11-30 19:26:33 +01:00
Nassim Jahnke 758b8c689b Fix mappingregistry, readd an async chunk hunk 2021-11-30 19:26:33 +01:00
Nassim Jahnke cc171b1928 More more more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 105034367d More more more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 6f3591fd6d More more more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke d7cdc72bdf More more more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke e9954ed32a More more more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke c8cb91bb99 More more work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 456621b0d7 More work 2021-11-30 19:26:33 +01:00
Nassim Jahnke 31f9d01c7c Work 2021-11-30 19:26:33 +01:00
Jason Penilla 284a7fed94 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
07a05531 SPIGOT-6781: Add Block#canPlace

CraftBukkit Changes:
dd02403b Fix upgrading worlds with custom generators
1c82731d SPIGOT-6781: Add Block#canPlace
2f6662d4 Improve multi-dimension code
6ac2e032 SPIGOT-6802: Fix major issues with --forceUpgrade

Spigot Changes:
d5de7346 Rebuild patches
2021-11-30 19:26:33 +01:00
Jason Penilla a8ef7aa56f Prepare for updating server patches 2021-11-30 19:26:33 +01:00
MiniDigger 79b873c901 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
64c8bd39 #679: Add getHideOnlinePlayers
b991b6c7 #677: Add "Allow Server Listings" API
4e9f199a SPIGOT-6801: Wrong BlockData classes in Material enum for SOUL_FIRE and SOUL_TORCH

CraftBukkit Changes:
37e63e63 Fix loading / creating secondary worlds (nether/end)
4bf7f33c #956: Add getHideOnlinePlayers
d181e1ed Fix serializing unhandled NBT + add unit test with unhandled NBT
aebb79e3 #954: Add "Allow Server Listings" API
7c4707e4 #955: Add test for BlockData class of Material

Spigot Changes:
16c0cb41 Rebuild patches
2021-11-30 19:26:33 +01:00
Jason Penilla c93f56ac1c Removed patches go in removed 2021-11-30 19:26:33 +01:00
Nassim Jahnke 3e71cf19dc Remove Fix reducedDebugInfo not initialized on client patch
Hasn't been needed for a while now, see #6733
2021-11-30 19:26:33 +01:00
Jason Penilla 721986c9c8 Use correct decompile repo 2021-11-30 19:26:33 +01:00
Nassim Jahnke 658047cb4a Fix adventure patch 2021-11-30 19:26:33 +01:00
Nassim Jahnke cb36d0ecbf Fix view distance api patch 2021-11-30 19:26:33 +01:00
Jason Penilla d3f17db87d java 17 2021-11-30 19:26:33 +01:00
Jason Penilla 67069e1e74 not local snapshot 2021-11-30 19:26:33 +01:00
Jason Penilla 4316c604fb comment out mappings and remove no longer needed patch 2021-11-30 19:26:33 +01:00
Jason Penilla 9c2d52e9c7 Update API patches 2021-11-30 19:26:33 +01:00
Jason Penilla a20239b3d7 start update
jtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhmjtSQzHmItpjAn2nczRhm
2021-11-30 19:26:33 +01:00
Josh Royandzombachu 22aaf91368 Add config option to enable hopper occluding blocks (#6896)
Co-authored-by: zombachu <zombachu@gmail.com>
2021-11-20 14:15:36 -05:00
Josh RoyandJan Tuck 284b3b8dd2 Fix AnvilPrepareEvent not working with zero xp (#6895)
Co-authored-by: Jan Tuck <jan@tuck.dk>
2021-11-20 14:09:19 -05:00
Nassim Jahnke e22a1a9d05 Fix more namespacedkey parsing (#6903) 2021-11-17 10:53:41 +01:00
Jason f3830bc214 Update paperweight to 1.2.0 (#6901) 2021-11-16 21:00:14 -08:00
booky10 51b7b609f1 Add API for resetting a single score (#6873) 2021-11-15 15:08:50 -08:00
Jake Potrebic 555f99d390 cleanup: Add hand to bucket events patch (#6881) 2021-11-15 20:01:19 +01:00
Jake Potrebic 72b731ba6b Updated Upstream (CraftBukkit) (#6885)
Upstream has released updates that appear 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:
20716710 SPIGOT-6790: Mimic structure block behaviour and do not save STRUCTURE_VOID
2021-11-15 19:47:49 +01:00
Jake Potrebic db0bff9c6a Call onRemove logic for breakNaturally (#6854) 2021-11-12 18:28:08 -08:00
Haley Kell f8992ee9b5 Extend Entity by Sound.Emitter (#6890) 2021-11-12 15:58:46 -08:00
Jason 4d6073faff Partially fix #6880 (#6888) 2021-11-12 14:27:26 -08:00
Josh Roy cc2ecbc407 Add Raw Byte Entity Serialization (#6826) 2021-11-10 21:53:27 -05:00
Seggan 3f17694803 Goat ram API (#6336) 2021-11-09 00:48:22 -08:00
Jake Potrebic a923e332ee Make despawn distance configs per-category, improve per category spawn limit config (#6717)
Also adds per-world spawn limit config in paper.yml for `underground_water_creature`, and migrates existing spawn limit config options to their Mojang names.
2021-11-08 23:59:15 -08:00
Owen1212055 87121cef29 Move getTrackedPlayers up from Player to Entity (#6569) 2021-11-08 13:39:42 -08:00
Bjarne Koll 32ba0881e8 Fix setPatternColor on tropical fish bucket meta (#6877) 2021-11-08 11:20:07 -08:00
Jake Potrebic 5af80b0ab8 Add isCollidable methods to various places (#6870) 2021-11-06 12:43:24 -07:00
Jake Potrebic 22b02387c3 Add API for checking if a zombie has the option to break doors (#6855) 2021-11-05 17:17:12 -07:00
Jake Potrebic 124d079dd0 Fix issues with mob conversion (#6831) 2021-11-05 17:06:19 -07:00
HexedHero 29bb5a90ed Add PlayerDeathEvent#getPlayer for clarity (#6859) 2021-11-05 09:30:44 -07:00
Nassim Jahnke c20c9d39d3 Fix CraftNamespacedKey shenanigans (#6825) 2021-11-05 16:01:40 +01:00
Bjarne Koll 70fe58d0a0 Expose the potential player cause of a lightning (#6782) 2021-11-05 15:54:37 +01:00
PaulBGD 06d82e0d6d Cache palette array (#6767)
Instead of allocating the 4KB for every chunk section, cache it locally and
reuse it for other chunk sections to save on allocations. These allocations add
up very quickly when saving chunks frequently.

For example, with 30,000 chunks and 16 chunk sections per chunk (which will
actually get larger in 1.18) it allocates nearly 2GB, which this patch
eliminates entirely.
2021-11-05 15:52:32 +01:00
Nassim Jahnke ada930bf8d Updated Upstream (Bukkit/CraftBukkit) (#6872)
Upstream has released updates that appear 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:
cfd18bd0 SPIGOT-6436: Add Player#stopAllSounds

CraftBukkit Changes:
b58f4299 SPIGOT-6436: Add Player#stopAllSounds
eb191612 SPIGOT-6783: Items do not appear in custom anvil inventories
376edf4f SPIGOT-6779: Fix LivingEntity#attack for Player entities
747a73ec SPIGOT-6772: Use entity mailbox and re-schedule entities if they get unloaded
2021-11-05 15:08:24 +01:00
Jason 6f71b7c4a9 Deduplicate strings in ObfHelper (#6841) 2021-11-04 17:23:06 -07:00
Jake Potrebic 0968cddbcd Move async catches back to where they were (#6869) 2021-11-04 11:20:14 -07:00
Jake Potrebic 09d50a9277 Added missing mappings (#6810) 2021-11-04 07:08:53 -07:00
Jason 485d15ff8f Update paperweight to 1.1.14 (#6868) 2021-11-03 20:50:46 -07:00
Jason 3e310e096c Remove redundant and unneeded repos, reorder repos (#6867) 2021-11-04 02:42:18 +00:00
Jason d9e2817ffd Update paperweight to 1.1.13 (#6866) 2021-11-03 17:54:11 -07:00
Shane FreederandJason Penilla bc43f40f0d Update jline and TCA (#6829)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>

updates jline to 3.21.0, and TCA to 1.3.0
2021-11-02 18:02:16 +00:00
Spottedleaf 3f043f7eb9 Async catch modifications to critical entity state
These used to be here from Spigot, but were dropped with 1.17.
Now in 1.17, this state is _even more_ critical than it was before,
so these must exist to catch stupid plugins.
2021-10-31 21:35:47 -07:00
Jake Potrebic c1b4899e07 Fix dupe uuid check on entity add (#6735) 2021-10-31 15:09:39 -07:00
HexedHero 744dd8ce79 Allow spawners to be disabled without adding a stupid high tick rate (#6837) 2021-10-31 08:51:57 +01:00
Finn Künstner a284e40c70 Updated Upstream (Bukkit/CraftBukkit) (#6848)
Upstream has released updates that appear 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:
9b45fa2f #667: Allow setting BrewEvent results
8c776ddc SPIGOT-6762: ChatPaginator.wordWrap only transfers one modifier
da372966 SPIGOT-4590, SPIGOT-6769: Clarify DamageCause documentation

CraftBukkit Changes:
cef1fda3 #947: Add missing spawn eggs for SpawnEggMeta
eb9a0f34 #945: Allow setting BrewEvent results
2021-10-31 08:34:10 +01:00
Jason 0c351f6793 Update Adventure to 4.9.3 (#6851) 2021-10-31 00:05:16 -07:00
Jason eeb3dea61b [ci skip] Resolve apiAndDocs sources during Javadoc task execution rather than during configuration time (#6836) 2021-10-26 19:45:45 -07:00
Jake Potrebic f2cb9cbd76 Don't fire EntityZapEvent twice (#6830) 2021-10-25 11:54:21 +02:00
sulu5890 20dea64f63 don't attempt to teleport dead entities (#6832) 2021-10-25 11:38:43 +02:00
Nassim Jahnke c66adfb39d Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6823)
Upstream has released updates that appear 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:
58c2d3c7 SPIGOT-6771: Help command tab completion does not respect permissions

CraftBukkit Changes:
fd50041d SPIGOT-6768: Remove upper bound on setFreezeTicks

Spigot Changes:
38929296 SPIGOT-6767: Configurable Thunder Chance
2021-10-24 19:38:23 +02:00
MiniDigger | Martin 87767fd948 Add donation badges and support us section to readme 2021-10-24 19:22:08 +02:00
Alex 2ec6c99152 ci: Update gh actions with caching (#6819) [ci skip]
Closes #6474
2021-10-23 14:07:37 +02:00
Pedro 9472d38f3c Fix method name for Critical damage (#6813) 2021-10-21 15:11:19 +01:00
stonar96andJason Penilla a1f49e4c60 Fix command suggestion leak (#6592)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-10-21 02:15:18 -07:00
Alex 5553432644 docs: Update gradle instructions for Java 16 (#6811) [ci skip]
Closes #6154.
2021-10-21 11:04:17 +02:00
Jason 7a0886180f AT & Mapping fixes (#6809) 2021-10-21 01:16:31 -07:00
Owen1212055 f47aeafe00 Add Horse Animation API (#5599) 2021-10-20 18:09:42 -07:00
Kacper Płażewski bb397ba74c Add critical damage API (#6275) 2021-10-20 18:15:28 -04:00
Jake Potrebic 55ca459515 rename method to getSpawnEgg 2021-10-20 14:41:54 -07:00
BillyGalbreath 9d570042ed Add ItemFactory#getMonsterEgg API (#6772) 2021-10-20 14:35:52 -07:00
syldium 40ee63496c Add advancement display API (#6175) 2021-10-20 15:59:13 -04:00
BillyGalbreath e5f9241d15 Left handed API (#6775) 2021-10-19 20:46:52 -07:00
Bjarne Koll 40057019e0 Correctly inflate villager activation bounding box (#6798) 2021-10-19 20:14:30 -07:00
Jake Potrebic 0a6103597b Get entity default attributes (#6449) 2021-10-19 18:55:05 -07:00
Shane Freeder 589bf2f1bf Upgrade gson to 2.8.8 (Closes #6370) 2021-10-19 15:32:18 +01:00
Shane Freeder 26c37d99d5 create random seeds for features using SecureRandom 2021-10-19 15:25:04 +01:00
Jason eaee7a2473 Use correct LevelStem registry when loading default end/nether (#6789) 2021-10-17 18:10:03 +01:00
Jake Potrebic 72a3175165 Updated Upstream (Bukkit/CraftBukkit) (#6791) 2021-10-17 17:57:00 +01:00
Jake Potrebic a55617d9ce Fix/improve the last upstream update (#6780) 2021-10-16 19:57:05 +01:00
Spottedleaf c1644521c9 Do not overload I/O threads with chunk data while flush saving
If the chunk count is high, then the memory used by the
chunks adds up and could cause problems. By flushing
every so many chunks, the server will not become
stressed for memory. It will also not increase the total
time to save, as flush saving performs a full flush at
the end anyways.
2021-10-16 02:23:07 -07:00
Jake Potrebic 0a16fb8182 Fix merchant inventories not closing on entity removal (#6544) 2021-10-15 20:19:08 -07:00
Spottedleaf fc0e6c7e08 Fix off by one for determining server view distance
It was 1 greater than it should've been. lvar renaming
caused the field viewDistance to be read when it should've
been reading the watchDistance
2021-10-15 19:21:27 -07:00
Hannes Greule 3f2159e43c Unlimited chunk load rate (#6768) 2021-10-15 18:54:46 -07:00
Shane Freeder 5344798579 Clean plugin folder logic in extra-jars patch (Fixes #6347) (#6619) 2021-10-15 22:54:22 +01:00
Shane Freeder 4276013833 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
9590b610 SPIGOT-6749: Library Loader does not correctly isolate dependencies

CraftBukkit Changes:
11c9299f #940: Fixed a NPE during CraftBlockEntityState#update.
960f3109 #937: Fixes related to unplaced BlockStates and the recent world generation changes.
4faf479e SPIGOT-6754: We ignore any still present TileEntity now when we create a BlockState for a block of type AIR.
a72d5404 SPIGOT-6754: Temporarily restore previous behaviour for tile entities with removed blocks

Spigot Changes:
dc75aca8 Remove redundant 'Log null TileEntity Owner' patch
2021-10-15 12:43:19 +01:00
Jason 8575248648 Use ChatRenderer.defaultRenderer() when legacy events have not modified the format (#6104) 2021-10-13 02:00:40 -07:00
Spottedleaf 56e65fd3a7 Null check isApplicable for CraftBlockEntityState#update
If the update call removed the TE, then isApplicable would
have NPE'd.
2021-10-12 13:35:29 -07:00
Jason 54813dbb21 [ci skip] Misc gradle updates (#6763) 2021-10-11 14:31:53 -07:00
Owen1212055 4a0d935cd0 Always allow item changing in EntityFireball (#5493) 2021-10-09 14:04:22 -07:00
Noah van der AaandMadeline Miller cd610df101 Re-readd root/admin user detection (#6703)
* Re-readd root/admin user detection

* I am dum

* Only run id command if needed

* Use ProcessBuilder

* Link to issue

* Rebase

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2021-10-09 19:29:05 +10:00
Jake Potrebic a61827df91 VanillaCommandWrapper didnt account for entity senders (#6586) 2021-10-08 20:44:45 -07:00
Jake Potrebic 523a55c609 Fix loading cmds in datapacks (#6641) 2021-10-08 20:39:59 -07:00
Jake Potrebic 381a1462b3 Fix unplaced block states after new chunk gen API (#6747) 2021-10-08 12:06:28 -07:00
Jakub Žáček b470400d5c Add methods to find targets for lightning strikes (#6712) 2021-10-08 03:00:03 -07:00
Jake Potrebic 975f2e5104 Filter ip address on join if setting is true (#6748) 2021-10-08 09:30:52 +02:00
Noah van der Aa 0d1e18795b Fix kicking ops when whitelist is reloaded (MC-171420) (#6742) 2021-10-07 11:11:15 -07:00
Irmo van den Berge 6dfc0f5cad Add getChangedBlockData() property to BlockPhysicsEvent to expose BlockData (#6743)
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
2021-10-07 20:03:30 +02:00
Noah van der Aa cf4af9fd48 Add config setting for logging player ip addresses. (#6342) 2021-10-07 11:02:40 -07:00
Spottedleaf 3391ccf988 Discard out of bounds chunks during regionfile header recalc
The logic cannot even determine what local chunk they should be,
and out of bounds chunks can only occur from external modifications
to the regionfile.

If regionfile recalculation cannot occur, then do not attempt
to retry read actions.

Fixes https://github.com/PaperMC/Paper/issues/6718
2021-10-07 05:50:38 -07:00
Nassim JahnkeandJason Penilla bfe562224e Fix EntityPortalExitEvent target location
Now uses the proper position and world as well as correct pitch
Fixes #6739

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-10-07 11:05:49 +02:00
Jake Potrebic 7991c4b431 Fix upstream block state factories (#6738) 2021-10-06 21:11:20 -07:00
Jason 8e661c6b6e Deprecate API methods added by 'Close Plugin Class Loaders on Disable' (#6737) 2021-10-06 21:00:32 -07:00
HexedHero a4199412fc Add download link to the /version command (#6482)
* Add download link to /version command

* Change colors
2021-10-06 17:14:03 +02:00
Nassim Jahnke 0cdeeef91f Remove unnecessary Velocity repo from server (#6730) 2021-10-06 11:28:35 +02:00
Jake Potrebic e4d8c47ebf Update adventure and fix command perm serialization NPE (#6729) 2021-10-06 10:05:39 +02:00
Jake Potrebic e155002b31 Fix EntityPortalExitEvent not being called (#5617) 2021-10-05 14:19:27 -07:00
Jake Potrebic d54e8c52bc Support components in command permission msgs (#6676) 2021-10-05 13:52:03 -07:00
Jake Potrebic fdd5c65423 Fix CraftCriteria defaults map (#6723) 2021-10-05 10:24:36 -07:00
Jason a3dfe6dca5 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6722) 2021-10-04 20:14:11 -07:00
Jake Potrebic 90f717fa5a Add missing team sidebar display slots (#6690) 2021-10-04 10:31:26 +01:00
chickeneer 7ebf08a6ad Handle missing Spawn Egg item meta for 1.17 mobs (#6700) 2021-10-04 10:13:19 +02:00
sulu5890 e3ef4987be [ci skip] remove markdown from issue template (#6705)
Some areas of the issue template will not render markdown
2021-10-04 09:35:11 +02:00
Jason b1f0cbdc6c [ci skip] Remove redundant/broken readme badges (#6715)
The sonatype badge only works half the time (currently looks like this: [image](https://i.imgur.com/RGXGTvo.png))

The other removed badges contained mostly redundant or questionably useful/relevant info.
2021-10-04 09:32:57 +02:00
Jason a978f4122a Start console thread after PaperConfig & MinecraftServer.console are initialized (#6716) 2021-10-03 15:12:04 -07:00
Jake Potrebic e14aff9b32 Don't count named piglins and hoglins towards mob cap (#6452) 2021-10-03 18:54:54 +02:00
Jason e39159134f Update paperweight to 1.1.12 (#6653) 2021-10-02 18:42:30 -07:00
Jason bde7b98762 Make legacyRenderer a ViewerUnaware renderer (#6691) 2021-10-02 11:43:03 -07:00
sulu5890 7dd7c0cd9f [ci skip] update issue template to remove checkboxes and add datapacks (#6702)
* Update issue template to remove checkboxes and add datapacks

* capitalize GitHub and Discord
2021-10-02 20:42:35 +02:00
Jake Potrebic cc38c16e75 Updated Upstream (Bukkit/CraftBukkit) (#6638) 2021-10-02 10:21:49 -07:00
sulu5890 e8830b27e3 Revert "Readd root/admin user detection (#6593)" (#6699)
This reverts commit 45c4f90259.
2021-10-02 17:09:50 +02:00
Noah van der Aa 45c4f90259 Readd root/admin user detection (#6593)
* Readd root/admin user detection

* Use original test for Windows, use UID for unix and add co-author

* Move logging and remove unnecessary reader

* try with resources

* Use Windows security identifiers + reduce size of Unix check

* Remove extra newline at the bottom of the message

* Change wording

* Address comments

* Link to Maddy's article

* Use warning log level
2021-10-02 19:34:07 +10:00
Jake Potrebic f905057070 Prevent unintended light block manipulation (#6601) 2021-10-01 13:07:59 +02:00
Nassim Jahnke 826acafb66 Fix plugin provides load order (#6687) 2021-10-01 12:53:24 +02:00
thamid-gamer ebfd70b289 Use null for null resource pack prompts (#6572) 2021-09-30 17:56:22 -07:00
Owen1212055 4a27a4a4d9 Update head rotation in missing places (#5481) 2021-09-30 17:50:00 -07:00
thamid-gamer 00322368c5 Make Levels Use Correct Spawn Settings (#6419) 2021-09-30 17:46:37 -07:00
Lexi 6703c13a8a Preserve overstacked loot (#5943) 2021-09-30 17:39:17 -07:00
Jake Potrebic 6847f5781f Improve ItemStack#editMeta (#6502) 2021-09-30 17:32:25 -07:00
Jake Potrebic 425edfa5d7 More CommandBlock API (#5746) 2021-09-30 14:28:02 -07:00
Jason 3b2b835240 Fix click event when vanilla scoreboard name coloring is enabled (#6652) 2021-09-30 11:33:19 -07:00
Jake Potrebic fce79051cc Option to prevent NBT copy in smithing recipes (#6671) 2021-09-30 11:27:25 -07:00
Jason 8ee9bdd6ff Fix stacktrace deobf where thrownProxy got initialized before rewriting (#6684) 2021-09-30 11:05:51 -07:00
booky10 2b404b0cfa Fix nullability on Block#breakNaturally (#6651) 2021-09-30 10:42:44 -07:00
Jake Potrebic 3e8fb21553 Suggest PlayerPostRespawnEvent if changing player state (#6679) 2021-09-29 11:55:34 -07:00
Jason ce1e7e810a Fix jline relocation (#6677) 2021-09-29 09:34:16 -07:00
Shane Freeder f7e397621a Revert "Legacy data should look for legacy materials (Fixes #6618)" (Fixes #6664)
This reverts commit 0d19cd7241.
2021-09-29 03:17:23 +01:00
Nassim Jahnke 3e3cea1a76 Ensure valid vehicle status (#6673) 2021-09-28 10:24:25 +02:00
Jake Potrebic 6de48dbdda Fix player death kept items not being in same slot (#6663) 2021-09-25 12:06:37 -07:00
Gaider10 d0a2193d4a Fix interaction pos in range check (#6654) 2021-09-24 10:02:14 +02:00
KezzandJason Penilla 397349e0aa Adventure 4.9.1 (#6634)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-09-23 14:07:44 -07:00
Jake Potrebic 1707c10395 fixes cancelling PlayerTradeEvent (#5612) 2021-09-22 21:10:35 -07:00
Jake Potrebic f4f5a76e2a Fix anvil inventory events (#6157) 2021-09-22 15:52:43 -07:00
Bjarne Koll 9460497d71 Apply furnace cook speed multiplier through event (#6378)
Previously the upstream FurnaceStartSmeltEvent would default to the
recipes cooking time, ignoring any modifications from the furnace speed
multiplier.
While this works correctly for upstream, paper introduces the speed
multiplier API, which allows a different cook time from the one provided
by the recipe.

This commit now passes the modified cooktime to the furnace start smelt
event explicitly, instead of allowing the event to default to the
recipes cooking time, thus ensuring that the speed modifier is
respected.

Resolves: #6376
2021-09-22 12:46:15 -07:00
Jake Potrebic caa4780282 Add more component name methods (#6578) 2021-09-22 11:34:40 -07:00
Jake Potrebic 7ac51f9c15 Include slot when constructing the bukkit Attribute Modifiers (#6537) 2021-09-22 10:48:03 -07:00
Jake Potrebic 655cd8f638 Fix upstreams fix for composters and variable hoppers (#6563) 2021-09-22 10:40:45 -07:00
Jake Potrebic 6084ac368f Fix upstream nullability on entity equipment getters (#6519) 2021-09-22 10:23:21 -07:00
Nassim Jahnke aad7d376a8 Fix axolotl/fish persistence
Fixes #6643
2021-09-22 13:40:13 +02:00
Jake Potrebic 9087993feb Mark fish and axolotls from buckets as persistent (#6392) 2021-09-21 21:59:19 -07:00
Jake Potrebic d2c2b7a9be Implement Translatable on villager Profession (#6542) 2021-09-21 21:45:01 -07:00
Maddy Miller f75636b55f [ci skip] Update my name in author field (#6625) 2021-09-20 19:30:04 +10:00
Shane Freeder 0d19cd7241 Legacy data should look for legacy materials (Fixes #6618) 2021-09-17 09:35:02 +01:00
cs8425 0680f4f448 fix per-player-mob-spawns cause total limit cap by Bukkit's spawn limit (#6574) 2021-09-16 17:40:34 -07:00
Jason ce7516d853 Fix global limit display for MISC mob category (#6612) 2021-09-16 14:40:11 -07:00
PureGero 3069eaee04 Fix tick rates map being stored with upper case values instead of lower case (#6587) 2021-09-15 17:03:09 +10:00
Jason 89c648bcd7 Fix log message formatting when classes not owned by plugins use sysout (#6604) 2021-09-14 10:23:56 -07:00
Noah van der Aa 79e52a51bd Don't log if debug logging isn't enabled. (#6603) 2021-09-14 16:44:06 +02:00
Nassim Jahnke 7a59345eb7 Hide feature seeds in Timings 2021-09-14 15:31:45 +02:00
Nassim Jahnke 810d200bb4 Improve interact distance check (#6591) 2021-09-11 22:18:44 +02:00
Nassim Jahnke 06db5d08b0 Updated Upstream (Bukkit/CraftBukkit) (#6589)
Upstream has released updates that appear 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:
44cfe143 SPIGOT-6249: Add Missing Effect Constants

CraftBukkit Changes:
14928261 SPIGOT-6249: Add Missing Effect Constants
332335e1 SPIGOT-6731: "Nag author" message in CraftServer lists one author only
6cd975d0 SPIGOT-5732, SPIGOT-6387: Overhaul Hanging entities
2021-09-11 19:27:48 +02:00
Finn Künstner d060913a61 [ci skip] Fix typos in Paper comments (#6588)
* //Paper -> // Paper

* // Tuiniy -> // Paper
2021-09-11 12:22:51 +02:00
Jason 8a2b23a6a4 Remove method rename and fix reobf for Goal#getFlags (#6528) 2021-09-09 10:12:22 -07:00
Jason 1b383d7e9b Fix VanillaGoals when in reobfuscated environment (#6580) 2021-09-09 09:57:16 -07:00
Spottedleaf c3d50184eb Do not create nether portals that delete undestroyable blocks
Fixes https://github.com/PaperMC/Paper/issues/5773
2021-09-07 15:10:48 -07:00
Shane Freeder 295703efb6 Fixup enderpearl patch 2021-09-07 22:33:28 +01:00
Shane Freeder 310c718ed5 Fix CocaoDecorator causing a crash during generation (Fixes #6028) 2021-09-07 21:41:54 +01:00
Omer Uddin 04324c58b2 Disable enderpearls when they hit non-ticking chunk if disableEnderpearlExploit is enabled 2021-09-07 21:21:31 +01:00
Nassim Jahnke 5960af9d87 Updated Upstream (Bukkit/CraftBukkit) (#6568)
Upstream has released updates that appear 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:
7da4c0be SPIGOT-6729: Add Chunk.isEntitiesLoaded()

CraftBukkit Changes:
9217b523 #929: Call EntityBlockFormEvent for Wither Rose placed by dead entity
757d42ae SPIGOT-6729: Add Chunk.isEntitiesLoaded()
2021-09-06 11:26:47 +02:00
Jason 910a1ff9f7 Add '/paper mobcaps' and '/paper playermobcaps' commands (#6470)
Add commands to get the mobcaps for a world, as well as the mobcaps for
each player when per-player mob spawning is enabled.

Also has a hover text on each mob category listing what entity types are
in said category
2021-09-05 14:29:02 -07:00
Nassim Jahnke 6fa1983e9c Use BlockPost#atY in end portal softlock fix 2021-09-03 20:14:29 +02:00
Noah van der Aa 3562558d62 Prevent softlocked end exit portal generation (#6525) 2021-09-03 20:05:01 +02:00
Nassim Jahnke cc6fd371b2 Remove "Auto fix bad Y levels on player login" patch
Fixes #6357
Closes #6508
Closes #6358
2021-09-03 19:57:21 +02:00
Jake Potrebic 5c7da5536b Prevent an infinite recursion error while rendering translatables (Fixes #6551) (#6555) 2021-09-03 18:01:05 +01:00
Shane Freeder f6a1cb21c5 Do not process entity loads in CraftChunk#getEntities (Fixes #6543)
This re-introduces the issue behind #5872 but fixes #6543
The logic here is generally flawed however somewhat of a nuance,
upstream uses managedBlock which is basically needed to process
the posted entity adds, but, has the side-effect of processing any
chunk loads which has the naunce of stacking up and either causing a
massive performance hit, or can potentially lead the server to crash.

This issue is particularly noticable on paper due to the cumulative efforts
to drastically improve chunk loading speeds which means that there is much more
of a chance that we're about to eat a dirtload of chunk load callbacks, thus
making this issue much more of an issue
2021-09-03 15:55:22 +01:00
Shane Freeder 85ffdc4389 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
6719d1f1 SPIGOT-6708: Fix Experience Orb value not being updated in mend event
2021-09-03 15:43:11 +01:00
Mariell Hoversholm 20903fcf5e docs: drop table of contents; it's built into GH 2021-09-02 08:14:56 +02:00
Mariell Hoversholm a763f258da docs: remove Paper tool method for patch mods
We no longer have the `paper` script around, and as such the docs for it are
stale, and we should remove them.

This additionally adds a tiny note about compilation possibly failing when you
work without a complete patch-set.
2021-09-02 08:14:17 +02:00
SpottedleafandCallum Seabrook 1276bd5039 Fixed layers from V2550 not being added to list (#6541)
Note from Spottedleaf:
Please note that this doesn't fix any problems using dataconverter
because dataconverter does not re-route world gen settings conversion.

Co-authored-by: Callum Seabrook <callum.seabrook@prevarinite.com>
2021-09-01 21:25:25 +00:00
Jake Potrebic f02d3d8989 flattener should try to render custom translations (#6540) 2021-09-01 21:03:00 +00:00
Nassim Jahnke ca708a0944 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6539)
Upstream has released updates that appear 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:
ed7bba95 SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load
d99a585c SPIGOT-6719: Add getTileEntities() to LimitedRegion

CraftBukkit Changes:
422cec08 Rebuild patch
15f27fc7 SPIGOT-6547: Chunk#getEntities() doesn't return all entities immediately after chunk load
cbd747af SPIGOT-6719: Add getTileEntities() to LimitedRegion

Spigot Changes:
6c1c1b26 Rebuild patches
2021-09-01 14:03:36 +02:00
Nassim JahnkeandThonk 30448663+ExcessiveAmountsOfZombies@users.noreply.github.com 7bd7b18811 Configurable feature seeds (#6531)
Co-authored-by: Thonk 30448663+ExcessiveAmountsOfZombies@users.noreply.github.com

Also includes an option to auto-generate random seeds for all features and add them to the config.
2021-09-01 09:54:41 +00:00
Jason 05cb10c56f Add repo for Velocity natives to dev bundle (#6536) 2021-08-31 22:43:25 -07:00
SpottedleafandSpottedleaf a615186502 Remove the old updatingChunks and visibleChunks fields (#6535)
Just in case they cause problems again.

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-08-31 19:33:14 -07:00
Jason 2973e1c56e Always use updatingChunks for saveAllChunks (#6534) 2021-09-01 00:53:56 +00:00
Jason 14be4180f6 Use updatingChunks for flush saving (#6533) 2021-08-31 17:23:22 -07:00
Nassim Jahnke 2cd4bcfba1 Fix distance map contains (#6530) 2021-08-31 12:47:00 +00:00
7d10cdea03 Merge tuinity (#6413)
This PR contains all of Tuinity's patches. Very notable ones are:

- Highly optimised collisions
- Optimised entity lookups by bounding box (Mojang made regressions in 1.17, this brings it back to 1.16)
- Starlight https://github.com/PaperMC/Starlight
- Rewritten dataconverter system https://github.com/PaperMC/DataConverter
- Random block ticking optimisation (wrongly dropped from Paper 1.17)
- Chunk ticking optimisations
- Anything else I've forgotten in the 60 or so patches

If you are a previous Tuinity user, your config will not migrate. You must do it yourself. The config options have simply been moved into paper.yml, so it will be an easy migration. However, please note that the chunk loading options in tuinity.yml are NOT compatible with the options in paper.yml. 

* Port tuinity, initial patchset

* Update gradle to 7.2

jmp said it fixes rebuildpatches not working for me. it fucking better

* Completely clean apply

* Remove tuinity config, add per player api patch

* Remove paper reobf mappings patch

* Properly update gradlew

* Force clean rebuild

* Mark fixups

Comments and ATs still need to be done

* grep -r "Tuinity"

* Fixup

* Ensure gameprofile lastaccess is written only under the state lock

* update URL for dataconverter

* Only clean rebuild tuinity patches

might fix merge conflicts

* Use UTF-8 for gradlew

* Clean rb patches again

* Convert block ids used as item ids

Neither the converters of pre 1.13 nor DFU handled these cases,
as by the time they were written the game at the time didn't
consider these ids valid - they would be air. Because of this,
some worlds have logspam since only DataConverter (not DFU or
legacy converters) will warn when an invalid id has been
seen.

While quite a few do need to now be considered as air, quite a lot
do not. So it makes sense to add conversion for these items, instead
of simply suppressing or ignoring the logs. I've now added id -> string conversion
for all block ids that could be used as items that existed in the game
before 1.7.10 (I have no interest in tracking down the
exact version block ids stopped working) that were on
https://minecraft-ids.grahamedgecombe.com/

Items that did not directly convert to new items will
be instead converted to air: stems, wheat crops, piston head,
tripwire wire block

* Fix LightPopulated parsing in V1466

The DFU code was checking if the number existed, not if it
didn't exist. I misread the original code.

* Always parse protochunk light sources unless it is marked as non-lit

Chunks not marked as lit will always go through the light engine,
so they should always have their block sources parsed.

* Update custom names to JSON for players

Missed this fix from CB, as it was inside
the DataFixers class.

I decided to double check all of the CB changes again:

DataFixers.java was the only area I missed, as I had inspected all
datafixer diffs and implemented them all into DataConverter. I also
checked Bootstrap.java again, and re-evaluated their changes. I had
previously done this, but determined that they were all bad.

The changes to make standing_sign block map to oak_sign block in
V1450 is bad, because that's not the item id V1450 accepts. Only
in 1.14 did oak_sign even exist, and as expected there is a converter
to rename all existing sign items/blocks.

The fix to register the portal block under id 1440 is useless, as
the flattenning logic will default to the lowest registered id - which
is the exact blockstate that CB registers into 1440. So it just
doesn't do anything.

The extra item ids in the id -> string converter are already added,
but I found this from EMC originally.

The change for the spawn egg id 23 -> Arrow is just wrong,
that id DOES correspond to TippedArrow, NOT Arrow. As
expected, the spawn egg already has a dedicated mapping for
Arrow, which is id 10 - which was Arrow's entity id.

I also ported a fix for the cooked_fished id update. This doesn't
really matter since there is already a dataconverter to fix this,
but the game didn't accept cooked_fished at the time. So I see
no harm.

* Review all converters and walkers

- Refactor V99 to have helper methods for defining entity/tile
  entity types
- Automatically namespace all ids that should be namespaced.
  While vanilla never saved non-namespaced data for things that
  are namespaced, plugins/users might have.
- Synchronised the identity ensure map in HelperBlockFlatteningV1450
- Code style consistency
- Add missing log warning in V102 for ITEM_NAME type conversion
- Use getBoolean instead of getByte
- Use ConverterAbstractEntityRename for V143 TippedArrow -> Arrow
  rename, as it will affect ENTITY_NAME type
- Always set isVillager to false in V502 for Zombie
- Register V808's converter under subversion 1 like DFU
- Register a breakpoint for V1.17.1. In the future, all final
  versions of major releases will have a breakpoint so that
  the work required to determine if a converter needs a breakpoint
  is minimal
- Validate that a dataconverter is only registered for a version
  that is registered
- ConverterFlattenTileEntity is actually ConverterFlattenEntity
  It even registered the converters under TILE_ENTITY, instead of
  ENTITY.
- Fix id comparison in V1492 STRUCTURE_FEATURE renamer
- Use ConverterAbstractStatsRename for V1510 stats renamer
  At the time I had written that class, the abstract renamer didn't
  exist.
- Ensure OwnerUUID is at least set to empty string in
  V1904 if the ocelot is converted to a cat (this is
  likely so that it retains a collar)
- Use generic read/write for Records in V1946
  Records is actually a list, not a map. So reading map was
  invalid.

* Always set light to zero when propagating decrease

This fixes an almost infinite loop where light values
would be spam queued on a very small subset on blocks.

This also likely fixes the memory issues people were
seeing.

* re-organize patches

* Apply and fix conflicts

* Revert some patches

getChunkAt retains chunks so that plugins don't spam loads
revert mc-4 fix will remain unless issues pop up

* Shuffle iterated chunks if per player is not enabled

Can help with some mob spawning stacking up at locations

* Make per player default, migrate all configs

* Adjust comments in fixups

* Rework config for player chunk loader

Old config is not compatible. Move all configs to be
under `settings` in paper.yml

The player chunk loader has been modified to
less aggressively load chunks, but to send
chunks at higher rates compared to tuinity. There are
new config entries to tune this behavior.

* Add back old constructor to CompressionEncoder/Decoder (fixes
 Tuinity #358)

* Raise chunk loading default limits

* Reduce worldgen thread workers for lower core count cpus

* Raise limits for chunk loading config

Also place it under `chunk-loading`

* Disable max chunk send rate by default

* Fix conflicts and rebuild patches

* Drop default send rate again

Appears to be still causing problems for no known reason

* Raise chunk send limits to 100 per player

While a low limit fixes ping issues for some people, most people
do not suffer from this issue and thus should not suffer from
an extremely slow load-in rate.

* Rebase part 1

Autosquash the fixups

* Move not implemented up

* Fixup mc-dev fixes

Missed this one

* Rebase per player viewdistance api into the original api patch

* Remove old light engine patch part 1

The prioritisation must be kept from it, so that part
has been rebased into the priority patch.
Part 2 will deal with rebasing all of the patches _after_

* Rebase remaining patches for old light patch removal

* Remove other mid tick patch

* Remove Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch

Replaced by `Do not copy visible chunks`

* Revert AT for Vec3i setX/Y/Z

The class is immutable. set should not be exposed

* Remove old IntegerUtil class

* Replace old CraftChunk#getEntities patch

* Remove import for SWMRNibbleArray in ChunkAccess

* Finished merge checklist

* Remove ensureTickThread impl in urgency patch

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-08-31 04:02:11 -07:00
Nassim JahnkeandJason Penilla 7ff0a9ba19 [ci skip] Update contributing guidelines (#6497)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-08-30 17:18:45 -07:00
HexedHero f99119eb81 Add MaterialTags for raw ores and raw ore blocks (#6516) 2021-08-30 14:55:11 +00:00
Jason 4597516406 Undeprecate Enchantment#isCursed (#6524) 2021-08-30 16:49:28 +02:00
Jason 6e9f38ea91 [ci skip] Cleanup Timings v2 diff (#6523) 2021-08-30 00:02:24 -07:00
Jason cf27619809 Log error for invalid entity-per-chunk-save-limit configs (#6522) 2021-08-29 21:19:43 -07:00
Maddy Miller ba1773373c Fix poor action helpers API name (#6518) 2021-08-29 17:20:14 +10:00
Maddy Miller 785bee00eb Add helpers for left/right hand to Action (#6517)
* Add helpers for left/right hand to Action

* Diff starts here technically
2021-08-29 16:29:36 +10:00
Nassim Jahnke be269d1cf0 Move ProtoWorld methods to LimitedRegion (#6486) 2021-08-28 13:43:26 +00:00
Nassim Jahnke 2d78bb5776 Updated Upstream (Bukkit/CraftBukkit) (#6513)
Upstream has released updates that appear 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:
ea7b3a0d #654: Clarify conditions where a bed can explode

CraftBukkit Changes:
e167f280 SPIGOT-6726: NPE when calling getBossBar() on plugin spawned EnderDragon
2021-08-28 14:45:14 +02:00
Jason 411a5eed18 Fix and optimize legacy world conversion (#6473)
CraftBukkit breaks legacy world conversion in three ways:
- Writes userdata to the path of the userdata folder rather than to
  the correct file inside the aforementioned folder. This causes the
  userdata folder to fail to be created as a file already exists at
  its path.
- Makes changes to how multiworld works, without modifying
  McRegionUpgrader to be aware of these changes.
- Calls methods on Bukkit before the server is initialized.

This patch fixes all of these issues, and also threads the
McRegionUpgrader to improve performance.
2021-08-27 22:07:12 -07:00
SpottedleafandSpottedleaf 1c4f87a258 Ensure priority updates are determined by current level, not deferred level (#6507)
* Ensure priority updates are determined by current level, not deferred level

Deferral could cause an infinite loop to occur.

Also, re-add the light engine priority logic.

* Rebase

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-08-27 19:20:31 -07:00
Owen1212055 159112ef41 Add Missing Entity API: Cat (#5744) 2021-08-27 18:16:41 +00:00
Nassim Jahnke f44d237de9 Updated Upstream (CraftBukkit) (#6504)
Upstream has released updates that appear 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:
5be41fb8 SPIGOT-6720: Fix bed explosion checks
09b99daf SPIGOT-6722: Close entity manager when unloading world
3a9561bf SPIGOT-6686: Changes in MaximumRepairCost for Anvil Rename cause inconsistency
2021-08-27 11:51:18 +02:00
Jake Potrebic 08f746f5f0 Remove unneeded @ throws from team javadocs (#6491) 2021-08-26 12:56:31 -07:00
Jake Potrebic 8b793ed52c [ci skip] Remove this file that got created somehow (#6489) 2021-08-26 09:49:32 -07:00
Jason 0205b902c2 [ci skip] Cleanup diff in Async command map building (#6492) 2021-08-26 09:41:22 -07:00
Nassim Jahnke 0a6d320410 Sanitize ResourceLocation error logging (#6495) 2021-08-26 10:25:23 +00:00
SpottedleafandSpottedleaf e763a3dc95 Log when the async catcher is tripped (#6493)
The chunk system can swallow the exception given it's all
built with completablefuture, so ensure it is at least printed.

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-08-25 20:35:35 -07:00
Spottedleaf ba4cf68774 Readd chunk priority patch, including many chunk system fixes from tuinity (#6488) 2021-08-26 02:16:27 +00:00
Jason 3773df24ce Vanilla command permission fixes (fixes #6085) (#6490)
Fixes permission checks for vanilla commands which don't have a
requirement, as well as for namespaced vanilla commands.
2021-08-25 15:20:24 -07:00
Jason b4ef78556c Use configured no permission message in PaperCommand (#6484) 2021-08-25 13:34:15 -07:00
Nassim Jahnke 789bc79280 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6457)
Upstream has released updates that appear 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:
c9a46ebf #653: Add World#spawn with randomizeData parameter
e49c2e3a Damageable should extend ItemMeta
01ff04f4 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
ca5b4b1a SPIGOT-6697: Deprecate generateTree with BlockChangeDelegate as it does not handle tiles

CraftBukkit Changes:
7c8bbcbe SPIGOT-6716: Preserve the order of stored enchantments of enchanted books.
18027d02 #914: Add World#spawn with randomizeData parameter
3cad0316 SPIGOT-6714: Don't fire PlayerBucketEvent when empty
8c6d60cf Fix server crash with BlockPopulator when entities are at a negative chunk border
4f6bcc84 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
78d5b35b SPIGOT-6697: Restore generateTree with BlockChangeDelegate behaviour
15792f0d Rebuild patch
c949675e SPIGOT-6713: Cancelling EntityTransformEvent Causes Deceased Slimes To Not Despawn
a955f15c Fix issues with new ChunkGenerator API
a0a37f41 SPIGOT-6630: Replacing an enchantment on an item creates a conflict error

Spigot Changes:
b166a49b Rebuild patches
3c1fc60a SPIGOT-6693: Composters only take in one item at custom hopper speeds
2021-08-25 09:59:26 +02:00
Jake Potrebic 61a09c5102 Add BlockBreakBlockEvent (#4989) 2021-08-25 01:42:23 +00:00
Jason ff3f449b33 Squash "Clear SyncLoadInfo" into "Add debug for sync chunk loads" and add tab completion for the clear argument (#6483) 2021-08-24 16:45:40 -07:00
Jake Potrebic b74e691256 [ci skip] clean up diff from 1.17 update (#6462) 2021-08-24 23:30:26 +00:00
Jason ba80255df9 Add GLOW_SQUID and AXOLOTL to WATER_BASED Tag (#6481) 2021-08-24 15:52:10 -07:00
Pedro 182f56cdd5 Fix bed explosions in custom worlds (#6345) 2021-08-24 20:03:58 +00:00
Jake Potrebic 98fa136099 Fix CB lib relocation (#6454) 2021-08-22 17:22:57 +00:00
Jake Potrebic b37fbbca3d Add API to change EnderEye target without other nonsense (#6460) 2021-08-22 15:19:42 +00:00
Jake Potrebic 4b7fa94010 Prevent NPE when removing enchantment with no ItemMeta (#6459) 2021-08-22 15:13:51 +00:00
Jake Potrebic cf037fbd3e Better docs for PlayerGameModeChangeEvent (#6461) 2021-08-22 15:10:33 +00:00
Maddy Miller 49c7564283 Fix BlockPistonRetractEvent firing multiple times (#6467) 2021-08-22 23:54:55 +10:00
MiniDigger | Martin 18284cdf66 Fix Mob Goal Leak (#6394) 2021-08-22 14:19:45 +10:00
Octavia Togami e25557464f Replace ThreadLocal with ConcurrentHashMap in CommandSourceStack (#6325)
This object is created so often that it likely creates problems with the
ThreadLocalMap because the weak references can't be cleaned up fast
enough. This has manifest as lag seemingly caused by WorldEdit:
https://github.com/EngineHub/WorldEdit/issues/1668
2021-08-22 03:45:40 +00:00
Mariell Hoversholm 2406634ed8 Add timeout & interval to sysout catcher (#6383) 2021-08-21 17:01:42 +02:00
Bjarne Koll 5edda39cc5 Add deepslate as xray engine 2 replacement default (#6362)
Fixes: #6350
2021-08-21 14:34:58 +00:00
Noah van der Aa 0b46fb1e5a Respect despawn rate in merge check (#6428) 2021-08-21 14:32:07 +00:00
Jake Potrebic 18d1602724 Add API to send game events (#6444) 2021-08-21 14:26:42 +00:00
petersv5 ccbb51078a Fix entities glitching through blocks pushed by pistons (#6308)
Fixes #5189
2021-08-21 14:15:29 +00:00
HexedHero aae9a2351b Add note about EntityMoveEvent not firing for players (#6406) 2021-08-21 13:53:01 +00:00
Jason 59d449d880 Set AsyncAppender dispatch thread to be a daemon thread (#6424) 2021-08-18 18:47:29 +00:00
Jason 6f14ff9f6d [ci skip] Bump paperweight to 1.1.11, update Gradle wrapper script (#6421) 2021-08-18 13:34:52 -05:00
Jason fa184f7429 Setup dev bundle publishing (#6163) 2021-08-17 17:11:04 -05:00
Shane Freeder f2471d20b4 Do not fire PlayerBucketFillEvent when no fluid (Fixes #4611) 2021-08-17 15:43:01 +01:00
Jake Potrebic 6dfd1d9a71 Fix yaw on player spawn (#6409) 2021-08-16 14:46:25 -07:00
Noah van der Aa 934c694efd Don't fire entitymovevent for players. (#6402) 2021-08-15 18:37:42 +01:00
Jake Potrebic 72ce684679 Fix possible divide by 0 error with cursor updates (#6398) 2021-08-14 17:44:31 +00:00
Shane Freeder 8d182e8639 Revert "Revert "Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)""
This reverts commit 622598f1dd.
2021-08-14 15:29:22 +01:00
Shane Freeder 622598f1dd Revert "Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)"
This reverts commit aa52bf9e33.
2021-08-14 15:22:21 +01:00
Shane Freeder aa52bf9e33 Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)
Mojang made some changes to priorities in 1.17 and it seems that these changes
conflict with the changes made in this patch, which in some cases appears to
cause excessive rescheduling of tasks.

This, however, is not confirmed as such but seems to be the behavior that we're
seeing to cause this issue, if mojang has adopted the changes we suggested,
then a good chunk of this patch may be unneeded, but, this needs a much better
look than I'm currently able to do
2021-08-14 14:55:55 +01:00
Jason 565cd3306c [ci skip] Add some helper methods to the ObfHelper util class (#6374) 2021-08-14 10:06:17 +00:00
Jason 4dd33cb8b6 [ci skip] Drop "Fix CME on adding a passenger in CreatureSpawnEvent" (#6384)
This is no longer needed as Entity#passengers is an ImmutableList as of 1.17
2021-08-14 03:01:07 -07:00
Jake Potrebic f12a7f57e1 Clear bucket NBT after dispense (#6391) 2021-08-14 02:51:03 -07:00
Jake Potrebic c2f47a76ae Implement Translatable in appropriate places (#6248) 2021-08-13 21:11:12 -07:00
Jason e9aa9ce66b Add config migration for named entity death logging option (#6390) 2021-08-13 13:24:25 -07:00
Warrior 591cac3685 Configurable item frame map cursor interval (#6385) 2021-08-13 12:14:44 -07:00
Jake Potrebic ce43ce8265 Make EntityUnleashEvent cancellable (#4993) 2021-08-13 11:15:43 -07:00
Jake PotrebicandJason Penilla e942509e73 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6379)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-08-13 10:08:34 -07:00
Jason 80836709e7 Fix block drops position losing precision millions of blocks out (#6387) 2021-08-12 21:46:55 -07:00
Andrew Steinborn 370b60de14 Optimize indirect passenger iteration (#6366) 2021-08-12 15:55:41 -07:00
Jake Potrebic 8c2adf8e9e Add warning to getOfflinePlayers (#6365) 2021-08-12 22:38:25 +00:00
Jason 4d9b14efa4 Use AsyncAppender instead of AsyncLoggerContextSelector to keep loggging IO off main thread (#6381) 2021-08-12 10:55:20 -07:00
Shane Freeder fdef125b19 Expose EntityType#getTranslationKey 2021-08-11 06:12:57 +00:00
Jason Penilla 5c65546f5c rebase 2021-08-11 07:01:11 +02:00
Mariell Hoversholm 37df95b189 refactor: do not import List; use FQN
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-08-11 07:01:11 +02:00
Mariell Hoversholm 415f7ca165 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
e0598aa2 SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter

CraftBukkit Changes:
2cdc6b1e4 SPIGOT-6692: Add sendSignChange overload with a hasGlowingText parameter
2021-08-11 07:01:11 +02:00
Jake Potrebic 80650e8936 Added EntityItemDamageEvent (#4928) 2021-08-10 05:04:44 +00:00
Jason 25cd8aba9f Config option for Piglins guarding chests (#4829) 2021-08-10 02:13:58 +00:00
Jason 399710ff79 Add reobf mappings patch for MinecraftServer#getLootTables (#6368) 2021-08-09 17:05:12 -07:00
Andrew Steinborn bfb3d42b44 Optimize entity tracker passenger checks (#6361)
When a ServerEntity instance is first constructed, it uses a pre-Java 9 empty collection,
but passengers use Guava ImmutableList. When comparing the two collections via Object#equals
we miss out on an opportunity to reduce the check to little more than a reference equality
check (which is very fast).
2021-08-09 11:36:45 -07:00
Bjarne Koll b33b63908e Support complex components in written book builder (#6337)
The previously existing toBuilder method defined on the CraftMetaBook
would, no matter if called on a writable or written book, return a
builder targetting a writable book, in which complex components, such as
hover or click text are not allowed.

The builer hence serializes the page components using LEGACY_UXRC to
ensure only colour may be passed. While this works as intented for
writable books, the builder fails to fully support the complex
components that may be used in a written book.

This commit implemements a child class of the CraftMetaBookBuilder, the
CraftMetaBookSignedBuilder, which builds to a CraftMetaBookSigned
instance and hence serializes the pages to json.
This builder instance is automatically supplied when calling toBuilder
on a CraftMetaBookSigned instance.

Resolves: #6296
2021-08-08 15:57:20 -07:00
Jake Potrebic f261419fd5 clone itemstack to return remaining stack (#6353) 2021-08-06 23:55:16 -07:00
Jake Potrebic 4a2f53c6e8 Add missing DamageCause for EntityDamageByBlockEvent (#6352) 2021-08-07 06:03:50 +00:00
Jake Potrebic a178fb895e Make hoppers respect inventory max stack size (#4838) 2021-08-07 00:35:42 +00:00
Kacper Płażewski 9b4a46f704 [ci skip] add vs code files to .gitignore (#5663) 2021-08-07 00:27:45 +00:00
Jake Potrebic 00028d57cf call EntityDamageByBlockEvent for campfires (#6244) 2021-08-07 00:20:39 +00:00
Jake Potrebic 23e3a0ccb6 Add PlayerSetSpawnEvent (#5690) 2021-08-06 20:37:38 +00:00
thamid-gamer 9a125eecb8 Fix Incorrectly Typed Goals (#6200) 2021-08-06 17:05:53 +00:00
Noah van der Aa c815948b6d Fix ITEM_DROPPED stat not working properly (#6331) 2021-08-06 16:46:25 +00:00
Mariell Hoversholm 020f18aaa6 fix: promote slf4j-api to api scope (#6343)
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-08-06 18:01:18 +02:00
Shane Freeder f521a18a17 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
75a0ee4f SPIGOT-6691: Material.LAVA_CAULDRON is not Levelled

CraftBukkit Changes:
e1c96e50 SPIGOT-6682: Blocking with shield not reset after die
97f629b6 SPIGOT-6220: Structures in the world with custom generator not work
85379258 Increase outdated build delay
f7f8dce4 SPIGOT-6552: Some inventory types reset cursor on switch
2021-08-04 16:26:56 +01:00
Prof-Bloodstone d239eca9dd Fix writing server.properties with wrong encoding (#6322)
Fixes #6321
2021-08-04 00:48:15 -07:00
Shane Freeder 6226208d64 Fix SysoutCatcher when plugins log before initialisation (Fixes #6323) 2021-08-04 04:04:12 +01:00
Mariell Hoversholm 9a74e70cc0 fix: boats' bounding boxes must be deflated, not inflated (#6314)
Fixes GH-6312.

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-08-03 12:13:43 +02:00
Emilia Dreamer aec9781f52 Fix incorrect colors in ConsoleCommandSender messages with TranslatableComponents (#6287) 2021-08-03 07:48:34 +00:00
Prof-Bloodstone 0fc6213f9c Allow skipping writing of comments to server.properties (#6251)
Makes less git noise, as it won't update the date every single time

Use -DPaper.skipServerPropertiesComments=true flag to disable writing it
2021-08-03 00:35:02 -07:00
Noah van der Aa 6e7f9aafd6 Prevent AFK kick while watching end credits (#6239). (#6265) 2021-08-02 08:43:56 +00:00
Hannes Greule 0e978ea45e Rewrite LogEvents to contain information about the source jar of stacktrace elements (#6142) 2021-08-02 10:32:53 +02:00
Nassim Jahnke 8c28a33d4e Don't not shuffle visible chunks (#6283) 2021-08-02 10:00:31 +02:00
Underscore11 a44f486694 Allow plugins to use Log4J to log (#6288) 2021-08-02 09:57:31 +02:00
ChristopheG 112b6a508a Add force getter to ParticleBuilder (#6300) 2021-08-02 09:51:55 +02:00
Underscore11 ed1dc272e6 Add System.out.println catcher (#6278) 2021-08-02 07:07:48 +00:00
Shane Freeder 6855505490 Fix some inconsistency issues with empty map items (#6304) 2021-08-01 16:55:25 +01:00
Shane Freeder 8bebf48495 Mark sensor and behavior timings as verbose 2021-08-01 10:22:55 +01:00
Kyle Wood eaadb4a68f Fix Java toolchain configuration to work on arm macOS 2021-08-01 02:55:02 -05:00
PaulBGD 81a7559b41 Correct handling of invalid maps (#6302) 2021-07-31 22:47:01 +02:00
Frank van der Heijden 0aa3cc7228 Suppress deprecation registration warnings for brigadier events (#6297) 2021-07-31 07:59:22 +02:00
Nassim Jahnke 7a5025d461 Fix closeInventory shenanigans (#6292) 2021-07-30 11:37:11 +02:00
Finn Künstner e4ecf6ce87 [ci skip] Fix various compile warnings (#6264) 2021-07-29 23:04:26 +00:00
Owen1212055 a67959e131 Add bee stinger API (#5962) 2021-07-29 00:36:53 +00:00
Gergely Sarkozi 7480b94720 fix empty array elements in command args (#5778) 2021-07-28 18:37:32 +00:00
Jason 321dd1d655 Update paperweight to 1.1.9 (#6284) 2021-07-28 02:00:41 -07:00
Nassim Jahnke 0e230a1bee Updated Upstream (CraftBukkit) (#6279)
Upstream has released updates that appear 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:
6788550f SPIGOT-6678: ChunkSnapshot#isSectionEmpty() not working as intended.
3ad0fb1c #901: Fix PlayerStatisticIncrementEvent spam
2021-07-28 09:39:14 +02:00
Jason b32a3b147c Call EntityKnockbackByEntityEvent for RamTarget Behavior (#6273) 2021-07-26 18:41:26 +02:00
MeFisto94 efd7e5182c Move "use-display-name-in-quit-message" to settings namespace (#6257) 2021-07-25 23:11:44 +00:00
Max Lee 2f1f1b7f0c Add config option to specify timings url (#6256) 2021-07-25 07:10:30 +00:00
TwoLeggedCat e905eb1986 Add fireball to default max load config (#6252) 2021-07-25 07:00:54 +00:00
Max Lee 9b0a0d896c Add the default tick rate of the sensor to the timings (#6242) 2021-07-25 06:50:36 +00:00
Shane Freeder 9a0263e2ac Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
aa69d1cf Only remove tile entity if block type changes
2021-07-24 04:44:04 +01:00
Jake Potrebic 9b828509cd Updated Upstream (CraftBukkit) (#6260) 2021-07-24 03:33:05 +01:00
Jake Potrebic b173db6231 Fix flat bedrock (#6255) 2021-07-23 14:18:10 -07:00
Jake Potrebic 170382fe35 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6245)
Upstream has released updates that appear 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:
e7b0f8d6 #642: Add Crafting methods to API
9e58831e SPIGOT-6641: Use varargs in sendMessage
e409fe49 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled
6997c726 SPIGOT-6661: Fix missing radius from GenericGameEvent
02d03f35 SPIGOT-6369: Add ItemStack to HangingPlaceEvent

CraftBukkit Changes:
0abf420c SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin
e8e3cbcc #893: Add Crafting methods to API
879acfee Fix missing varargs from previous commit
6572b9c3 SPIGOT-6641: Use varargs in sendMessage
9e06bb2a SPIGOT-6663: Chicken Jockeys chickens don't despawn
699f2d36 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled
8ffa54ba SPIGOT-6369: Add ItemStack to HangingPlaceEvent
c851639c SPIGOT-6645: Call EntityChangeBlockEvent before PlayerHarvestBlockEvent
8d244b0b SPIGOT-3725, SPIGOT-6638, MC-136917: Properly clear tile entities before replacing

Spigot Changes:
18c71bf4 Rebuild patches
2021-07-22 18:11:56 +00:00
Jake Potrebic 3801a3951c Add ItemRarity test (#6247) 2021-07-22 06:48:24 +02:00
Jake Potrebic 2961b2adab Fix various mob drops being captured as death drops (#5675) 2021-07-22 02:58:24 +00:00
Jake Potrebic b854e7e802 Drop unneeded patch (#6240) 2021-07-21 18:18:54 +00:00
Nassim JahnkeandJason Penilla 2780e94901 Fix PaperTickList (#6241)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-07-21 19:12:24 +02:00
Jason 44516b1d8a [ci skip] Put mappings util in a separate class to the stacktrace deobfuscator (#6230) 2021-07-19 19:22:18 -07:00
Kyle Wood f25facb302 Update email & name (DenWav)
Also I think I prefer my few tiny patches to be GPL.
2021-07-19 21:07:53 -05:00
zml c225bf97d6 Fix book title and author being improperly serialized as components (#6190)
They are kept as plain strings
Additional validation has been added to prevent invalid books from being
sent to the client.
2021-07-19 23:11:06 +00:00
Nassim JahnkeandJason Penilla c75a8378a2 Don't expose ASM in API (#6229)
ASM was not meant to exposed to API consumers in the first place, and for the duration of time it has been exposed, it has also been relocated.

Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
2021-07-19 22:58:48 +00:00
Nassim Jahnke fc478727d5 Use mapped names for sensor and behavior timings/config (#6228) 2021-07-19 11:07:49 +00:00
Max Lee 12942dc94b Add rate options and timings for sensors and behaviors (#6027) 2021-07-19 11:47:33 +02:00
Max Lee d6c81c8189 Don't apply cramming damage to players (#5903) 2021-07-19 09:31:03 +00:00
thamid-gamer b79bc31d30 Fix MerchantOffer BuyB Only AssertionError (#6206) 2021-07-19 09:16:53 +00:00
Jason bc127ea819 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6222)
Upstream has released updates that appear 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:
eec4aab0 SPIGOT-6657: Add getPlayer to SheepDyeWoolEvent
205213c6 SPIGOT-6656: CauldronLevelChangeEvent is not fired correctly when dripstone fills the cauldron

CraftBukkit Changes:
b8c522d5 SPIGOT-6657: Add getPlayer to SheepDyeWoolEvent
f04a77dc SPIGOT-6656: CauldronLevelChangeEvent is not fired correctly when dripstone fills the cauldron
d1dbcebc SPIGOT-6653: Canceling snow bucket placement removes snow from bucket
4f34a67b #891: Fix scheduler task ID overflow and duplication issues

Spigot Changes:
d03d7f12 BUILDTOOLS-604: Rebuild patches
2021-07-18 09:41:53 +02:00
Nassim Jahnke 8f949511b8 Revert "Fix PaperTickList" (#6216)
This commit reverts https://github.com/PaperMC/Paper/commit/a5acf367a37549ea3b7cb0eb8c0115973d0c58de
2021-07-17 21:57:00 +02:00
Nassim Jahnke b1cdc1274c Fix block action handling (#6213) 2021-07-17 12:46:46 +00:00
Jake Potrebic 7f89e96357 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6209) 2021-07-17 02:48:27 +01:00
Jake Potrebic a5acf367a3 Fix PaperTickList (#6191) 2021-07-16 09:18:04 -07:00
Jake Potrebic 5a9c14bace Fix distanceSq check on block breaking (#6195) 2021-07-16 03:01:48 +00:00
Jake Potrebic b41b5b5c7e Catch desynced block breaks (#6193) 2021-07-15 23:00:58 +00:00
Jake Potrebic 2e3797945c Use cause and cancel component in PlayerGameModeChanteEvent (#6192) 2021-07-15 21:44:59 +00:00
LemonCaramel 377a60db07 Fix Stonecutter #6180 issue (#6181) 2021-07-14 08:37:22 -07:00
sulu5890 990f7daeb7 Fix incorrect message for outdated clients (#6160) 2021-07-14 02:49:38 +00:00
Shane Freeder b015abb952 Fix missing annotation 2021-07-13 19:15:18 +01:00
Shane Freeder 664eee6e13 Expand resource pack API 2021-07-12 20:42:17 +01:00
Jason 40b34615b0 [ci skip] Use commit timestamp instead of build time in manifest (#6161) 2021-07-12 06:24:48 +00:00
Jake Potrebic 70ea1b2e2b Fix command signs (#6139) 2021-07-11 18:06:49 +00:00
Jake Potrebic 55d5c1650f Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6149)
Upstream has released updates that appear 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:
17c35d6e SPIGOT-6637: Revert "#636: Add FurnaceStartSmeltEvent"
4b27230b SPIGOT-6623: Missing API reasons for entity freezing
e1528c85 #636: Add FurnaceStartSmeltEvent

CraftBukkit Changes:
a6292cc3 SPIGOT-6637: Revert "#874: Add FurnaceStartSmeltEvent"
f4066854 SPIGOT-6579: DragonFireBall movement with setDirection jumps around a lot
9add952b SPIGOT-6623: Missing API reasons for entity freezing
2ea359f1 #874: Add FurnaceStartSmeltEvent
be8d625e SPIGOT-5560, SPIGOT-6574, SPIGOT-6632: Remove no longer needed tile entity fix

Spigot Changes:
eac3cd96 Rebuild patches
2021-07-11 09:01:29 +02:00
Jake Potrebic a4880d832b Fix NPE from using wrong ProtoChunk ctor (#6147) 2021-07-10 20:17:47 +00:00
Jake Potrebic d985976b3e Add config for mobs immune to default effects (#4835) 2021-07-10 04:49:49 +00:00
Jake Potrebic 871f30038e fixed kick event leave message (#4766) 2021-07-09 19:03:28 +00:00
kennytv 0aa0a1d973 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
b5d7883a SPIGOT-6634: Override needed method
99561c21 SPIGOT-6624: Explosions do not destroy blocks out of vanilla heights in custom dimensions
2021-07-09 16:20:40 +02:00
Jake Potrebic d770f71f41 Add PlayerArmSwingEvent (#5353) 2021-07-09 13:56:30 +00:00
Xemorr 23d887b2a6 Swapped out Vec3#distanceTo call with a Vec3#distanceToSqr call to remove calls to Math.sqrt 2021-07-09 15:35:18 +02:00
Jake Potrebic 5ff90b9381 Fix collisions during world generation (#6129) 2021-07-09 03:16:57 -07:00
Jason 20ff0b058c [ci skip] Add a test plugin (#6133) 2021-07-09 03:04:33 -07:00
Jason 416ec98982 [ci skip] Remove extra newlines at EOF (#6127) 2021-07-08 18:40:24 -07:00
Bjarne KollandJake Potrebic 79d7dfbbe5 Ensure shulker bounding box is updated (#6010)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-07-08 18:18:32 -07:00
Pedro ArenasandOlivia d8ad276b7d [ci skip] More badges and things to README.md (#5338)
* Update README.md

* Update README.md

Remove license badge and fix letters

* Update README.md

* Update README.md

Many many time in this PR... now pass to java 16

* Update README.md

Add discord badge

* Update README.md

Fix format

* Update README.md

Change url to patches (because Spigot-API-Patches change)

* Update README.md

* Update README.md

Apply suggest url to patches

Co-authored-by: Olivia <chew@chew.pw>

* Update README.md

Update paper version from 1.17 to 1.17.1

* Update README.md

A better badge for discord (IRC not have a custom badge or any...)

* Update README.md

Update style.

Co-authored-by: Olivia <chew@chew.pw>
2021-07-08 16:41:46 +02:00
Jake Potrebic bb44da8420 Fix cancelling EntityPickupItemEvent for villagers (#6091)
Remove's Billy's fix as upstream implemented a (broken) fix and then fixed their fix
2021-07-07 11:07:38 -07:00
Nassim Jahnke 351a2c38b5 Drop no longer needed patch (#6115) 2021-07-07 19:18:05 +02:00
MD 648f6078d7 Route sign run_command click events through normal chat logic (#6109)
This patch changes sign command logic so that `run_command` click events are routed through the standard chat/command
logic used for inbound chat messages.

This fixes numerous issues related to sign click commands:
  - Signs with a `run_command` value of "/<plugin command>" would fail and show the "Unknown command" warning. This
    prevents usage of commands like `//wand` from WorldEdit in sign click events entirely and requires users to drop
    the leading slash from other plugins' commands. This patch now executes the plugin commands as would be expected,
    adding a leading slash if necessary.
  - Signs with a `run_command` value that doesn't match an existing command could fail silently. This patch causes
    these to *always* show "Unknown command" instead.
  - Plugins listening to `PlayerCommandPreprocessEvent` would not be able to intercept any command executions from
    sign click events. This patch allows plugins to intercept player commands when fired by a click event, in the same
    manner as commands executed by the player typing or clicking on a chat message.
  - Commands executed from signs would not be logged to the console. This patch fixes this.

This patch also prepends a leading slash if the `run_command` value lacks one, which matches vanilla behaviour (old
code would strip this slash away) while also ensuring `PlayerCommandPreprocessEvent#getMessage` remains consistent
with other command executions from chat (which always include the leading slash).
2021-07-07 15:12:58 +00:00
KennyTV dafc06460e Fix MobEffectArgument#getEffect reobf 2021-07-07 15:54:43 +02:00
Jason 4aef0354dd [ci skip] Use Java toolchain for run tasks (#6108) 2021-07-07 06:18:02 -07:00
Malfrador 144e5f7ac6 Add option for logging named entity deaths (#6107) 2021-07-07 06:15:17 -07:00
dfsek b5be382d00 Add methods to ProtoWorld for working with BlockStates (#5929) 2021-07-07 10:23:16 +00:00
Jason 5059ada8d7 Move log message for named entity deaths into correct location (#6105) 2021-07-07 03:04:34 -07:00
Jason f8d6cbdfe5 Deobfuscate stacktraces in sync load info (#6103) 2021-07-07 00:19:08 -07:00
Nassim Jahnke 56fd1a2f84 Update to Minecraft 1.17.1 (#6097) 2021-07-07 06:52:40 +00:00
Jake Potrebic a831634d44 add Optimize Light Engine patch (#5863) 2021-07-06 04:30:39 +00:00
chickeneer 6ea4da4a68 AbstractSkeleton should extend RangedEntity (#6087)
This includes Strays and matches the mojang RangedAttackMob
2021-07-06 03:48:08 +00:00
Jason 8827886501 Add back linking to Adventure Javadoc (#6088) 2021-07-05 20:25:23 -07:00
Jake Potrebic 8fe561162e Fix Player#playerListName nullability annotation (#6089) 2021-07-06 03:22:11 +00:00
Jason cc063e1f09 Fix incorrect variable usage in per-player mob spawning patch (#6077) 2021-07-04 17:30:59 +01:00
Jason 2641b91350 Also deobfuscate secondary stacktraces in crash reports (#6078) 2021-07-04 03:20:11 -07:00
Jason 02fbcbcc0d Add reobf mappings patch for LevelChunk#level (CraftBukkit changes type) (#6079) 2021-07-04 03:19:48 -07:00
Jason 6fd9275867 Fix Bossbar updating (closes #6061) (#6076) 2021-07-03 16:26:13 -07:00
Jake Potrebic 0ae6dd2659 fix custom beacon ranges (#6067) 2021-07-02 19:51:49 +00:00
PaulBGD 6446e54dd9 Readd "Use getChunkIfLoadedImmediately in places" (#6047)
* Readd "Use getChunkIfLoadedImmediately in places"

* Formatting

* Fix var names
2021-07-02 20:04:29 +01:00
BillyGalbreath 882039d03e Honor spigot.yml setting log-villager-deaths (#6057)
cat note: giggity.
2021-07-02 04:28:31 +01:00
Shane Freeder f18dc1e3c7 Fix NPE when completing skull lookups without a real owner (Fixes #6052)
This looks like mojang introduced an NPE however it was previously being
supressed by the future used by the server, we'll just stick to the legacy
behavior of retainining the existing profile of earlier versions
2021-07-01 00:10:28 +01:00
Shane Freeder fc4be62055 [ci skip] revert dev-imports derp 2021-06-30 22:29:54 +01:00
Shane Freeder 3ddc424b89 Backport MC-229191 ore distribution changes 2021-06-30 22:11:40 +01:00
Jason 31d8fd53aa Add reobf mappings patch for LevelStorageSource$LevelStorageAccess#getDataTag (#6043) 2021-06-29 16:56:26 -07:00
Shane Freeder 2103ad2f81 Fix NPE when using broadcast as players are joining 2021-06-29 22:21:42 +01:00
Shane Freeder 2291667661 [ci skip] patch-ception 2021-06-29 17:39:17 +01:00
Shane Freeder 333cc2e36f Don't complete skull lookups on main thread (MC-227435) 2021-06-29 17:34:20 +01:00
Jason 1d194e5605 [ci-skip] Fix description of add-plugin command line option (#6031) 2021-06-29 02:09:02 -07:00
stonar96 59371cbd88 Optimize Anti-Xray (#5991) 2021-06-29 02:01:47 -07:00
Kyle Wood 45ec3794e5 Bump paperweight to 1.1.8 2021-06-29 00:45:23 -05:00
Jason 47139376c4 Fix return value of Block#applyBoneMeal always being false (#6030) 2021-06-29 01:37:44 +00:00
Shane Freeder 3aae7ef01a Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
214b9f14 SPIGOT-6605: Add method to access value of enforce-whitelist

CraftBukkit Changes:
b121d3b9 SPIGOT-6605: Add method to access value of enforce-whitelist
2021-06-29 01:31:35 +01:00
Shane Freeder 143f38113e Fix players not being added to collide rule (Fixes #6024) 2021-06-28 22:16:46 +01:00
Kezz ba7ffd06e9 Implement Sound.Source.Provider (#5935) 2021-06-28 15:07:19 +02:00
Jake Potrebic e895403a10 Improve horrible CraftChunk#getEntities performance (#5999)
Thanks Spigot, very cool.
2021-06-28 12:53:28 +00:00
Kyle Wood 0ad55267a3 Trim whitspace off of git hash (oops) 2021-06-26 23:51:03 -05:00
Kyle Wood e72fa4144f Update task dependency for includeMappings so the new task isn't skipped
The new task fixJarForReobf was added after shadowJar, but since
reobfJar's input is changed in this patch, that new task needs to be
referenced instead of shadowJar.
2021-06-26 22:26:17 -05:00
Kyle Wood 7d6147d2cb Remove now unneeded patch due to paperweight 1.1.7 2021-06-26 22:22:05 -05:00
Kyle Wood e33ed8939f Get short commit ref using a more proper method 2021-06-26 22:15:13 -05:00
Kyle Wood 12dec20e11 Bump paerweight to 1.1.7 2021-06-26 22:11:45 -05:00
Shane Freeder 1c77d64713 Drop codec spam fix (Fixes #5936)
having spoken to mojang about this the general issue is data which shouldn't
have been saved in the first place, so if we lose this data it's not really
an issue, bar being annoying spammy. if the spam gets on your nerves, shamefully,
all you can really do is forceUpgrade to get the conversions of the way.

Dropping as this breaks other aspects of the server and bar being spammy
seems to have no other real negative outcomes
2021-06-26 12:56:06 +01:00
Nassim Jahnke 23214fa1a7 Fix chicken jockey chicken persistence (#6005) 2021-06-26 08:54:24 +00:00
Jake Potrebic a23eb53e13 Fix use of universe flag and forceUpgrade 2021-06-25 20:51:48 -07:00
JasonandSpottedleaf 9e07703fb7 Do not cancel chunk load on ticket level change (#5978)
New chunk system doesn't do cancellations anymore.

Co-authored-by: Spottedleaf <spottedleaf@users.noreply.github.com>
2021-06-24 10:12:47 +01:00
Shane Freeder 0be7cdbd17 Allow explosions under 0 height (Fixes #5974)
Upstream forgot to update the check here which prevents explosions
occuring under 0 height, however, vanilla already checks that we
are in bounds of the world above this, so this call is entirely
redundant.
2021-06-24 01:51:48 +01:00
Shane Freeder 39d1bf1f33 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
f81f4994 SPIGOT-6594: NPE at Bukkit.getServer().getGenerateStructures()
295ab080 #872: SculkSensor accesses underlying TileEntity instead of snapshot for vibration frequency.
2021-06-24 01:39:30 +01:00
Prof-BloodstoneandRiley Park d50cc01b08 Make gradle take build number from env vars and add git build info (#5890)
* Make gradle take build number from env vars

* Add git information to manifest and version command/log

* trim

* Fix tests by adding NotNull annotations

* rebase

* Apply suggestions from kashike

Co-authored-by: Riley Park <riley.park@meino.net>

* Not always show branch

* Why can't everything be NotNull by default?

* Rebase

Co-authored-by: Riley Park <riley.park@meino.net>
2021-06-23 17:19:44 +00:00
stonar96 4e2f0be270 Refactor Anti-Xray and make some fixes to it (#5938) 2021-06-23 10:39:02 +02:00
Jake Potrebic b1f6e2698e Fix mobs not burning from summon command (#5961) 2021-06-23 10:07:59 +02:00
Jason a7cddc4153 Hotfix for some of the reobf issues tracked in Paperweight issue 24 (#5965) 2021-06-22 22:45:45 -07:00
Jake Potrebic 28aacb44dd Fix NPE when setting cook multiplier (#5956) 2021-06-22 19:26:03 +00:00
Shane Freeder 3c58c05c8c Ensure disconnect for book edit is called on main 2021-06-22 20:00:53 +01:00
Jake Potrebic b59165a2b3 remove calling expensive method (#5955) 2021-06-22 18:52:45 +00:00
Shane Freeder b60cf52c33 Fix kick event being fired off main thread 2021-06-22 19:35:35 +01:00
Nassim Jahnke d4cb833565 Updated Upstream (Bukkit/CraftBukkit) (#5952) 2021-06-22 17:33:51 +00:00
Nassim Jahnke f110140f96 Fix player collision patch cleanup (#5947) 2021-06-22 13:58:20 +00:00
Shane Freeder a9394b8c1a Try even harder to get an origin world and avoid NPEs (Fixes #5931) 2021-06-22 11:54:56 +01:00
Owen1212055 aed4433aca Add more fox API (#5743) 2021-06-22 07:44:02 +00:00
Jason ae95311131 Expand where stacktraces can be deobfuscated (#5944)
Also load the mappings from the correct location
2021-06-21 21:12:07 -07:00
Prof-Bloodstone 40e27befc2 [ci skip] Performance boost! (#5942)
Make paper version required in the issue templates
2021-06-21 15:18:07 -07:00
Riley Park 22280c5f55 Better checking for method return TYPE_USE annotations 2021-06-21 10:08:30 -07:00
Riley Park 15e4b30e9e Allow use of TYPE_USE annotations 2021-06-21 09:57:15 -07:00
Jason 33a04d97ab Set UTF-8 encoding for Javadoc and ProcessResources (#5937) 2021-06-21 15:27:46 +00:00
BillyGalbreath 961b98f9cb [ci skip] Very important bug fix :O (#5934) 2021-06-21 14:36:53 +00:00
BillyGalbreath 1cc41d01ba Permission message upgrades (#5932)
* Permission message upgrades

* Allow for blank lines after split

* the future is now :o
2021-06-21 07:07:21 -07:00
Shane Freeder 47605b8e60 Try to prevent an NPE from origin data (Fixes #5905) 2021-06-21 10:04:18 +01:00
Shane Freeder 984591ce66 Fix early load perms patch (Fixes #5917) 2021-06-21 09:41:00 +01:00
Jason 10e9c5a01c Deobfuscate stacktraces in log messages using a RewriteAppender and a custom RewritePolicy (#5926)
Also replace a couple calls to `System.err` with logger usages, as traces printed with the former do not get deobfuscated.
2021-06-21 01:09:18 -07:00
Pedro Arenas 1830de58bf Fix EntityEquipment::setDropChance Javadoc (#5925) 2021-06-20 22:42:42 -07:00
JasonandSpottedleaf 6dfe0496bd Fix PlayerDropItemEvent using wrong item (#5924)
Co-authored-by: Spottedleaf <spottedleaf@users.noreply.github.com>
2021-06-21 05:12:04 +00:00
lexikiq 4eae2d8da3 Fix "Don't ignore result of PlayerEditBookEvent" (#5923) 2021-06-21 04:29:59 +00:00
Underscore11 321ddfea3c fix: Blank ('') no-permission messages shouldn't send blank lines (#5892) 2021-06-21 01:50:36 +00:00
Kyle Wood e31ad11127 Update paperweight to 1.1.6 2021-06-20 16:22:20 -05:00
Nassim Jahnke 17f71ac87b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5904)
Upstream has released updates that appear 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:
70d24eb8 SPIGOT-6587: Update documentation/error of drop chance API

CraftBukkit Changes:
470050ad SPIGOT-6587: Update documentation/error of drop chance API
1c39efa3 Fix Inventory#getViewers on the player inventory not returning the player first time their inventory is opened
d161627d Fix PrepareItemCraftEvent#isRepair
aa1fae73 SPIGOT-6586: EntityChangeBlockEvent for falling block does not cancel properly
8a04072e SPIGOT-6583: Throwing eggs doesn't make sounds

Spigot Changes:
f773da84 Remove redundant patch
cd367234 Rebuild patches
2021-06-20 21:25:59 +02:00
Shane Freeder 33d6b6fbcd Add invalid player data to misc debug dumps 2021-06-20 15:07:00 +01:00
Aurora 24880b9a4f [CI-SKIP] Add JetBrains, thank you! (#5813) 2021-06-20 14:29:09 +02:00
Spottedleaf c89ec40619 Fix Codec log spam
Mojang did NOT add dataconverters for world gen configurations
that they CHANGED. So, the codec fails to parse old data.

This fixes two instances:
- IntProvider is new and Mojang did not account for old data.
  Thankfully, only ColumnPlace needed to be special cased.
- TreeConfiguration had changes. Thankfully, they were
  only renames for one value and thankfully defaults could
  be provided for two new values (WITHOUT changing behavior).
2021-06-20 12:59:55 +01:00
MiniDigger ed5100faf1 add some more reobf mappings to fix tardis and terraform 2021-06-20 11:50:36 +02:00
Kyle Wood 558be4bbc5 Add comment describing why reobf patch exists 2021-06-20 03:19:51 -05:00
Kyle Wood ea0336dff5 Bump paperweight to 1.1.5 with support for patching reobf mappings 2021-06-20 02:47:14 -05:00
Kyle Wood 72955ad6c3 Merge library and mcdev imports files, bump paperweight 2021-06-20 01:59:07 -05:00
Kyle Wood c83aa1a7f3 Bump paperweight to 1.1.3 and paperclip to 2.0.1 2021-06-20 00:11:02 -05:00
Jason 4bf6a631e7 Rename package from io.papermc.paper.world.gen to io.papermc.paper.world.generation (#5894) 2021-06-20 05:02:27 +00:00
dfsek c4c6e26c00 Worldgen Feature API (#5727) 2021-06-19 21:48:30 -07:00
Riley Park ce6610254f Fix GS4 querying 2021-06-19 18:27:04 -07:00
Nassim Jahnke bc4b23e389 [CI-SKIP] Update README (#5882) 2021-06-19 19:03:18 +00:00
+6 3d43c5e500 1.17 (#5881)
* hacked build changes, api applies cleanly

* Did anyone say gradle? and paperweight? potentially even mojmap?!

* Update paperweight & build config for Spigot changes

* Move patches

* Initial Spigot remap patches

* Inital remap of patches

* Move patches around

* Remap POM changes patch

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* Rename POM changes to build system changes

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* Apply a few more patches

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* Rename all patches to correct numbering scheme

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* More remapped patches

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* ci: remove java 8 build

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* Update Timings patch (#5796)

* fix: up the max memory for gradle

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: add pom changes to gradle

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: remove empty java file

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: remove #isStopping check

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: closer to compilable

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: the server compiles

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: map parent method where CB does not

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* feat: new maven group: io.papermc.paper

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* fix: Update paperweight mcdev and fix CraftBukkit patch

* few fixes to make it actually run

* Add Paper version back to manifest, add `runShadow`, `runReobf`, and `runDev` tasks for testing

* fix adventure patch

* rebase

* more patches

* more patches

* more patches (#5799)

* Add ASM dep to API and fix issues from title packet changes with bungee api

* patches

* fix PlayerUseUnknownEntityEvent patch (#5800)

* some patches

* even more progress

* even even more progress

* even even even even even even even more work

* even even even even even even even even even more changes

* fix profile cache mappings

let me be OP god dammit!

* even even even even even even even even even even even

even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even

more work

* even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even

more work

* add mcdev imports file

* More work

* More more work

* Fix patch, fix .gitattributes file name

* More more more work

* even more wooooooooooooooooooooooooork uwu

* more patches (#5807)

* Fix this stupid bullshit v2

* delete unneeded old patches

* more patches (#5808)

* more patches

* gradlew.bat crlf fix (#5810)

* more patches (#5811)

* Cleanup project build config

* Write API version to pom.properties for Versioning to read

Maven writes this metadata normally, but we don't use maven. Maybe should modify Versioning instead in the future, but this works just fine for now.

* wowe

* Add `runWorkDir` property for setting a custom run task working directory

* Use `mergeServiceFiles()` instead of AppendingTransformer

* Bump tiny-remapper to 0.4.1

* Use `forUseAtConfigurationTime()` for run directory property

* Resolve run working directory from rootProject

* even even even even more work

* wor

* patches

* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
8503c3c9 #621: Add HumanEntity#getItemInUse and Material#getSlipperiness
248deb09 #622: Add methods to check if item is the breed item for an entity
2ce691d8 Clarify Player#breakBlock only works for blocks in the same world
5dcdd48e SPIGOT-6514: Small Dripleaf block data is missing half property
cc9610b7 #619: Add Player#breakBlock()
862bc475 Fix bad merge of SPIGOT-6502 fix
989bb0c1 Downgrade SnakeYAML due to issues with comments parsing
1dff62ae Fix inverted visual fire docs

CraftBukkit Changes:
40caacc8 SPIGOT-6526: World entities are not populated when plugin onEnable is called
c9a92ad0 SPIGOT-6536: Marker position not set on spawn
20d3e57c #855: Add HumanEntity#getItemInUse and Material#getSlipperiness
d9c69b44 SPIGOT-6529: Fix BundleMeta#setItems
8bd43be5 SPIGOT-6535: PlayerGameModeChangeEvent event incorrectly reports old gamemode
4ece3ff3 #856: Add methods to check if item is the breed item for an entity
dd4bec5f Add additional validation to Player#breakBlock
bc835ae6 SPIGOT-6532: Fix Entity#setGlowing
384e116e Restore 1.16.5 behaviour of InventoryDragEvent being called even when a single item is 'dragged' to its own slot
b42e708c Fix new map colors rendering as transparent
cfe7fecf SPIGOT-6524: Inventory desync when InventoryClickEvent is cancelled
eeae1b19 SPIGOT-6522: ItemStack on cursor is always AIR
7490724d Fix missing PlayerEditBookEvent
06875f76 SPIGOT-6513: Placing ItemStack in Inventory causes InventoryAction.NOTHING
27835bde SPIGOT-6519: Fix end gateway teleports
4ac634ad SPIGOT-6515: "Un-waterlogging" throws UnsupportedOperationException in some cases
da425fa2 SPIGOT-6518: Anvils falling onto dripstone can sometimes crash server
50530da9 SPIGOT-6514: Small Dripleaf block data is missing half property
6fdecf20 #853: Implement Player#breakBlock()
4db9c49f SPIGOT-6510: Bukkit#createMap throws NullPointerException
89e2b127 SPIGOT-6517: Spider jockey crash on dripstone
cbf2f678 SPIGOT-6508: Rename conflicted getServer
74575d48 SPIGOT-6506: Fix crash with custom inventories
a3df386f Fix NPE with Entity.getNearbyEntities
d747f8ed Fix NPE with World.getNearbyEntities
4d2c7800 Fix second usage of worldGenSettings just in case
5182f923 SPIGOT-6504: Fix generating fresh worlds

Spigot Changes:
66f9d3c1 Rebuild patches
191e4971 Rebuild patches
a09c0bb6 Restore Spigot experience merging

* patches

fix

* patches and patches

* patch

* fix compile

* Work

* More work

* More more work

* Move this back

* Fix compile

* more work

* fix kneny dumb

* even more work

* Fix recursive connection call causing StackOverflowException

This was probably caused by the rename sendPacket->send and dispatchPacket->sendPacket

* adjust material set tag sizes

MC added a buuuunch of stuff

* more patches

* MOAR PATCHES

* update github action to the new setup

* update github action to the new setup

* separate out the CI tasks

* use local class for movecontrol stuff to prevent reobf mapping issue

* eeeeww, maven

* not even checkstyle can help us now

* fix tests

* EVEN MOOOOOAAAAAAARRRRRRR patches :) (#5820)

* Use correct jetbrains annotations

* work work (#5821)

* patches

* reorder patches after merge

* small fixes

* fix exception (#5822)

* 2 patch

* progress

* Re-add xp orb merging patches (#5823)

* ReAdded PreCreatureSpawnEvent from removed (#5814)

* reorder

* patches

* Fix mojangapi build

* Add back incremental chunk saving patch

* add entity debug info patch back

* more patches (#5827)

* more patches

* even moar patches

* Add missing getLevel implementation to Hopper Minecart, add mapping to fix reobf

* decomp fixes

* more work uwu

* fix issue in hopper patch

* more work work work

* even MOAR progress

* need to look at this later, fails rn

* even moar workkkkk

* fix compile issues

* even more compile fixes

* fix no grav bee patch for world height changes

* more patches

* resolve paperweight from paper repo

* run CI with --stacktrace

* more patches

* more patches & fixes to existing patches

* add access transforming capabilities

* continue to load paperclip from jfrog for now

* more patches

* Put pom in correct location for Paperclip install to maven local feature

* Re-add Chunk Priority/Urgency System (#5829)

* Organize removed patches (#5836)

* tons of patches (#5835)

* Fix AT format issue

* Update editorconfig

* patches

* update mappings files

* Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appear 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:
ebb0e28d #631: Add Villager#shakeHead
751469c6 #629: Add LivingEntity#isClimbing

CraftBukkit Changes:
622cf611 SPIGOT-6555: Cannot access shield BlockStateMeta
8b2e78ec SPIGOT-6542: Fix counting players with fauxSleeping = true
f66c437a SPIGOT-6561: Add events for dripleaf tilting
6ed40004 SPIGOT-6560: Crash when falling stalactite hits player
72a2901b SPIGOT-6557: PlayerEditBookEvent#setNewBookMeta does not update meta
a07e783a #865: Implement Villager#shakeHead
3252ff18 #863: Add LivingEntity#isClimbing
77058c79 SPIGOT-6554: Worlds created with the bukkit ChunkGenerator cannot save

* fixes

* Gradle & Paperclip updates

* Fix mappings patches for Hopper getLevel issue

* final patches from remapped and unmapped

keep in mind many patches in the removed folder still need to be updated

* update Fix incorrect status dataconverter for pre 1.13 chunks

* Add back stream patch (#5838)

* port some patches (#5837)

* reorder patches after merge

* Update to paperweight 1.0.0, with automatic library imports

* Update paperweight to 1.0.1

* Run Gradle tasks in parallel by default

* Remove now unnecessary scripts and update upstreamMerge.sh

* Remove Paperclip submodule

* Updated Upstream (CraftBukkit)

Upstream has released updates that appear 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:
f992ce60 Fix duplicate datapack reload on /reload

* revert accidental changes

* update Optimize Pathfinder - Remove Streams / Optimized collections

* Revert "Updated Upstream (CraftBukkit)"

This reverts commit c9f654db91.

* add back optimizing hopper searches (#5839)

* Clean cache on upstream update

* Updated Upstream (CraftBukkit/Spigot)

Upstream has released updates that appear 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:
f992ce60 Fix duplicate datapack reload on /reload

Spigot Changes:
9472b09d Rebuild patches

* Remove sync loading of spawn chunks

Adding the tickets is sufficient

* BlockPos.withinManhattan decomp fix

* Port anti x-ray patch

* Fix ChunkPacketBlockControllerAntiXray initialize

* Changes to xray patch

* Port Stop-copy-on-write-operations-for-updating-light-dat

* Disable Gradle file system watching by default

It's unclear if this will help anything but we are getting a lot of
issues with the daemon holdong on to files between builds and causing
issues.

* Add note on removed patch

* start adding in ATs

* AT bullshit

* Fix a few cases of the vanilla mob goals

* one missed AT

* mojang mapped vanilla goals

* added remaining hunks from chat/title packets (#5844)

* fix StopAttackingIfTargetInvalid behavior

* Update sync chunk load debug patch

Had to drop some hunks modifying getEntities, as those methods were rewritten by Mojang in 1.17

* Updated Upstream (Bukkit/CraftBukkit) & more patches

Upstream has released updates that appear 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:
e9ce88b9 SPIGOT-6562: Add more specific sculk sensor event

CraftBukkit Changes:
d7ef1e91 SPIGOT-6558: Attempt to improve SkullMeta
e7a63287 SPIGOT-6562: Add more specific sculk sensor event

* add more patches back

* Update Paperweight to 1.0.2

* Update runDev task for Gradle 7.1 deprecations

also no longer disable watchdog by default, instead require `disableWatchdog` Gradle property to be set

* Bump paperweight to 1.0.3

* more patches added back

* Bump paperweight to 1.0.4

* Revert "Re-add Chunk Priority/Urgency System (#5829)"

This reverts commit 24b7da65ee.

Patch was updated incorrectly and needs a closer look.

* Temporarily revert incremental chunk saving patch

Needs updating to hook into new entity storage system

* Modify entity origin API to store world/pos seperatly

* Fix comment

* Update Asynchronous chunk IO and loading for variable world height limits

* Port chunk priority urgency patch

* Definitely readd this patch for the first time

* Fix custom world height in xray patch

* Port improve chunk status transition speed

* remove optimise random tick patch for now

* Fix entity death sounds

* fixes issue with chunk saving

fixes #5854

* Enable chunk load for feature search by default

* remove some more obf helpers

* update to Adventure 4.8.1

* Fix artifact ids

* Minor patch cleanup

* Bump paperweight to 1.0.5

* Add a note about deleting pom.xml in first patch

* Relocate other libraries Spigot added and relocates in 1.17

* Update Entity load/save limit per chunk

* Simplify Multi-Release plugin jar patch

We don't have to worry about running on Java <9 anymore.

* Bump paperweight to 1.1.0

This paperweight update uses Hypo to cleanup and fix reobf mappings
based on the completed jar, which removes a lot of issues we were
previously having around weird CraftBukkit edge cases and synthetic
issues (as always). It's not yet perfect (PaperMC/paperweight#18) but
it's much better than it was.

* Update incremental chunk saving

* Update author on my patches

* Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear 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:
2dbec584 SPIGOT-6570: Missing InventoryType: COMPOSTER
e9ce88b9 SPIGOT-6562: Add more specific sculk sensor event

CraftBukkit Changes:
9122f5a6 #869: Fix BossBar setColor and setStyle updates
96a15d7a Incrase outdated build delay
ded19075 SPIGOT-6570: Missing InventoryType: COMPOSTER
d7ef1e91 SPIGOT-6558: Attempt to improve SkullMeta
e7a63287 SPIGOT-6562: Add more specific sculk sensor event

Spigot Changes:
101ebb63 SPIGOT-6573: Berry Bushes deal damage when not moving

* remove remaining POMs

* missing ats and mappings

* check if sender is a player in paper dumpitem command, closes #5858

* remove system property for book size limits

"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."

* nuke a few more obfhelpers

* deprecate all obfhelpers

* death to more obfhelpers

* fix build

* remove more obfhelpers

* Bump paperweight to 1.1.2

* Don't include log4j

* Fix #5856 Entity origin (#5861)

* Thanks for joining us for the magic show tonight

* Move package version to server project

* downgrade snakeyaml to fix issues with comments

this was done by upstream, but got missed. Thanks @mrfloris for pointing this out.

* Remove chat event APIs marked as deprecated for removal with 1.17

* Add task to print Minecraft version, add snapshots repo for publishing

* Save BlockEntities on main for async chunk saves

Closes #5854

* add back optimizing ServerLevel chunk checking methods

* Updated Upstream (CraftBukkit)

Upstream has released updates that appear 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:
68d40318 SPIGOT-6580: Cancelling SlimeSplitEvent Causes Infinite Loop
78d93f77 SPIGOT-6576: BlockExpEvent does not show XP when breaking a furnace

* Fix startup delay and warning caused by oshi

* thank you for your service, old spigot mapped patches, you will not be missed.

* fix patch mis-order

Co-authored-by: Kyle Wood <kyle@denwav.dev>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: KennyTV <jahnke.nassim@gmail.com>
Co-authored-by: Aurora <aurora@relanet.eu>
Co-authored-by: mechoriet <kevinworm92@gmail.com>
Co-authored-by: Professor Bloodstone <git@bloodstone.dev>
Co-authored-by: Omer Uddin <kickash32@gmail.com>
Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
Co-authored-by: Kyle Wood <demonwav@gmail.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Riley Park <riley.park@meino.net>
Co-authored-by: djytw <djytw@live.com>
2021-06-19 10:52:47 -07:00
Jake Potrebic 1882ec3c07 fix patch mis-order 2021-06-19 10:45:52 -07:00
MiniDigger 512e7c99ae thank you for your service, old spigot mapped patches, you will not be missed. 2021-06-19 19:30:36 +02:00
KennyTV ac95f25f35 Fix startup delay and warning caused by oshi 2021-06-19 09:57:56 +02:00
KennyTV 0bf1be0a80 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
68d40318 SPIGOT-6580: Cancelling SlimeSplitEvent Causes Infinite Loop
78d93f77 SPIGOT-6576: BlockExpEvent does not show XP when breaking a furnace
2021-06-19 09:06:28 +02:00
Jake Potrebic 9f8876e92f add back optimizing ServerLevel chunk checking methods 2021-06-19 08:57:42 +02:00
Jason Penilla 309b99b12f Save BlockEntities on main for async chunk saves
Closes #5854
2021-06-18 21:38:44 -07:00
Jason Penilla 7f82b50636 Add task to print Minecraft version, add snapshots repo for publishing 2021-06-18 16:38:26 -07:00
Jason Penilla 3c5bfaddbe Remove chat event APIs marked as deprecated for removal with 1.17 2021-06-18 15:47:40 -07:00
MiniDigger ad7644ce82 downgrade snakeyaml to fix issues with comments
this was done by upstream, but got missed. Thanks @mrfloris for pointing this out.
2021-06-18 16:34:30 +02:00
Kyle Wood dad12b324b Move package version to server project 2021-06-18 00:25:16 -05:00
Riley Park 4f14647c37 Thanks for joining us for the magic show tonight 2021-06-17 20:39:33 -07:00
djytw c5070937e4 Fix #5856 Entity origin (#5861) 2021-06-18 04:37:23 +01:00
Riley Park d76f8e018c Don't include log4j 2021-06-17 18:42:17 -07:00
Kyle Wood 770bcf35bb Bump paperweight to 1.1.2 2021-06-17 19:04:38 -05:00
Jake Potrebic c9cdc05ff1 remove more obfhelpers 2021-06-17 15:47:52 -07:00
MiniDigger 30cdf3b8b1 fix build 2021-06-17 22:25:52 +02:00
MiniDigger 13e04200c7 death to more obfhelpers 2021-06-17 22:20:03 +02:00
MiniDigger 272fb20b26 deprecate all obfhelpers 2021-06-17 21:52:26 +02:00
MiniDigger 3cdaf0b8a1 nuke a few more obfhelpers 2021-06-17 21:37:37 +02:00
MiniDigger 4104545b11 remove system property for book size limits
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
2021-06-17 21:12:40 +02:00
MiniDigger 2cbdb174b7 check if sender is a player in paper dumpitem command, closes #5858 2021-06-17 20:13:55 +02:00
Jake Potrebic d04c22dddf missing ats and mappings 2021-06-17 10:47:34 -07:00
Jake Potrebic 86abcdafe1 remove remaining POMs 2021-06-17 10:11:00 -07:00
KennyTV c943a108a9 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
2dbec584 SPIGOT-6570: Missing InventoryType: COMPOSTER
e9ce88b9 SPIGOT-6562: Add more specific sculk sensor event

CraftBukkit Changes:
9122f5a6 #869: Fix BossBar setColor and setStyle updates
96a15d7a Incrase outdated build delay
ded19075 SPIGOT-6570: Missing InventoryType: COMPOSTER
d7ef1e91 SPIGOT-6558: Attempt to improve SkullMeta
e7a63287 SPIGOT-6562: Add more specific sculk sensor event

Spigot Changes:
101ebb63 SPIGOT-6573: Berry Bushes deal damage when not moving
2021-06-17 14:50:16 +02:00
Jason Penilla 8236add8cb Update author on my patches 2021-06-17 02:37:24 -07:00
Jason Penilla 691cdf6f9e Update incremental chunk saving 2021-06-17 01:37:27 -07:00
Kyle Wood f87d5ab52b Bump paperweight to 1.1.0
This paperweight update uses Hypo to cleanup and fix reobf mappings
based on the completed jar, which removes a lot of issues we were
previously having around weird CraftBukkit edge cases and synthetic
issues (as always). It's not yet perfect (PaperMC/paperweight#18) but
it's much better than it was.
2021-06-17 01:51:18 -05:00
Kyle Wood 52287ea614 Simplify Multi-Release plugin jar patch
We don't have to worry about running on Java <9 anymore.
2021-06-16 23:18:55 -05:00
Jason Penilla 3353754726 Update Entity load/save limit per chunk 2021-06-16 21:00:32 -07:00
Kyle Wood 9bebf0b6f8 Relocate other libraries Spigot added and relocates in 1.17 2021-06-16 20:56:44 -05:00
Kyle Wood 0cd65441d1 Add a note about deleting pom.xml in first patch 2021-06-16 20:46:15 -05:00
Kyle Wood 188316aa24 Bump paperweight to 1.0.5 2021-06-16 20:44:42 -05:00
Kyle Wood b9402f84a9 Minor patch cleanup 2021-06-16 20:43:30 -05:00
Jason Penilla a26d1aa427 Fix artifact ids 2021-06-16 17:27:10 -07:00
Jake Potrebic 7be3024c75 update to Adventure 4.8.1 2021-06-16 15:57:49 -07:00
Jake Potrebic cd8f24d472 remove some more obf helpers 2021-06-16 14:22:39 -07:00
KennyTV 080d3d737a Enable chunk load for feature search by default 2021-06-16 22:42:48 +02:00
Jake Potrebic a6004d4f7f fixes issue with chunk saving
fixes #5854
2021-06-16 13:35:10 -07:00
KennyTV 3d81d4e5b2 Fix entity death sounds 2021-06-16 22:17:53 +02:00
Jake Potrebic 8e187cb187 remove optimise random tick patch for now 2021-06-16 13:12:05 -07:00
KennyTV 05623c47ec Port improve chunk status transition speed 2021-06-16 15:47:07 +02:00
KennyTV 2b3c483a98 Fix custom world height in xray patch 2021-06-16 15:14:19 +02:00
KennyTV 2b8d06aed3 Definitely readd this patch for the first time 2021-06-16 13:07:43 +02:00
KennyTV 9e1255cff9 Port chunk priority urgency patch 2021-06-16 12:32:08 +02:00
Spottedleaf 4b17540b42 Update Asynchronous chunk IO and loading for variable world height limits 2021-06-16 02:18:08 -07:00
Jason Penilla 3740db03b4 Fix comment 2021-06-16 00:33:23 -07:00
Shane Freeder 86953b2641 Modify entity origin API to store world/pos seperatly 2021-06-16 00:33:23 -07:00
Jason Penilla d8c3fb7e47 Temporarily revert incremental chunk saving patch
Needs updating to hook into new entity storage system
2021-06-16 00:21:41 -07:00
Jason Penilla 9cfc0d5a60 Revert "Re-add Chunk Priority/Urgency System (#5829)"
This reverts commit 24b7da65ee.

Patch was updated incorrectly and needs a closer look.
2021-06-16 00:21:41 -07:00
Kyle Wood 4c074f29ac Bump paperweight to 1.0.4 2021-06-16 02:13:16 -05:00
Jake Potrebic 852ce73590 more patches added back 2021-06-15 23:26:29 -07:00
Kyle Wood 98994a0aa1 Bump paperweight to 1.0.3 2021-06-16 01:18:58 -05:00
Jason Penilla ad2a112c89 Update runDev task for Gradle 7.1 deprecations
also no longer disable watchdog by default, instead require `disableWatchdog` Gradle property to be set
2021-06-15 22:11:13 -07:00
Jason Penilla 380953bda2 Update Paperweight to 1.0.2 2021-06-15 22:10:48 -07:00
Jake Potrebic 6f064f928e add more patches back 2021-06-15 21:53:50 -07:00
Jake Potrebic ea0ec8c5a0 Updated Upstream (Bukkit/CraftBukkit) & more patches
Upstream has released updates that appear 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:
e9ce88b9 SPIGOT-6562: Add more specific sculk sensor event

CraftBukkit Changes:
d7ef1e91 SPIGOT-6558: Attempt to improve SkullMeta
e7a63287 SPIGOT-6562: Add more specific sculk sensor event
2021-06-15 21:12:14 -07:00
Jason Penilla 4d40e87b33 Update sync chunk load debug patch
Had to drop some hunks modifying getEntities, as those methods were rewritten by Mojang in 1.17
2021-06-15 17:50:38 -07:00
Jason Penilla d50b33f4da fix StopAttackingIfTargetInvalid behavior 2021-06-15 16:55:13 -07:00
Jake Potrebic 9501e7619f added remaining hunks from chat/title packets (#5844) 2021-06-15 16:41:38 -07:00
MiniDigger ba2b40c603 mojang mapped vanilla goals 2021-06-16 01:24:22 +02:00
MiniDigger f79ab295a5 one missed AT 2021-06-16 00:59:41 +02:00
MiniDigger 08fe6d3c86 Fix a few cases of the vanilla mob goals 2021-06-16 00:47:05 +02:00
MiniDigger 3fb6b93f96 AT bullshit 2021-06-16 00:24:12 +02:00
MiniDigger 90546c7c50 start adding in ATs 2021-06-15 21:44:37 +02:00
KennyTV 4cbb187af5 Add note on removed patch 2021-06-15 19:34:04 +02:00
Kyle Wood 9abef9c805 Disable Gradle file system watching by default
It's unclear if this will help anything but we are getting a lot of
issues with the daemon holdong on to files between builds and causing
issues.
2021-06-15 11:46:55 -05:00
KennyTV 7480cf008a Port Stop-copy-on-write-operations-for-updating-light-dat 2021-06-15 17:43:00 +02:00
KennyTV eab6d9f533 Changes to xray patch 2021-06-15 16:33:39 +02:00
KennyTV 7267c01db0 Fix ChunkPacketBlockControllerAntiXray initialize 2021-06-15 16:08:48 +02:00
KennyTV 68caddbb73 Port anti x-ray patch 2021-06-15 16:08:47 +02:00
Jason Penilla e3fea251a6 BlockPos.withinManhattan decomp fix 2021-06-15 06:55:25 -07:00
Jason Penilla df2247b2ed Remove sync loading of spawn chunks
Adding the tickets is sufficient
2021-06-15 03:13:30 -07:00
Jason Penilla 8291fff4ac Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appear 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:
f992ce60 Fix duplicate datapack reload on /reload

Spigot Changes:
9472b09d Rebuild patches
2021-06-15 01:38:57 -07:00
Jason Penilla 89860077fa Clean cache on upstream update 2021-06-15 01:38:41 -07:00
Jake Potrebic 3846367c2d add back optimizing hopper searches (#5839) 2021-06-15 01:29:12 -07:00
Jason Penilla a0056c36f1 Revert "Updated Upstream (CraftBukkit)"
This reverts commit c9f654db91.
2021-06-15 01:12:10 -07:00
Jason Penilla ebbfe2749b update Optimize Pathfinder - Remove Streams / Optimized collections 2021-06-15 00:43:03 -07:00
Jason Penilla 57fce3dca5 revert accidental changes 2021-06-15 00:28:40 -07:00
Jason Penilla c9f654db91 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
f992ce60 Fix duplicate datapack reload on /reload
2021-06-14 23:51:30 -07:00
Kyle Wood a3de494f11 Remove Paperclip submodule 2021-06-15 01:44:13 -05:00
Kyle Wood c8ecb664c6 Remove now unnecessary scripts and update upstreamMerge.sh 2021-06-15 01:42:57 -05:00
Kyle Wood 34269f8a39 Run Gradle tasks in parallel by default 2021-06-15 01:29:55 -05:00
Kyle Wood 15741a08f3 Update paperweight to 1.0.1 2021-06-15 01:19:26 -05:00
Kyle Wood bbb8816211 Update to paperweight 1.0.0, with automatic library imports 2021-06-15 00:56:07 -05:00
Jason Penilla f267238e0e reorder patches after merge 2021-06-14 22:49:09 -07:00
Omer Uddin b26ba5bc8a port some patches (#5837) 2021-06-14 22:44:37 -07:00
Jake Potrebic 8755b391fb Add back stream patch (#5838) 2021-06-14 22:38:36 -07:00
Jason Penilla a5251b4375 update Fix incorrect status dataconverter for pre 1.13 chunks 2021-06-14 22:12:50 -07:00
Jason Penilla 5a86fba668 final patches from remapped and unmapped
keep in mind many patches in the removed folder still need to be updated
2021-06-14 21:56:30 -07:00
Kyle Wood da99f8648f Fix mappings patches for Hopper getLevel issue 2021-06-14 23:39:41 -05:00
Kyle Wood 5b49459c64 Gradle & Paperclip updates 2021-06-14 23:17:16 -05:00
Jason Penilla f5f80a4aed fixes 2021-06-14 21:16:18 -07:00
Jason Penilla f6636fca9e Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
ebb0e28d #631: Add Villager#shakeHead
751469c6 #629: Add LivingEntity#isClimbing

CraftBukkit Changes:
622cf611 SPIGOT-6555: Cannot access shield BlockStateMeta
8b2e78ec SPIGOT-6542: Fix counting players with fauxSleeping = true
f66c437a SPIGOT-6561: Add events for dripleaf tilting
6ed40004 SPIGOT-6560: Crash when falling stalactite hits player
72a2901b SPIGOT-6557: PlayerEditBookEvent#setNewBookMeta does not update meta
a07e783a #865: Implement Villager#shakeHead
3252ff18 #863: Add LivingEntity#isClimbing
77058c79 SPIGOT-6554: Worlds created with the bukkit ChunkGenerator cannot save
2021-06-14 21:02:21 -07:00
Jason Penilla 7929fdabaf update mappings files 2021-06-14 21:02:20 -07:00
Jason Penilla 7271649af2 patches 2021-06-14 21:02:20 -07:00
Jason Penilla 2ac6b12fc8 Update editorconfig 2021-06-14 21:02:20 -07:00
Kyle Wood cf885102cd Fix AT format issue 2021-06-14 22:58:14 -05:00
Jake Potrebic d3424f4a8a tons of patches (#5835) 2021-06-14 22:59:31 -04:00
Omer Uddin 38e4dc3050 Organize removed patches (#5836) 2021-06-14 19:54:17 -07:00
mechoriet 24b7da65ee Re-add Chunk Priority/Urgency System (#5829) 2021-06-14 22:41:12 -04:00
Jason Penilla 0c732e2ef5 Put pom in correct location for Paperclip install to maven local feature 2021-06-14 18:56:02 -07:00
Jake Potrebic 09ead8b043 more patches 2021-06-14 23:42:23 +02:00
MiniDigger b2a63428c8 continue to load paperclip from jfrog for now 2021-06-14 22:29:55 +02:00
MiniDigger 23a9df76fd add access transforming capabilities 2021-06-14 22:15:38 +02:00
Jake Potrebic f777faa8c1 more patches & fixes to existing patches 2021-06-14 21:18:49 +02:00
Jake Potrebic 5dce4d9178 more patches 2021-06-14 21:18:49 +02:00
MiniDigger f72886c9a6 run CI with --stacktrace 2021-06-14 21:12:21 +02:00
MiniDigger ae5af5afcc resolve paperweight from paper repo 2021-06-14 21:02:30 +02:00
Jake Potrebic 8cf470d6b1 more patches 2021-06-14 19:02:40 +02:00
Jake Potrebic 18a839d265 fix no grav bee patch for world height changes 2021-06-14 19:02:40 +02:00
Aurora 53081c6e5f even more compile fixes 2021-06-14 17:17:08 +02:00
Aurora b87c54f843 fix compile issues 2021-06-14 17:10:25 +02:00
Aurora 21effd6c48 even moar workkkkk 2021-06-14 17:02:03 +02:00
Josh Roy 3721b1466f need to look at this later, fails rn 2021-06-14 06:47:04 -07:00
Josh Roy cfb17666ff even MOAR progress 2021-06-14 06:45:16 -07:00
Aurora 42091ba5f0 Merge branch 'dev/1.17' of github.com:PaperMC/Paper into dev/1.17 2021-06-14 14:04:57 +02:00
Aurora 8ca5a642ef more work work work 2021-06-14 14:04:35 +02:00
Jason Penilla b7cdb5d6c4 fix issue in hopper patch 2021-06-14 03:18:42 -07:00
Aurora d2cb88db9c Merge branch 'dev/1.17' of github.com:PaperMC/Paper into dev/1.17 2021-06-14 12:13:18 +02:00
Aurora ba3ce754a9 more work uwu 2021-06-14 12:13:08 +02:00
Jason Penilla eddf0f40dc decomp fixes 2021-06-14 02:15:37 -07:00
Jason Penilla f7bc641230 Add missing getLevel implementation to Hopper Minecart, add mapping to fix reobf 2021-06-14 02:06:46 -07:00
Jake Potrebic 7fe98bd520 more patches (#5827)
* more patches

* even moar patches
2021-06-14 10:37:14 +02:00
Jake Potrebic 405ab6388e add entity debug info patch back 2021-06-14 09:38:41 +02:00
Jake Potrebic 4b2f4cbebb Add back incremental chunk saving patch 2021-06-14 09:30:41 +02:00
Jason Penilla 956fcad4ea Fix mojangapi build 2021-06-13 23:56:15 -07:00
Jason Penilla 45c6df9648 patches 2021-06-13 23:45:29 -07:00
Jason Penilla ba374d2485 reorder 2021-06-13 22:42:29 -07:00
mechoriet dcbb16316d ReAdded PreCreatureSpawnEvent from removed (#5814) 2021-06-13 22:40:21 -07:00
Jake Potrebic 9c95d0481d Re-add xp orb merging patches (#5823) 2021-06-13 22:37:57 -07:00
Jason Penilla 3c02c90f3e progress 2021-06-13 22:32:56 -07:00
Jason Penilla d001eefd7e 2 patch 2021-06-13 21:29:40 -07:00
Omer Uddin 961f297963 fix exception (#5822) 2021-06-13 21:29:25 -07:00
Jason Penilla 5e62aca6c9 small fixes 2021-06-13 20:06:11 -07:00
Jason Penilla 3d7b0490c0 reorder patches after merge 2021-06-13 19:43:29 -07:00
Jason Penilla f67dc7a35b patches 2021-06-13 19:42:02 -07:00
Omer Uddin 3e552cc54c work work (#5821) 2021-06-13 19:41:44 -07:00
Jason Penilla 6c30949610 Use correct jetbrains annotations 2021-06-13 18:48:31 -07:00
Jake Potrebic 2a46c72164 EVEN MOOOOOAAAAAAARRRRRRR patches :) (#5820) 2021-06-13 18:06:38 -07:00
MiniDigger 9085da6e60 fix tests 2021-06-14 02:19:51 +02:00
MiniDigger b75a22c4b1 not even checkstyle can help us now 2021-06-14 01:48:04 +02:00
MiniDigger 2d176a6083 eeeeww, maven 2021-06-14 01:33:04 +02:00
MiniDigger 2372198eb4 use local class for movecontrol stuff to prevent reobf mapping issue 2021-06-14 01:19:51 +02:00
MiniDigger 69e6160294 separate out the CI tasks 2021-06-14 00:56:05 +02:00
MiniDigger 5cdbd0064b update github action to the new setup 2021-06-14 00:51:30 +02:00
MiniDigger ab709d8405 update github action to the new setup 2021-06-14 00:44:48 +02:00
Jake Potrebic f55b6e04b1 MOAR PATCHES 2021-06-14 00:06:46 +02:00
Jake Potrebic 27a8d6da9a more patches 2021-06-13 21:31:39 +02:00
MiniDigger 123a41d132 adjust material set tag sizes
MC added a buuuunch of stuff
2021-06-13 20:34:25 +02:00
Professor Bloodstone 7f15d7832f Fix recursive connection call causing StackOverflowException
This was probably caused by the rename sendPacket->send and dispatchPacket->sendPacket
2021-06-13 19:24:06 +02:00
Aurora 8af12b17c1 even more work 2021-06-13 17:17:44 +02:00
Aurora 0ea382b41d fix kneny dumb 2021-06-13 15:46:49 +02:00
Aurora b804730254 more work 2021-06-13 15:46:28 +02:00
KennyTV fd645b456c Fix compile 2021-06-13 14:54:37 +02:00
KennyTV 2bf9070a52 Move this back 2021-06-13 14:44:31 +02:00
KennyTV 5d9882a976 More more work 2021-06-13 14:43:56 +02:00
KennyTV 19da14ee00 More work 2021-06-13 14:14:18 +02:00
KennyTV d42140148f Work 2021-06-13 13:05:43 +02:00
Jason Penilla 76a75fc35a fix compile 2021-06-13 01:47:24 -07:00
Jason Penilla b8b3c40023 patch 2021-06-13 01:40:50 -07:00
Jason Penilla 41a5f14f9e patches and patches 2021-06-13 01:27:20 -07:00
Jason Penilla 79f1d1a078 patches
fix
2021-06-12 23:53:47 -07:00
Jason Penilla 0fa2a949ae Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear 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:
8503c3c9 #621: Add HumanEntity#getItemInUse and Material#getSlipperiness
248deb09 #622: Add methods to check if item is the breed item for an entity
2ce691d8 Clarify Player#breakBlock only works for blocks in the same world
5dcdd48e SPIGOT-6514: Small Dripleaf block data is missing half property
cc9610b7 #619: Add Player#breakBlock()
862bc475 Fix bad merge of SPIGOT-6502 fix
989bb0c1 Downgrade SnakeYAML due to issues with comments parsing
1dff62ae Fix inverted visual fire docs

CraftBukkit Changes:
40caacc8 SPIGOT-6526: World entities are not populated when plugin onEnable is called
c9a92ad0 SPIGOT-6536: Marker position not set on spawn
20d3e57c #855: Add HumanEntity#getItemInUse and Material#getSlipperiness
d9c69b44 SPIGOT-6529: Fix BundleMeta#setItems
8bd43be5 SPIGOT-6535: PlayerGameModeChangeEvent event incorrectly reports old gamemode
4ece3ff3 #856: Add methods to check if item is the breed item for an entity
dd4bec5f Add additional validation to Player#breakBlock
bc835ae6 SPIGOT-6532: Fix Entity#setGlowing
384e116e Restore 1.16.5 behaviour of InventoryDragEvent being called even when a single item is 'dragged' to its own slot
b42e708c Fix new map colors rendering as transparent
cfe7fecf SPIGOT-6524: Inventory desync when InventoryClickEvent is cancelled
eeae1b19 SPIGOT-6522: ItemStack on cursor is always AIR
7490724d Fix missing PlayerEditBookEvent
06875f76 SPIGOT-6513: Placing ItemStack in Inventory causes InventoryAction.NOTHING
27835bde SPIGOT-6519: Fix end gateway teleports
4ac634ad SPIGOT-6515: "Un-waterlogging" throws UnsupportedOperationException in some cases
da425fa2 SPIGOT-6518: Anvils falling onto dripstone can sometimes crash server
50530da9 SPIGOT-6514: Small Dripleaf block data is missing half property
6fdecf20 #853: Implement Player#breakBlock()
4db9c49f SPIGOT-6510: Bukkit#createMap throws NullPointerException
89e2b127 SPIGOT-6517: Spider jockey crash on dripstone
cbf2f678 SPIGOT-6508: Rename conflicted getServer
74575d48 SPIGOT-6506: Fix crash with custom inventories
a3df386f Fix NPE with Entity.getNearbyEntities
d747f8ed Fix NPE with World.getNearbyEntities
4d2c7800 Fix second usage of worldGenSettings just in case
5182f923 SPIGOT-6504: Fix generating fresh worlds

Spigot Changes:
66f9d3c1 Rebuild patches
191e4971 Rebuild patches
a09c0bb6 Restore Spigot experience merging
2021-06-12 22:13:07 -07:00
Jason Penilla 52f28953be patches 2021-06-12 22:09:48 -07:00
Jason Penilla 5e9c53b5b7 Merge remote-tracking branch 'leaf/dev/1.17' into dev/1.17 2021-06-12 21:35:43 -07:00
Spottedleaf cef692bcc6 wor 2021-06-12 21:25:07 -07:00
Spottedleaf ca621e6280 even even even even more work 2021-06-12 21:03:02 -07:00
Jason Penilla 2a3f1fa30c Resolve run working directory from rootProject 2021-06-12 20:35:03 -07:00
Jason Penilla 06f41a4885 Use forUseAtConfigurationTime() for run directory property 2021-06-12 20:21:59 -07:00
Kyle Wood 152994d950 Bump tiny-remapper to 0.4.1 2021-06-12 22:18:50 -05:00
Jason Penilla 24e9620d14 Use mergeServiceFiles() instead of AppendingTransformer 2021-06-12 19:23:21 -07:00
Jason Penilla 75b99eb454 Add runWorkDir property for setting a custom run task working directory 2021-06-12 19:18:24 -07:00
Spottedleaf cc19211cf9 wowe 2021-06-12 19:16:10 -07:00
Jason Penilla 672c5365f4 Write API version to pom.properties for Versioning to read
Maven writes this metadata normally, but we don't use maven. Maybe should modify Versioning instead in the future, but this works just fine for now.
2021-06-12 18:28:41 -07:00
Kyle Wood fa637ed8dd Cleanup project build config 2021-06-12 19:31:26 -05:00
Jake Potrebic 2ba2c29b2e more patches (#5811) 2021-06-13 00:45:00 +01:00
mechoriet 0c2d1544ac gradlew.bat crlf fix (#5810) 2021-06-12 22:34:05 +01:00
Jake Potrebic a968aefd32 more patches 2021-06-12 23:32:23 +02:00
Jake Potrebic 716a3139b7 more patches (#5808) 2021-06-12 20:30:37 +01:00
MiniDigger d7e184d055 delete unneeded old patches 2021-06-12 21:24:35 +02:00
MiniDigger 116a6013c3 Fix this stupid bullshit v2 2021-06-12 19:13:23 +02:00
Jake Potrebic 2397b86efa more patches (#5807) 2021-06-12 17:56:13 +01:00
Aurora 79da8f0eca even more wooooooooooooooooooooooooork uwu 2021-06-12 17:06:20 +02:00
KennyTV 8125b3f1be More more more work 2021-06-12 14:58:17 +02:00
KennyTV 88bc74ec42 Fix patch, fix .gitattributes file name 2021-06-12 14:09:11 +02:00
KennyTV 3c1cd3bdf2 More more work 2021-06-12 13:54:46 +02:00
KennyTV 0ec8b900ba More work 2021-06-12 12:26:21 +02:00
MiniDigger 4e99c4e598 add mcdev imports file 2021-06-12 11:23:51 +02:00
Spottedleaf d9210c3ee7 even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even even
more work
2021-06-12 11:22:46 +02:00
Spottedleaf 1753b33104 even even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even
even even even even even even even even even even

more work
2021-06-12 11:22:46 +02:00
MiniDigger 864ef24fc0 fix profile cache mappings
let me be OP god dammit!
2021-06-12 09:30:37 +02:00
Spottedleaf b1517fe9f2 even even even even even even even even even more changes 2021-06-12 09:26:16 +02:00
Spottedleaf 9da160169a even even even even even even even more work 2021-06-12 09:26:16 +02:00
Spottedleaf 42458fbca4 even even more progress 2021-06-12 09:26:16 +02:00
Spottedleaf 8599f95b4f even more progress 2021-06-12 09:26:16 +02:00
Spottedleaf 2920f9b9e5 some patches 2021-06-12 09:26:16 +02:00
Jake Potrebic 2dc0a31f5c fix PlayerUseUnknownEntityEvent patch (#5800) 2021-06-12 04:37:02 +01:00
Jason Penilla d43c31d141 patches 2021-06-11 20:07:57 -07:00
Jason Penilla c56800c6fb Add ASM dep to API and fix issues from title packet changes with bungee api 2021-06-11 19:25:10 -07:00
Jake Potrebic 933a189a04 more patches (#5799) 2021-06-12 03:24:43 +01:00
Jake Potrebic 650edb93ca more patches 2021-06-12 03:19:04 +02:00
Jake Potrebic 3a3831d6aa more patches 2021-06-12 03:19:04 +02:00
Jake Potrebic 1f8e76b185 rebase 2021-06-12 03:19:04 +02:00
Jake Potrebic a9f38a8789 fix adventure patch 2021-06-12 03:19:04 +02:00
Jason Penilla 9188180d7a Add Paper version back to manifest, add runShadow, runReobf, and runDev tasks for testing 2021-06-11 18:10:12 -07:00
MiniDigger a22a0e56ef few fixes to make it actually run 2021-06-12 02:22:53 +02:00
Kyle Wood 7ea73d48d4 fix: Update paperweight mcdev and fix CraftBukkit patch 2021-06-11 15:18:19 -05:00
Mariell Hoversholm a588190780 feat: new maven group: io.papermc.paper
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 21:35:53 +02:00
Mariell Hoversholm eccd156d12 fix: map parent method where CB does not
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 21:08:51 +02:00
Mariell Hoversholm a79616b9cc fix: the server compiles
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 20:33:36 +02:00
Mariell Hoversholm 088e980a80 fix: closer to compilable
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 20:26:56 +02:00
Mariell Hoversholm 9c2a18af92 fix: remove #isStopping check
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 20:16:11 +02:00
Mariell Hoversholm d8d7c8c8aa fix: remove empty java file
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 20:08:26 +02:00
Mariell Hoversholm 87ee3b4d67 fix: add pom changes to gradle
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 20:06:01 +02:00
Mariell Hoversholm 82eb9fffc8 fix: up the max memory for gradle
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 20:02:47 +02:00
Jake Potrebic 3f10bf1163 Update Timings patch (#5796) 2021-06-11 20:02:16 +02:00
Mariell Hoversholm 3d21ab7adb ci: remove java 8 build
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 19:56:25 +02:00
Mariell Hoversholm 132382dca3 More remapped patches
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 17:52:05 +02:00
Mariell Hoversholm a207d14a0e Rename all patches to correct numbering scheme
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 15:46:44 +02:00
Mariell Hoversholm 35487dbfcc Apply a few more patches
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 15:46:25 +02:00
Mariell Hoversholm 648fec34e4 Rename POM changes to build system changes
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 14:33:08 +02:00
Mariell Hoversholm 1eedd5991a Remap POM changes patch
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-11 14:31:17 +02:00
MiniDigger 4d225813a1 Move patches around 2021-06-11 14:02:28 +02:00
MiniDigger 73bcb74f23 Inital remap of patches 2021-06-11 13:56:17 +02:00
Kyle Wood c1aacf62b5 Initial Spigot remap patches 2021-06-11 06:43:40 -05:00
Kyle Wood fc52b39f3f Move patches 2021-06-11 06:35:46 -05:00
Kyle Wood 604ebc2cac Update paperweight & build config for Spigot changes 2021-06-11 06:34:57 -05:00
MiniDigger 211b20ffa5 Did anyone say gradle? and paperweight? potentially even mojmap?! 2021-06-11 09:45:34 +02:00
MiniDigger 65dcb5348e hacked build changes, api applies cleanly 2021-06-11 08:29:15 +02:00
Jake Potrebic e04368045e Updated Upstream (Bukkit/CraftBukkit) (#5794)
Upstream has released updates that appear 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:
7e29f765 SPIGOT-6502: Loading a class from a library of another plugin resulted in a ClassCastException.

CraftBukkit Changes:
296df566 Remove outdated build delay.
2021-06-11 06:35:13 +02:00
MiniDigger | Martin c649585082 fix: wrong return in javadocs for bookmeta (#5579)
Closes #5574.
Reviewed-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-06-08 17:47:54 +02:00
Jake Potrebic 3dbb8926e5 Fix PotionSplashEvent for water splash potions (#5697) 2021-06-08 11:29:20 +00:00
Jake Potrebic b759d006ed Adds per-world spawn limits (#4837) 2021-06-08 10:52:01 +00:00
Jake Potrebic 81de619d3c Updated Upstream (CraftBukkit) (#5786)
Upstream has released updates that appear 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:
fae895ac Fix inconsistent commands
2021-06-08 06:39:24 +02:00
Max Lee 5e3604f1b4 Better fix for invulnerable crystals and improve Origin API (#5761) 2021-06-07 16:38:33 +01:00
Aurora d5fe9c8174 Updated Upstream (CraftBukkit) (#5784)
Upstream has released updates that appear 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:
3797d93e3 SPIGOT-6492: PortalCreateEvent#getBlocks() returns not all blocks by reason fire
2021-06-07 13:47:53 +02:00
Josh Roy d20e5b1954 Fix timings sometimes incorrectly marking commands (#5783) 2021-06-06 19:04:43 +00:00
TwoLeggedCat 0daded2f25 Add more line of sight methods (#5749) 2021-06-05 10:25:16 +02:00
Max Lee 8fd4e70db7 Improve seed based feature search to not load chunk (#5760)
This is done by returning the center location of the chunk at the height
 of the input location when the target chunk isn't loaded already which
 is exact enough for most use cases and will get more precise once the
 player is close enough for the chunk being loaded anyways.

As this might lead to less precise locations a config option to enable
 the sync loading of the chunks is provided.
2021-06-05 10:07:35 +02:00
Jake Potrebic 7ad8498c32 Make item validations configurable (#5775) 2021-06-05 07:56:05 +00:00
LemonCaramel 3673d6758e Fix Cannot be adventure component serialized when the legacy component is null (#5754) 2021-06-05 09:49:04 +02:00
Aikar afb0748a2c [Auto] Updated Upstream (Bukkit)
Upstream has released updates that appear 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:
04df07fe #615: Calculate the reachable nodes only once per transitive dependency check.
2021-06-04 18:22:15 -04:00
Josh RoyandSpottedleaf 7d751ad8d3 Fix dangerous end portal logic (#5776)
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-06-04 21:58:45 +00:00
Shane Freeder 12716324d9 Do not tick Chunk TickS for every chunk 2021-06-03 06:13:18 +01:00
Aikar af1a50993f [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
ebe18b9b0 SPIGOT-6487: Fix issue with villagers picking up items in certain situations
2021-06-02 22:27:31 -04:00
Josh Taylor 5d05da2579 Use original user input instead of legacy event result for AbstractChatEvent#originalMessage (#5770) 2021-06-02 15:57:54 -07:00
Shane Freeder f89be1281a [CI-SKIP] Fixup patch header 2021-06-02 05:51:15 +01:00
Shane Freeder acbb69e671 Restore vanilla water animal limit
Spotted by pheonix616, merged into a similar patch for the sake of
the patch numbers :o
2021-06-02 05:45:12 +01:00
BillyGalbreath ea381dde32 Reset villager inventory on cancelled pickup event (again) (#5766) (Fixes #5765) 2021-06-02 03:11:13 +00:00
Nassim b94a99b033 Updated Upstream (CraftBukkit) (#5762)
Upstream has released updates that appear 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:
90a4d64a Remove usage of Java 11 method not caught by animal sniffer
c51c0f7f SPIGOT-6483: Fix cancelling EntityPickupEvent for villagers
2021-06-01 12:19:10 +02:00
Aikar f5cb169e01 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
769a579cb SPIGOT-6482: Baby piglins will pick up more items than vanilla
2021-06-01 04:42:33 -04:00
Owen1212055 407ad043cc Add ElderGuardianAppearanceEvent (#5394) 2021-05-31 06:18:38 +00:00
Jake Potrebic a04ad7bfb4 Fix invulnerable end crystals: MC-108513 (#5734) 2021-05-31 02:18:03 +01:00
Max Lee c894e8bbbe Fix issue with soft despawn distance (#5755)
Previously setting the soft despawn distance above the default
 value of 32 would mean that an entity outside of the 32 range
 would still count ticksFarFromPlayer up every tick without
 resetting it which might lead to the entity (almost) instantly
 despawning once it went outside of the configured distance
 instead of waiting 600 ticks.
2021-05-31 00:46:42 +00:00
Owen1212055 302e5101a6 Add BellRevealRaiderEvent (#5729) 2021-05-30 12:52:01 +00:00
Gergely Sarkozi 34e6b2dc39 editMeta: tighten contract via docs (#5714) 2021-05-30 11:45:46 +00:00
Shane Freeder db2d501ba3 Do not print spawn loaded chunks
This counter is no longer accurate due to the fact that paper does not block for these loads
to finish
2021-05-30 03:02:23 +01:00
Jake Potrebic 86ffde0384 Add getHandRaised to LivingEntity (#5752) 2021-05-30 01:51:13 +00:00
Kezz 9072c349a0 Fix broadcast event and add Adventure broadcast (#5477) 2021-05-29 15:56:24 -07:00
Jake Potrebic 525d0e3d37 fix beacon activate/deactivate events (#5646) 2021-05-29 16:22:47 +01:00
Aikar e403d6aafc [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
a0149bf16 SPIGOT-6480: Players cannot take books from lecterns that were opened by plugins
2021-05-29 05:07:34 -04:00
Jake Potrebic 6bcd8b57c9 Updated Upstream (CraftBukkit) (#5742) 2021-05-28 23:23:38 +00:00
BillyGalbreath 501cc94488 Reset villager inventory on cancelled pickup event (#5738) 2021-05-28 06:17:05 -07:00
Jason 3f72a549b0 Exit with non-zero exit code when killed by watchdog (#5732) 2021-05-28 00:29:41 -07:00
Jake Potrebic a8d7ad0995 Updated Upstream (Bukkit/CraftBukkit) (#5735) 2021-05-27 23:24:27 +00:00
Giovanni D 2299159bbb Add option to fix items merging through blocks (#5334)
Fixes #5204
2021-05-27 18:38:24 +02:00
Jake Potrebic d8c20ddc77 Fix PlayerBucketEmptyEvent result itemstack (#5698)
Fixes SPIGOT-2560: https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-2560
2021-05-27 17:43:55 +02:00
HexedHero ceb3762fb1 Add PufferFishStateChangeEvent (#5606) 2021-05-27 15:14:52 +00:00
Prof-Bloodstone cd4defec04 [CI-SKIP] Update version checker to use V2 downloads API (#5728) 2021-05-27 14:25:24 +01:00
Yive b9f2a673d3 Limit item frame cursors on maps (#5730)
Fixes an issue where you can have thousands of these and lag clients.
2021-05-26 22:16:17 +00:00
Jake Potrebic 81a537c1f3 Add PlayerKickEvent causes (#5648) 2021-05-25 20:20:28 +02:00
LemonCaramel b7976b9568 Add More Lidded Block API (#5707) 2021-05-25 20:05:03 +02:00
Aikar 41e6073ced [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
afa0678e1 SPIGOT-6133: Chorus fruit consumption calls PlayerTeleportEvent multiple times
2021-05-24 18:37:30 -04:00
Jake Potrebic 6f93dc95dc Add cause to Weather/ThunderChangeEvents (#4832) 2021-05-24 18:45:23 +02:00
Aikar 507cf19b3a [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-05-24 06:57:30 -04:00
Alexander afe0785bfe Added PlayerPurchaseEvent for standalone Merchant GUIs (#5583) 2021-05-24 10:51:06 +00:00
Nassim 615df3d8a6 Fix entity motion tag from mob spawners (#5718) 2021-05-24 09:18:26 +00:00
Jake Potrebic 2d34898b55 Add methods for getting default item attributes (#5593) 2021-05-24 07:52:31 +00:00
Jake Potrebic d9766433ec Add EntityInsideBlockEvent (#5596) 2021-05-24 09:39:49 +02:00
Riley Park 47d48790d1 Change return type of ItemStack#editMeta to allow checking for successful vs non-successful edits 2021-05-23 12:32:43 -07:00
Gergely Sarkozi 7aabe7d56b [CI-SKIP] fix minecart vs minecraft typos (#5713) 2021-05-23 16:11:06 +02:00
Mariell Hoversholm f775e87b4e [CI-SKIP] ci: update setup-java action (#5710)
* ci: update setup-java action
* ci: change java distribution to adopt

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-05-23 12:18:19 +00:00
Mariell Hoversholm c58b3b277c ci: replace Java 11 with Java 16 in GH Actions build flow (#5709)
* ci: add Java 16 to GH Actions build flow

With our new dependence on Java 16+ as of Minecraft 1.17 (refer to:
https://www.minecraft.net/en-us/article/minecraft-snapshot-21w19a), we
should also ensure everything we merge builds on Java 16.

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>

* ci: remove Java 11 from build flow

Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-05-23 05:12:50 -07:00
Riley Park 4b72327a65 ItemStack#editMeta
fixes #5711
2021-05-23 05:06:39 -07:00
Andrew Steinborn 68984b6645 Add Unix domain socket support (#5611)
Tested-by: Mariell Hoversholm <proximyst@proximyst.com>
Reviewed-by: Mariell Hoversholm <proximyst@proximyst.com>
2021-05-23 11:18:50 +00:00
BillyGalbreath 68c67e6800 Add Mob#lookAt API (#5633) 2021-05-23 02:55:28 -07:00
Aikar 4bacecd164 [Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
f563167d SPIGOT-6464: Fix ShulkerBox#getColor for undyed shulkers

CraftBukkit Changes:
9c7acb6cb SPIGOT-6464: Fix ShulkerBox#getColor for undyed shulkers
2021-05-22 18:42:32 -04:00
Jason 1f28e6eeb2 Fix default ChatRenderer when no plugins are installed (#5702) 2021-05-21 21:08:18 -04:00
Jason ecb0d32cae Enhance (Async)ChatEvent with per-viewer rendering API (#5684) 2021-05-21 15:55:54 -07:00
Jason f3e541ca1b Actually list all missing hard depends (#5701) 2021-05-21 16:31:37 -04:00
Aikar 11f83fe8e0 [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-05-21 06:22:38 -04:00
SamB440 a36e5d65ff MC-148809: Fix incorrect structure block data length 2021-05-21 12:16:42 +02:00
Nassim 3dcbdc73bd Fix force upgrade patch (#5699) 2021-05-21 08:29:49 +00:00
Jake Potrebic dab6ec6cdf List all missing hard depends not just first (#5673) 2021-05-21 05:33:41 +00:00
Jake PotrebicandSpottedleaf aed5031e31 Fix/Optimize world and light datafixes (#5693)
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2021-05-20 20:31:08 -04:00
Aikar 719040d922 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
d49530f9c #845: Remove unnecessary calls to Class#getSimpleName in PDC
2021-05-20 18:37:31 -04:00
Aikar 6c183f1ae0 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
7df5e6f87 Make Vanilla /list respect Vanish API
2021-05-19 18:57:26 -04:00
Shane Freeder 2c6b1f048d Revert "Remove itneract event from boat" (Fixes #5677) 2021-05-19 13:38:40 +01:00
jmp aae1c54a98 Add command line option to load extra plugin jars not in the plugins folder
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
2021-05-18 21:37:25 -07:00
Riley Park 322886c869 Avoid NPE due to PlayerBedFailEnterEvent
fixes #5670
2021-05-18 08:58:07 -07:00
Jake Potrebic d3c9a195cb removed duplicate ProjectileHitEvent for fireball (#5671) 2021-05-18 17:54:12 +02:00
Jake Potrebic 7989028a53 More Enchantment API (#5588) 2021-05-18 11:30:19 +02:00
Jake Potrebic c0cb5c129c Adds methods for checking item repairability (#5651) 2021-05-18 10:57:33 +02:00
Jake Potrebic 22399b07f8 Actually use extended/ambient in BeaconEffectEvent (#5647) 2021-05-18 08:43:46 +00:00
Jake Potrebic 979135878c Add cause and cancel message to PlayerGameModeChangeEvent (#5638) 2021-05-18 10:35:39 +02:00
LemonCaramel 51e1e58d2c Fix Adventure support in UnknownCommandEvent (#5664) 2021-05-18 04:54:25 +00:00
Aikar 45e19ffb00 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
cc21bae97 SPIGOT-5569: Call WorldInitEvent before any chunks are getting generated
2021-05-17 18:32:29 -04:00
Emily 1514576281 Fix Counter#decrement recursive call (#5665) 2021-05-17 18:19:02 +00:00
Aikar 21ac7dc988 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
1e8c432cd #816: Prevent duplicate slash removal for console / block commands
2021-05-17 04:22:25 -04:00
Riley Park 18ad2c9ddb Add environment variable (PAPER_DISABLE_SERVER_GUI) to disable server gui 2021-05-17 00:39:56 -07:00
Nassim 6ecbe57765 Rename leftover resource->datapack (#5662) 2021-05-17 07:59:20 +01:00
Riley Park ec90a78595 I give up on trying to teach people to avoid the incorrect ways. 2021-05-16 23:54:43 -07:00
Kacper Płażewski dc7b7a1600 Fix missing username console death message (#5654) (#5658) 2021-05-16 22:31:40 +00:00
Connor Linfoot c639a52a69 Add basic Datapack API (#5653) (#5653) 2021-05-16 16:09:46 -04:00
Nassim 99c1d9da6d Updated Upstream (CraftBukkit) (#5652)
Upstream has released updates that appear 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:
5b0e2d2d Move additional dependencies to runtime scope
2021-05-16 16:35:49 +00:00
Jake Potrebic 2d50c17e2d [CI-SKIP] Add PR rebasing steps (#5634) 2021-05-16 16:29:19 +00:00
Owen1212055 2c5f8085ea Remove boat interaction event (Fixes #5539) 2021-05-16 11:08:31 +01:00
Jake Potrebic 96ee1fb8fb fix WorldSaveEvent not firing with /save-all (#5650) 2021-05-16 04:51:19 +00:00
Jake Potrebic e90e7829ee remove unneeded patch (#5641) 2021-05-15 23:42:36 +00:00
Riley Park d875bacc28 Activate warning by default when people are doing silly things (#5642) 2021-05-15 15:56:38 -07:00
Jake Potrebic cb896d4710 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5643)
Upstream has released updates that appear 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:
146a7e4b SPIGOT-5345: Add automatic library support

CraftBukkit Changes:
b1064c69 Remove sisu annotation processor from jar
32e40866 SPIGOT-6189: Persistent data disappears when calling setFacingDirection on an item frame
d189f78b # 827: Trigger vanilla dimension advancements in non-main worlds
5bbb4a65 Add plumbing for automatic library support

Spigot Changes:
9fb885e8 Rebuild patches
2021-05-15 22:52:07 +00:00
Shane Freeder ecbf5a38e5 Revert "Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5636)"
This reverts commit 20fc4ab700.
2021-05-15 22:10:57 +01:00
Jake Potrebic 20fc4ab700 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5636)
Upstream has released updates that appear 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:
146a7e4b SPIGOT-5345: Add automatic library support

CraftBukkit Changes:
b1064c69 Remove sisu annotation processor from jar
32e40866 SPIGOT-6189: Persistent data disappears when calling setFacingDirection on an item frame
d189f78b #827: Trigger vanilla dimension advancements in non-main worlds
5bbb4a65 Add plumbing for automatic library support

Spigot Changes:
9fb885e8 Rebuild patches
2021-05-15 21:36:15 +01:00
Sceri 20d8812ea5 Fix CraftPotionBrewer cache (#5632) 2021-05-14 22:35:12 +02:00
MeFisto94 cd6ae8816e Add a "Should Burn in Sunlight" API for Phantoms and Skeletons (#5608) 2021-05-14 13:09:30 +00:00
Jake Potrebic 25edfe58b2 Remove unneeded component conversion for kick msg (#5626) 2021-05-14 12:52:03 +00:00
Jake Potrebic cec386f66c Call PortalCreateEvent when players enter the end (#5618) 2021-05-14 12:43:41 +00:00
Jason 453c7f05c7 Add ItemStack#displayName to get the formatted display name of an ItemStack (#5628)
The display name includes formatting such as item hover event, display name (in italics if renamed in anvil), and color based on rarity.

This is what vanilla uses for give command feedback, and when an item is shown in a death message.
2021-05-12 23:16:33 -07:00
Nassim 4efe8b498b Update Java version warning (#5621) 2021-05-12 15:58:21 +02:00
Jake Potrebic e0a021ccc6 Add ItemStack#getTranslationKey() (#5616) 2021-05-12 13:12:28 +02:00
Owen1212055 53d71b7179 Add setPotionUseTimeLeft to Witch (#5597) 2021-05-12 09:45:06 +00:00
Jake Potrebic 239935d183 Add Inventory#close (#5610) 2021-05-12 11:39:22 +02:00
Jake Potrebic 29bf6cd416 Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
51e2981b #831: Reload unloaded main worlds correctly
2021-05-12 11:26:31 +02:00
Connor Linfoot ad45f316cd Add raw address to AsyncPlayerPreLoginEvent (#5614) 2021-05-12 10:57:54 +02:00
Aikar 28865335a5 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
59e2ce9b7 SPIGOT-6224: EntityBreedEvent getEntity location inaccuracy
2021-05-11 04:42:31 -04:00
Jason 750049fa2b Fix incorrect colors in some log messages (#5609)
CraftChatMessage.fromComponent fails to take into account the style of TranslatableComponent args, causing any styling on args to be completely ignored.

Fixing this is relatively simple, however would cause behavior to deviate from upstream. This commit will fix the coloring in messages logged through MinecraftServer.LOGGER by simply using Adventure's legacy text serializer, which properly serializes TranslatableComponents and their arguments. Note that this doesn't do anything about the underlying issue of CraftChatMessage.fromComponent improperly serializing TranslatableComponents.
2021-05-10 20:47:51 -07:00
Alvinn8 c5fa3f0d4c Add Adventure message to PlayerAdvancementDoneEvent (#5030)
* Add Adventure message to PlayerAdvancementDoneEvent

* Add obfuscation helpers

* Renumber patches
2021-05-10 17:56:36 -07:00
Jake Potrebic 69c09cdb00 Updated Upstream (CraftBukkit) (#5607)
Upstream has released updates that appear 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:
e1a6197e SPIGOT-5565: Animals still spawn from chunk gen when spawn-animals=false
2021-05-11 00:22:11 +01:00
Owen1212055 b3cc88799f Add the ability to clear entities from block storage (#5598) 2021-05-10 07:33:39 +00:00
Jake Potrebic f50171f3bb Add missing rarity method on ItemStack (#5594) 2021-05-10 07:25:35 +00:00
Jake Potrebic aeb6e7dd25 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5601) 2021-05-09 21:50:09 +01:00
Gergely Sarkozi b0a4f353b9 fix cancelling block falling causing client desync (fixes #5386) (#5419) 2021-05-09 21:40:50 +01:00
Jason 8ed45920cf Don't annotate type parameters using JetBrains annotations (#5600) 2021-05-09 02:36:53 +00:00
TwoLeggedCat d7625d926d Add new methods from PlayerMoveEvent to EntityMoveEvent (#5591) 2021-05-08 10:25:30 +02:00
Jason 29785297b5 Allow for Component suggestion tooltips in AsyncTabCompleteEvent (#5504) 2021-05-07 23:12:03 +00:00
jmp 0aea6c2ff3 Use JsonSerializationContext#serialize instead of recursion for AdventureComponents - fixes #5580 and #5371 2021-05-07 00:49:41 -07:00
Jason 8fcef3c1f6 Return after sending empty commands (#5586) 2021-05-07 00:25:29 +01:00
Shane Freeder 2a67a9e512 Fix missing CraftMetaBook#toBuilder override 2021-05-06 17:37:09 +01:00
HexedHero 48aa061063 Add more Wandering Trader API (#5020) 2021-05-06 16:26:50 +02:00
Andrew Steinborn 8cec462a5f [CI-SKIP] Remove Astei from the MIT list (#5577)
* Remove myself from the MIT list

I acknowledge that prior patches will not be retroactively relicensed (which is desirable).

* Fix typo
2021-05-05 09:17:14 +02:00
Prof-Bloodstone 21fbc31963 [CI-SKIP] Add Other textarea to issue templates (#5562) 2021-05-05 04:00:10 +01:00
Shane Freeder 453e983e4b fix isProxyOnlineMode coverage, don't lookup UUIDs in offline mode (Fixes #2011) 2021-05-05 03:54:42 +01:00
Shane Freeder 81cc4f9280 Send empty commands if tab completion is disabled (Closes #5519)
Because this is a trivial fix to an annoying issue people are annoying
about, but, really, stop punishing your players for your own insecurities.
2021-05-05 03:22:32 +01:00
KennyTV 9ed3e470d9 Keep moveToWorld with old method signature 2021-05-04 12:34:12 +02:00
Aikar 99a66a5838 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
7ea8b96b4 #826: Make dispenser trigger fertilize event
2021-05-03 04:42:29 -04:00
Aikar 976c6d425b [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-05-02 15:37:24 -04:00
HexedHero 51deec726e Drop unneeded portal patch (#5566) 2021-05-02 19:33:17 +00:00
Aikar 07a18c4579 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
95544a2da SPIGOT-6350: Fix wrong portal block place order
2021-05-02 05:07:27 -04:00
Aikar 6733d78753 [Auto] Updated Upstream (Bukkit)
Upstream has released updates that appear 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:
5eece9f8 Fix typo in BubbleColumn documentation
2021-05-01 21:57:27 -04:00
Aikar 9958447cba [Auto] Updated Upstream (Bukkit)
Upstream has released updates that appear 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:
a030a41b SPIGOT-6443: Fix PlayerBucketFishEvent#getWaterBucket returning the wrong item
2021-04-30 18:42:24 -04:00
Aikar 840e72091f [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2021-04-30 10:17:21 -04:00
Spyros (Spyridon) Pagkalos a33232d4a6 Add beacon activation and deactivation events (#5121) 2021-04-30 10:15:00 -04:00
Nassim bc7ea673a1 Add internal channel initialization listeners (#5557) 2021-04-30 09:47:45 -04:00
KennyTV b28ad17ac9 Check for world change in MoveEvent API methods 2021-04-30 15:30:06 +02:00
Aikar 3095c75921 [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
6f55b5b88 SPIGOT-6442: Do not cancel zero damage on fireballs
2021-04-30 04:12:22 -04:00
Jake Potrebic f56989c97d Add RespawnFlags to PlayerRespawnEvent (#5533) 2021-04-30 09:47:10 +02:00
HexedHero 7579c26678 Add more API to PlayerMoveEvent (#5553) 2021-04-30 09:32:50 +02:00
Aikar ef60c01c4d [Auto] Updated Upstream (CraftBukkit)
Upstream has released updates that appear 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:
f3ed1ac1d SPIGOT-6430: Fix fungi tree not generating
2021-04-28 17:52:35 -04:00
Aikar 0256dbea38 [Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
1c0c52ae SPIGOT-6373: Add getAttachedFace and setAttachedFace to the Shulker API

CraftBukkit Changes:
69c8e7850 SPIGOT-6373: Add getAttachedFace and setAttachedFace to the Shulker API
2021-04-27 22:52:29 -04:00
Jake Potrebic 91ef740292 Updated Upstream (Spigot) (#5550)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Spigot Changes:
4225eac0 SPIGOT-6423: Improve IP forwarding
2021-04-28 00:38:35 +01:00
Jake Potrebic fdf2a59d59 Updated Upstream (Bukkit/CraftBukkit) (#5549)
Upstream has released updates that appear 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:
80ece5de Remove old draft API tags
8523fa23 #604: Add Contract annotation to ConfigurationSection
dd8edaa7 #603: Specify what velocity changes in javadocs

CraftBukkit Changes:
0d86921e SPIGOT-6435: send correcting "PacketPlayOutBlockChange" packet on interact for bisected items
2021-04-27 16:51:42 +01:00
Aurora b8020379c6 Extract Adventure Version into a variable, add reminder to update the linked JD on the homepage (#5422) 2021-04-26 23:11:38 +02:00
HexedHero 809466f2e7 Fix anchor respawn acting as a bed respawn when using the end portal (#5540) 2021-04-25 10:45:34 +02:00
Aikar d219fd642f [Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear 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:
6bff9d09 #508: Add PlayerBucketFishEvent

CraftBukkit Changes:
a8d7c94a5 SPIGOT-6434: Smithing Table and Anvil inventories .getType() returns CRAFTING
c5494d195 #683: Add PlayerBucketFishEvent
2021-04-24 18:47:20 -04:00
Jason db464b099e Implement methods to convert between Component and Brigadier's Message (#5542) 2021-04-24 18:16:41 -04:00
2685 changed files with 321252 additions and 125936 deletions

No files matched your search

+37 -1
View File
@@ -1,6 +1,42 @@
[*.java]
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true
[*.tiny]
indent_style=tab
[*.bat]
end_of_line=crlf
[*.yml]
indent_size=2
[*.patch]
trim_trailing_whitespace=false
[*.java]
ij_continuation_indent_size = 4
ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false
ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *,|,$*
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
ij_java_method_parameters_new_line_after_left_paren = true
ij_java_method_parameters_right_paren_on_new_line = true
[test-plugin/**/*.java]
ij_java_use_fq_class_names = false
[Paper-Server/src/main/resources/data/**/*.json]
indent_size = 2
[paper-api-generator/generated/**/*.java]
ij_java_imports_layout = $*,|,*
+7
View File
@@ -0,0 +1,7 @@
* text=auto eol=lf
*.sh text eol=lf
gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
+1 -1
View File
@@ -1,2 +1,2 @@
* @PaperMC/core-team @PaperMC/maintainers
* @PaperMC/paper-maintainers
/.github/CODEOWNERS @PaperMC/core-team
+42
View File
@@ -0,0 +1,42 @@
labels: ["status: needs triage"]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a feature request for Paper! Please be as detailed as possible so that we may consider and review the request easier.
We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please give some context for this request. Why do you want it added?
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A clear and concise description of what you want.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: List any alternatives you might have tried to get the feature you want.
validations:
required: true
- type: textarea
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
validations:
required: false
- type: markdown
attributes:
value: |
Before submitting this feature request, please search our issue tracker to ensure your feature has not
already been requested.
@@ -1,36 +1,37 @@
name: Behavior Bug or Plugin Incompatibility
description: Report issues with plugin incompatbility or other behavior related issues.
labels: [ "status: needs triage", "type: bug" ]
body:
- type: markdown
attributes:
value: |
Before reporting a crash here, please make sure you are on the latest version of Paper.
Forks of Paper receive no support here. If you are using a fork, please make sure that this issue also happens when using Paper.
- type: textarea
attributes:
label: Expected behavior
description: What you expected to see.
validations:
required: true
- type: textarea
attributes:
label: Observed/Actual behavior
description: What you actually saw.
validations:
required: true
- type: textarea
attributes:
label: Steps/models to reproduce
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue.
validations:
required: true
- type: textarea
attributes:
label: Plugin list
description: All plugins running on the server.
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Paper version
@@ -43,31 +44,34 @@ body:
```
> version
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
[20:34:42 INFO]: You are running the latest version
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
```
</details>
validations:
required: false
required: true
- type: checkboxes
- type: textarea
attributes:
label: Agreements
description: Please agree to the following.
options:
- label: I am running the latest version of Paper available from https://papermc.io/downloads.
required: true
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: My version of Minecraft is supported by Paper.
required: true
label: Other
description: |
Please include other helpful information below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Please include other helpful information below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
2. You searched for and ensured there isn't already an open issue regarding this.
3. Your version of Minecraft is supported by Paper.
If you think you have a bug but are not sure, feel free to ask the `#paper-help` channel of our
[Discord](https://discord.gg/papermc).
+9 -1
View File
@@ -1,5 +1,13 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/PaperMC/Paper/discussions/new?category=ideas
about: Suggest an idea for Paper
- name: PaperMC Discord
url: https://discord.gg/papermc
about: If you are having issues with timings or have other minor issues, come ask us on our Discord server!
about: If you are having issues with spark or have other minor issues, come ask us on our Discord server!
- name: Exploit Report
url: https://discord.gg/papermc
about: |
Due to GitHub not currently allowing private issues, exploit reports are currently handled via our Discord.
To report an exploit, see the #paper-exploit-report channel.
@@ -1,42 +0,0 @@
name: Feature Request
description: Suggest an idea for Paper
body:
- type: markdown
attributes:
value: |
Thank you for filling out a feature request for Paper! Please be as detailed as possible so that we may consider and review the request easier.
We ask that you search all the issues to avoid a duplicate feature request. If one exists, please reply if you have anything to add.
Before requesting a new feature, please make sure you are using the latest version and that the feature you are requesting is not already in Paper.
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: Please give some context for this request. Why do you want it added?
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A clear and concise description of what you want.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered.
description: List any alternatives you might have tried to get the feature you want.
validations:
required: true
- type: checkboxes
attributes:
label: Agreements
description: Please agree to the following.
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the feature I'm requesting isn't already in the latest supported Paper build.
required: true
- type: markdown
attributes:
value: Add any other context or screenshots about the feature request below.
+31 -24
View File
@@ -1,34 +1,41 @@
name: Performance Problem
description: Report performance related problems or other areas of concern
labels: [ "status: needs triage", "type: performance" ]
body:
- type: markdown
attributes:
value: |
Before reporting performance problems here, please make sure you are on the latest version of Paper.
Forks of Paper receive no support here. If you are using a fork, please make sure that this problem also affects Paper.
Before creating an issue regarding server performance, please consider reaching out for support in the
`#paper-help` channel of [our Discord](https://discord.gg/papermc)!
- type: input
attributes:
label: Timings or Profile link
description: We ask that all timings/profiles are a link, not a screenshot. Screenshots inhibit our ability to figure out the real cause of the issue.
placeholder: "Example: https://timings.aikar.co/?id=6b48586fbbdd48e585ca0ebb07c59dd0"
label: Profile link
description: We ask that all profiles are a link, not a screenshot. Screenshots inhibit our ability to figure out the real cause of the issue.
placeholder: "Example: https://spark.lucko.me/XsN0hxGfsi"
validations:
required: true
- type: textarea
attributes:
label: Description of issue
description: If applicable, please describe your issue.
validations:
required: false
- type: textarea
attributes:
label: Plugin list
description: All plugins running on the server.
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Server config files
description: We need bukkit.yml, spigot.yml, paper.yml, and server.properties. You can paste it below or use a paste site like https://paste.gg.
description: We need bukkit.yml, spigot.yml, paper-global.yml, paper-world-defaults.yml and server.properties. If you use per-world Paper configs, make sure to include them. You can paste it below or use a paste site like https://paste.gg.
value: |
```
Paste configs or paste.gg link here!
@@ -36,6 +43,7 @@ body:
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
validations:
required: true
- type: textarea
attributes:
label: Paper version
@@ -48,30 +56,29 @@ body:
```
> version
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
[20:34:42 INFO]: You are running the latest version
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
```
</details>
validations:
required: false
required: true
- type: checkboxes
- type: textarea
attributes:
label: Agreements
description: Please agree to the following.
options:
- label: I am running the latest version of Paper available from https://papermc.io/downloads.
required: true
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: My version of Minecraft is supported by Paper.
required: true
label: Other
description: |
Please include other helpful links below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Please include other helpful links below.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
2. You searched for and ensured there isn't already an open issue regarding this.
3. Your version of Minecraft is supported by Paper.
@@ -1,13 +1,7 @@
name: Server crash or Stacktrace
description: Report server crashes or scary stacktraces
labels: [ "status: needs triage" ]
body:
- type: markdown
attributes:
value: |
Before reporting a crash here, please make sure you are on the latest version of Paper.
Forks of Paper receive no support here. If you are using a fork, please make sure that this crash also happens when using Paper.
Please do not make reports when the report says "DO NOT REPORT THIS TO PAPER". These are simply messages informing you of lag, to find what is causing it. Ask for tips on Discord or IRC instead.
- type: textarea
attributes:
label: Stack trace
@@ -21,18 +15,23 @@ body:
placeholder: Please don't remove the backticks; it makes your issue a lot harder to read!
validations:
required: true
- type: textarea
attributes:
label: Plugin list
description: All plugins running on the server.
label: Plugin and Datapack List
description: |
All plugins and datapacks running on your server.
To list plugins, run `/plugins`. For datapacks, run `/datapack list`.
validations:
required: true
- type: textarea
attributes:
label: Actions to reproduce (if known)
description: This may include a build schematic, a video, or detailed instructions to help reconstruct the issue. Anything helps!
validations:
required: false
- type: textarea
attributes:
label: Paper version
@@ -45,30 +44,33 @@ body:
```
> version
[20:34:42 INFO]: This server is running Paper version git-Paper-540 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[20:34:42 INFO]: Checking version, please wait...
[20:34:42 INFO]: Previous version: git-Paper-538 (MC: 1.16.5)
[20:34:42 INFO]: This server is running Paper version 1.21-105-master@7e91a2c (2024-07-20T21:04:31Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
[20:34:42 INFO]: You are running the latest version
[20:34:42 INFO]: Previous version: 1.21-103-aa3b356 (MC: 1.21)
```
</details>
validations:
required: false
required: true
- type: checkboxes
- type: textarea
attributes:
label: Agreements
description: Please agree to the following.
options:
- label: I am running the latest version of Paper available from https://papermc.io/downloads.
required: true
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: My version of Minecraft is supported by Paper.
required: true
label: Other
description: |
Please include other helpful information below, if any.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
validations:
required: false
- type: markdown
attributes:
value: |
Please include other helpful information below, if any.
The more information we receive, the quicker and more effective we can be at finding the solution to the issue.
Before submitting this issue, please ensure the following:
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
2. Your version of Minecraft is supported by Paper.
If your server crash log contains `DO NOT REPORT THIS TO PAPER`, please ask in our
[Discord](https://discord.gg/papermc) before opening this issue. These messages are informing you of server
lag and providing debug information.
-18
View File
@@ -1,18 +0,0 @@
daysUntilStale: 60
daysUntilClose: 7
exemptLabels:
- "for: future"
- "type: bug"
- "status: accepted"
- "status: blocked"
- "status: in progress"
- "status: rebase required"
staleLabel: "resolution: stale"
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
closeComment: >
This issue has been automatically closed because it has not had activity in
a long time. If the issue still applies to the most recent supported
version, please open a new issue referencing this original issue.
+112 -32
View File
@@ -1,38 +1,118 @@
# Here lie dragons!
#
# Note that there is no artifact step in this script. We do not want Paperclip
# jars to be built for every push & PR; our CI handles pushes to branches, while
# PRs can themselves link to Paperclip jars if it is necessary. Official such
# PRs will take use of testing builds.
# This action either builds the server or
# builds a paperclip jar to be updated in the body
# of the PR relating to this action.
name: Build Paper
on: [push, pull_request]
on:
push:
pull_request:
types:
- opened
- reopened
- synchronize
- labeled
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 8]
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache maven
uses: actions/cache@v2
with:
path: |
~/.m2/repository/
work/Minecraft
key: ${{ runner.os }}-paper-2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-paper-2
- name: Patch and build
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "Github Actions"
./paper build
- name: Build javadocs
run: mvn -pl Paper-API,Paper-MojangAPI -am javadoc:javadoc
build:
# Run on all label events (won't be duplicated) or all push events or on PR syncs not from the same repo
if: (github.event_name == 'pull_request' && github.event.action == 'labeled') || github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
strategy:
matrix:
java: [21]
fail-fast: true
steps:
- if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v4
- if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Configure Build
uses: actions/github-script@v7
id: determine
env:
REF_NAME: "${{ github.ref_name }}"
REF_TYPE: "${{ github.ref_type }}"
EVENT: "${{ toJSON(github.event) }}"
EVENT_TYPE: "${{ github.event_name }}"
with:
script: |
const {owner, repo} = context.repo;
const event_name = `${process.env.EVENT_TYPE}`;
const event = JSON.parse(`${process.env.EVENT}`);
const ref_type = `${process.env.REF_TYPE}`;
const ref_name = `${process.env.REF_NAME}`;
const result = {
action: "build"
};
if (event_name === "push" && ref_type === "branch") {
const {data: pulls} = await github.rest.pulls.list({ owner, repo, head: `${owner}:${ref_name}`, state: "open" });
const pull = pulls.find((pr) => !!pr.labels.find((l) => l.name === "build-pr-jar"));
if (pull) {
result["pr"] = pull.number;
result["action"] = "paperclip";
core.notice(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`);
return result;
}
} else if (event_name === "pull_request" && event.pull_request.labels.find((l) => l.name === "build-pr-jar")) {
result["pr"] = event.pull_request.number;
result["action"] = "paperclip";
core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
return result;
}
core.notice("This will not build a paperclip jar");
return result;
- name: Apply Patches
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "GitHub Actions"
./gradlew applyPatches --stacktrace
- name: Build
run: ./gradlew build --stacktrace
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results (${{ matrix.java }})
path: |
**/build/test-results/test/TEST-*.xml
- name: Create Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
run: ./gradlew createMojmapPaperclipJar --stacktrace
- name: Upload Paperclip Jar
if: fromJSON(steps.determine.outputs.result).action == 'paperclip'
uses: actions/upload-artifact@v4
with:
name: paper-${{ fromJSON(steps.determine.outputs.result).pr }}
path: build/libs/paper-paperclip-*-mojmap.jar
event_file:
name: "Event File"
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
+27
View File
@@ -0,0 +1,27 @@
name: Close invalid PRs
on:
pull_request_target:
types: [ opened ]
jobs:
run:
if: |
github.repository != github.event.pull_request.head.repo.full_name &&
(
github.head_ref == 'master' ||
github.event.pull_request.head.repo.owner.type != 'User'
)
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
id: "master_branch"
if: github.head_ref == 'master'
with:
comment: "Please do not open pull requests from the `master` branch, create a new branch instead."
- uses: superbrothers/close-pull-request@v3
id: "org_account"
if: github.event.pull_request.head.repo.owner.type != 'User' && steps.master_branch.outcome == 'skipped'
with:
comment: "Please do not open pull requests from non-user accounts like organizations. Create a fork on a user account instead."
+84
View File
@@ -0,0 +1,84 @@
# This workflow run on the completion of the
# build workflow but only does anything if the
# triggering workflow uploaded an artifact.
#
# Do note that it is then the trigger workflow that
# determines if this will update the PR text body. All
# this workflow does is check if an uploaded artifact
# exists and there is a PR tied to the previous workflow.
name: Comment on pull request
on:
workflow_run:
workflows: ['Build Paper']
types: [completed]
jobs:
pr_comment:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
env:
BRANCH_NAME: "${{ github.event.workflow_run.head_branch }}"
PR_OWNER: "${{ github.event.workflow_run.head_repository.owner.login }}"
PR_SHA: "${{ github.event.workflow_run.head_sha }}"
RUN_ID: "${{ github.event.workflow_run.id }}"
REPO_ID: "${{ github.event.repository.id }}"
EVENT_TYPE: "${{ github.event.workflow_run.event}}"
PULL_REQUESTS: "${{ toJSON(github.event.workflow_run.pull_requests) }}"
with:
# This snippet is public-domain, taken from
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
# Modified extensively by Machine_Maker
script: |
async function updatePR(owner, repo, issue_number, purpose, body) {
const { data } = await github.rest.issues.get({ owner, repo, issue_number });
core.debug(JSON.stringify(data, null, 2));
const marker = `<!-- bot: ${purpose} -->`;
let new_body = data.body ? data.body.trim().split(marker)[0].trim() : "";
new_body += `\n${marker}\n---\n${body}`;
core.info(`Updating the text body of PR #${issue_number} in ${owner}/${repo}`);
await github.rest.issues.update({ owner, repo, issue_number, body: new_body });
}
const { owner, repo } = context.repo;
const run_id = `${process.env.RUN_ID}`;
const repo_id = `${process.env.REPO_ID}`;
let pulls = [];
const event_type = `${process.env.EVENT_TYPE}`;
if (event_type === "push") { // if push, it's from the same repo which means `pull_requests` is populated
pulls = JSON.parse(`${process.env.PULL_REQUESTS}`);
} else {
const pr_branch = `${process.env.BRANCH_NAME}`;
const pr_sha = `${process.env.PR_SHA}`;
const pr_owner = `${process.env.PR_OWNER}`;
const { data } = await github.rest.pulls.list({ owner, repo, head: `${pr_owner}:${pr_branch}`, state: "open" });
core.debug(JSON.stringify(data, null, 2));
pulls = data.filter((pr) => pr.head.sha === pr_sha && pr.labels.find((l) => l.name === "build-pr-jar"));
}
if (!pulls.length) {
return core.notice("This workflow doesn't have any pull requests!");
} else if (pulls.length > 1) {
core.info(JSON.stringify(pulls, null, 2));
return core.error("Found multiple matching PRs");
}
const pull_request = pulls[0];
const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { owner, repo, run_id });
if (!artifacts.length) {
return core.info("Skipping comment due to no artifact found");
}
const artifact = artifacts.find((art) => art.name === `paper-${pull_request.number}`);
if (!artifact) {
return core.info("Skipping comment to no matching artifact found");
}
const link = `https://nightly.link/${owner}/${repo}/actions/artifacts/${artifact.id}.zip`;
const body = `Download the paperclip jar for this pull request: [${artifact.name}.zip](${link})`;
core.info(`Adding a link to ${link}`);
await updatePR(owner, repo, pull_request.number, "paperclip-pr-build", body);
+76
View File
@@ -0,0 +1,76 @@
name: Update Projects
on:
issues:
types:
- labeled
- unlabeled
- closed
- reopened
jobs:
bugs:
if: "github.event_name == 'issues' && contains(github.event.*.labels.*.name, 'type: bug')"
concurrency:
group: update-bugs-project-${{ github.event.issue.number }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: "authenticate"
id: "authenticate"
uses: "tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92" # v1
with:
app_id: "${{ secrets.PROJECTS_APP_ID }}"
installation_id: "36153445"
private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
- uses: PaperMC/update-projects-action@v0.2.0
name: Update open issue
if: github.event.issue.state == 'open'
with:
github-token: "${{ steps.authenticate.outputs.token }}"
project-url: https://github.com/orgs/PaperMC/projects/5/views/2
column-field: Status
label-to-column-map: |
{
"resolution: awaiting response": "⌛ Awaiting Response",
"resolution: cannot reproduce": "Invalid",
"resolution: duplicate": "Invalid",
"resolution: incomplete": "Invalid",
"resolution: invalid": "Invalid",
"resolution: superseded": "Invalid",
"resolution: unsupported": "Invalid",
"resolution: won't fix": "Invalid",
"resolution: works as intended": "Invalid",
"status: accepted": "✅ Accepted",
"status: blocked": "Needs Work",
"status: defer upstream": "Needs Work",
"status: in progress": "Needs Work",
"status: input wanted": "Needs Work",
"status: needs triage": "🕑 Needs Triage",
"status: rebase required": "Needs Work",
"status: unlikely": "✅ Accepted"
}
- uses: PaperMC/update-projects-action@v0.2.0
name: Update closed issue
if: github.event.issue.state == 'closed'
with:
github-token: "${{ steps.authenticate.outputs.token }}"
project-url: https://github.com/orgs/PaperMC/projects/5/views/2
column-field: Status
clear-on-no-match: false
# include "status: needs triage" below to catch any closed issues without setting a resolution
label-to-column-map: |
{
"resolution: cannot reproduce": "Invalid",
"resolution: duplicate": "Invalid",
"resolution: incomplete": "Invalid",
"resolution: invalid": "Invalid",
"resolution: superseded": "Invalid",
"resolution: unsupported": "Invalid",
"resolution: won't fix": "Invalid",
"resolution: works as intended": "Invalid",
"status: accepted": "Done",
"status: needs triage": "Invalid"
}
+32
View File
@@ -0,0 +1,32 @@
name: Test Results
on:
workflow_run:
workflows: [ "Build Paper" ]
types:
- completed
permissions: { }
jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'
permissions:
checks: write
# for downloading test result artifacts
actions: read
steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@v3
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
comment_mode: off
+12 -1
View File
@@ -1,3 +1,6 @@
.gradle/
build/
# Eclipse stuff
.classpath
.project
@@ -21,7 +24,6 @@ dependency-reduced-pom.xml
.*.sw[a-p]
# various other potential build files
build/
bin/
dist/
manifest.mf
@@ -51,11 +53,15 @@ work/ForgeFlower
.idea/
out/
# JetBrains Fleet
.fleet/
# Linux temp files
*~
# other stuff
run/
logs/
Paper-Server
Paper-API
@@ -63,3 +69,8 @@ Paperclip.jar
paperclip.jar
paperclip-*.jar
paperclip.properties
!gradle/wrapper/gradle-wrapper.jar
test-plugin.settings.gradle.kts
paper-api-generator.settings.gradle.kts
-3
View File
@@ -10,6 +10,3 @@
[submodule "work/Spigot"]
path = work/Spigot
url = https://hub.spigotmc.org/stash/scm/spigot/spigot.git
[submodule "work/Paperclip"]
path = work/Paperclip
url = https://github.com/PaperMC/Paperclip.git
+203 -217
View File
@@ -4,43 +4,11 @@ PaperMC is happy you're willing to contribute to our projects. We are usually
very lenient with all submitted PRs, but there are still some guidelines you
can follow to make the approval process go more smoothly.
**Table of contents:**
<!-- Please don't remove the following comments.
To generate and update the TOC: https://github.com/mzlogin/vim-markdown-toc -->
<!-- vim-markdown-toc GFM -->
* [Use a Personal Fork and not Organization](#use-a-personal-fork-and-not-organization)
* [Requirements](#requirements)
* [Understanding Patches](#understanding-patches)
* [Adding Patches](#adding-patches)
* [Modifying Patches](#modifying-patches)
* [Method 1](#method-1)
* [Using the Paper tool](#using-the-paper-tool)
* [Manual method: Stashing](#manual-method-stashing)
* [Method 2 - Fixup commits](#method-2---fixup-commits)
* [Manual method](#manual-method)
* [Automatic method](#automatic-method)
* [PR Policy](#pr-policy)
* [Formatting](#formatting)
* [Patch Notes](#patch-notes)
* [Obfuscation Helpers](#obfuscation-helpers)
* [Configuration files](#configuration-files)
* [PaperConfig example](#paperconfig-example)
* [PaperWorldConfig example](#paperworldconfig-example)
* [Frequently Asked Questions](#frequently-asked-questions)
* [I can't find the NMS file I need!](#i-cant-find-the-nms-file-i-need)
* [Where can I learn how to name method/field?](#where-can-i-learn-how-to-name-methodfield)
* [My commit doesn't need a build, what do I do?](#my-commit-doesnt-need-a-build-what-do-i-do)
* [Patching and building is *really* slow, what can I do?](#patching-and-building-is-really-slow-what-can-i-do)
* [I wrote some API, how do I use it in Paper-Server?](#i-wrote-some-api-how-do-i-use-it-in-paper-server)
<!-- vim-markdown-toc -->
## Use a Personal Fork and not Organization
## Use a Personal Fork and not an Organization
Paper will routinely modify your PR, whether it's a quick rebase or to take care
of any minor nitpicks we might have. Often, it's better for us to solve these
problems for you than make you go back and forth trying to fix it yourself.
problems for you than make you go back and forth trying to fix them yourself.
Unfortunately, if you use an organization for your PR, it prevents Paper from
modifying it. This requires us to manually merge your PR, resulting in us
@@ -59,25 +27,26 @@ which can be obtained in (most) package managers such as `apt` (Debian / Ubuntu;
you will most likely use this for WSL), `homebrew` (macOS / Linux), and more:
- `git` (package `git` everywhere);
- `patch` (often package `patch`);
- A Java 8 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
If you need one, you can find them on [AdoptOpenJDK](https://adoptopenjdk.net/).
- `maven` (often package `maven`; can be found on
[Apache's site](https://maven.apache.org/download.cgi) too);
- `curl` (package `curl` everywhere).
- A Java 21 or later JDK (packages vary, use Google/DuckDuckGo/etc.).
- [Adoptium](https://adoptium.net/) has builds for most operating systems.
- Paper requires JDK 21 to build, however, makes use of Gradle's
[Toolchains](https://docs.gradle.org/current/userguide/toolchains.html)
feature to allow building with only JRE 11 or later installed. (Gradle will
automatically provision JDK 21 for compilation if it cannot find an existing
install).
If you're on Windows, check
[the section on WSL](#patching-and-building-is-really-slow-what-can-i-do).
If you're compiling with Docker, you can use the
[`adoptopenjdk`](https://hub.docker.com/_/adoptopenjdk/) images like so:
If you're compiling with Docker, you can use Adoptium's
[`eclipse-temurin`](https://hub.docker.com/_/eclipse-temurin/) images like so:
```console
# docker run -it -v "$(pwd)":/data --rm adoptopenjdk:8-jdk-hotspot bash
# docker run -it -v "$(pwd)":/data --rm eclipse-temurin:21.0.3_9-jdk bash
Pulling image...
root@abcdefg1234:/# javac -version
javac 1.8.0_252
javac 21.0.3
```
## Understanding Patches
@@ -87,8 +56,6 @@ split into different directories which target certain parts of the code. These
directories are:
- `Paper-API` - Modifications to `Spigot-API`/`Bukkit`;
- `Paper-MojangAPI` - An API for
[Mojang's Brigadier](https://github.com/Mojang/brigadier);
- `Paper-Server` - Modifications to `Spigot`/`CraftBukkit`.
Because the entire structure is based on patches and git, a basic understanding
@@ -98,24 +65,18 @@ of how to use git is required. A basic tutorial can be found here:
Assuming you have already forked the repository:
1. Clone your fork to your local machine;
1. Type `./paper patch` in a terminal to apply the changes from upstream;
1. cd into `Paper-Server` for server changes, and `Paper-API` for API changes.
You can also run `./paper server` or `./paper api` for these same directories
2. Type `./gradlew applyPatches` in a terminal to apply the changes from upstream.
On Windows, replace the `./` with `.\` at the beginning for all `gradlew` commands;
3. cd into `Paper-Server` for server changes, and `Paper-API` for API changes.
<!--You can also run `./paper server` or `./paper api` for these same directories
respectively.
1. You can also run `./paper setup`, which allows you to type `paper <command>`
from anywhere in the Paper structure in most cases.
from anywhere in the Paper structure in most cases.-->
`Paper-Server` and `Paper-API` aren't git repositories in the traditional sense:
- Every single commit in `Paper-Server`/`Paper-API` is a patch;
- `origin/master` points to a directory similar to `Paper-Server`/`Paper-API`
but for Paper;
- Typing `git status` should show that we are 10 or 11 commits ahead of master,
meaning we have 10 or 11 patches Spigot and CraftBukkit don't.
- If it says something like `212 commits ahead, 207 commits behind`,
cd into the root directory of the cloned repository and type `git fetch` to
update your upstream. Setting up a remote for the upstream Paper repository
might be necessary.
- `base` points to the unmodified source before Paper patches have been applied.
- Each commit after `base` is a patch.
## Adding Patches
@@ -124,7 +85,7 @@ Adding patches to Paper is very simple:
1. Modify `Paper-Server` and/or `Paper-API` with the appropriate changes;
1. Type `git add .` inside these directories to add your changes;
1. Run `git commit` with the desired patch message;
1. Run `./paper rebuild` in the main directory to convert your commit into a new
1. Run `./gradlew rebuildPatches` in the main directory to convert your commit into a new
patch;
1. PR the generated patch file(s) back to this repository.
@@ -135,7 +96,9 @@ Your commit will be converted into a patch that you can then PR into Paper.
## Modifying Patches
Modifying previous patches is a bit more complex:
Modifying previous patches is a bit more complex.
Similar to adding patches, the methods to modify a patch are applied inside
the `Paper-Server` and/or `Paper-API` folders.
### Method 1
@@ -145,38 +108,13 @@ edit it using `git rebase`.
> ❗ While in the middle of an edit, you will not be able to compile unless you
> *also* reset the opposing module(s) to a related commit. In the API's case,
> you must reset the Server, and reset the API if you're editing the Server.
#### Using the Paper tool
The PaperMC build tool provides a handy command to automatically do this type of
patch modification.
1. Type `./paper edit server` or `./paper edit api` depending on which project
you want to edit;
- It should show something like
[this](https://gist.github.com/zachbr/21e92993cb99f62ffd7905d7b02f3159) in
the text editor you get.
- If your editor does not have a "menu" at the bottom, you're using `vim`.
If you don't know how to use `vim` and don't want to
learn, enter `:q!` and press enter. Before redoing this step, do
`export EDITOR=nano` for an easier editor to use.
1. Replace `pick` with `edit` for the commit/patch you want to modify, and
"save" the changes;
- Only do this for **one** commit at a time.
1. Make the changes you want to make to the patch;
1. Type `./paper edit continue` in the root directory to finish and rebuild
patches;
1. PR your modified patch file(s) back to this repository.
#### Manual method: Stashing
In case you need something more complex or want more control, these step-by-step
instruction do exactly what the above slightly automated system above does.
> Note also that either module _may_ not compile when doing so. This is not
> ideal nor intentional, but it happens. Feel free to fix this in a PR to us!
1. If you have changes you are working on, type `git stash` to store them for
later;
- You can type `git stash pop` to get them back at any point.
1. Type `git rebase -i upstream/upstream`;
1. Type `git rebase -i base`;
- It should show something like
[this](https://gist.github.com/zachbr/21e92993cb99f62ffd7905d7b02f3159) in
the text editor you get.
@@ -193,7 +131,7 @@ later;
- **Make sure to add `--amend`** or else a new patch will be created.
- You can also modify the commit message and author here.
1. Type `git rebase --continue` to finish rebasing;
1. Type `./paper rebuild` in the root directory;
1. Type `./gradlew rebuildPatches` in the root directory;
- This will modify the appropriate patches based on your commits.
1. PR your modified patch file(s) back to this repository.
@@ -210,14 +148,14 @@ messing with your HEADs.
1. Make your change while at HEAD;
1. Make a temporary commit. You don't need to make a message for this;
1. Type `git rebase -i upstream/upstream`, move (cut) your temporary commit and
1. Type `git rebase -i base`, move (cut) your temporary commit and
move it under the line of the patch you wish to modify;
1. Change the `pick` to the appropriate action:
1. `f`/`fixup`: Merge your changes into the patch without touching the
message.
1. `s`/`squash`: Merge your changes into the patch and use your commit message
and subject.
1. Type `./paper rebuild` in the root directory;
1. Type `./gradlew rebuildPatches` in the root directory;
- This will modify the appropriate patches based on your commits.
1. PR your modified patch file(s) back to this repository.
@@ -231,13 +169,29 @@ move it under the line of the patch you wish to modify;
assist you too.
- Alternatively, if you only know the name of the patch, you can do
`git commit -a --fixup "Subject of Patch name"`.
1. Rebase with autosquash: `git rebase --autosquash -i upstream/upstream`.
1. Rebase with autosquash: `git rebase -i --autosquash base`.
This will automatically move your fixup commit to the right place, and you just
need to "save" the changes.
1. Type `./paper rebuild` in the root directory;
1. Type `./gradlew rebuildPatches` in the root directory;
- This will modify the appropriate patches based on your commits.
1. PR your modified patch file(s) back to this repository.
## Rebasing PRs
Steps to rebase a PR to include the latest changes from `master`.
These steps assume the `origin` remote is your fork of this repository and `upstream` is the official PaperMC repository.
1. Pull the latest changes from upstreams master: `git checkout master && git pull upstream master`.
1. Checkout feature/fix branch and rebase on master: `git checkout patch-branch && git rebase master`.
1. Apply updated patches: `./gradlew applyPatches`.
1. If there are conflicts, fix them.
1. If your PR creates new patches instead of modifying existing ones, in both the `Paper-Server` and `Paper-API` directories, ensure your newly-created patch is the last commit by either:
* Renaming the patch file with a large 4-digit number in front (e.g. 9999-Patch-to-add-some-new-stuff.patch), and re-applying patches.
* Running `git rebase --interactive base` and moving the commits to the end.
1. Rebuild patches: `./gradlew rebuildPatches`.
1. Commit modified patches.
1. Force push changes: `git push --force`.
## PR Policy
We'll accept changes that make sense. You should be able to justify their
@@ -251,37 +205,89 @@ when making and submitting changes.
## Formatting
All modifications to non-Paper files should be marked.
All modifications to non-Paper files should be marked. The one exception to this is
when modifying javadoc comments, which should not have these markers.
- Multi-line changes start with `// Paper start` and end with `// Paper end`;
- You can put a comment with an explanation if it isn't obvious, like this:
`// Paper start - reason`.
- The comments should generally be about the reason the change was made, what
it was before, or what the change is.
- Multi-line messages should start with `// Paper start` and use `/* Multi
line message here */` for the message itself.
- One-line changes should have `// Paper` or `// Paper - reason`.
- You need to add a comment with a short and identifiable description of the patch:
`// Paper start - <COMMIT DESCRIPTION>`
- The comments should generally be about the reason the change was made, what
it was before, or what the change is.
- After the general commit description, you can add additional information either
after a `;` or in the next line.
- Multi-line changes start with `// Paper start - <COMMIT DESCRIPTION>` and end
with `// Paper end - <COMMIT DESCRIPTION>`.
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.
Here's an example of how to mark changes by Paper:
```java
entity.getWorld().dontbeStupid(); // Paper - was beStupid() which is bad
entity.getWorld().dontBeStupid(); // Paper - Was beStupid(), which is bad
entity.getFriends().forEach(Entity::explode);
entity.a();
entity.b();
// Paper start - use plugin-set spawn
entity.updateFriends();
// Paper start - Use plugin-set spawn
// entity.getWorld().explode(entity.getWorld().getSpawn());
Location spawnLocation = ((CraftWorld)entity.getWorld()).getSpawnLocation();
entity.getWorld().explode(new BlockPosition(spawnLocation.getX(), spawnLocation.getY(), spawnLocation.getZ()));
// Paper end
// Paper end - Use plugin-set spawn
```
We generally follow usual Java style (aka. Oracle style), or what is programmed
We generally follow the usual Java style (aka. Oracle style), or what is programmed
into most IDEs and formatters by default. There are a few notes, however:
- It is fine to go over 80 lines as long as it doesn't hurt readability.
There are exceptions, especially in Spigot-related files
- When in doubt or the code around your change is in a clearly different style,
use the same style as the surrounding code.
- Usage of the `var` keyword is heavily discouraged, as it makes reading patch files
a lot harder and can lead to confusion during updates due to changed return types.
The only exception to this is if a line would otherwise be way too long/filled with
hard to parse generics in a case where the base type itself is already obvious
### Imports
When adding new imports to a class in a file not created by the current patch, use the fully qualified class name
instead of adding a new import to the top of the file. If you are using a type a significant number of times, you
can add an import with a comment. However, if its only used a couple of times, the FQN is preferred to prevent future
patch conflicts in the import section of the file.
```java
import org.bukkit.event.Event;
// don't add import here, use FQN like below
public class SomeEvent extends Event {
public final org.bukkit.Location newLocation; // Paper - add location
}
```
## Access Transformers
Sometimes, vanilla or CraftBukkit code already contains a field, method, or type you want to access
but the visibility is too low (e.g. a private field in an entity class). Paper can use access transformers
to change the visibility or remove the final modifier from fields, methods, and classes. Inside the `build-data/paper.at`
file, you can add ATs that are applied when you `./gradlew applyPatches`. You can read about the format of ATs
[here](https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers).
### Important
ATs should be included in the patch file which requires them within the commit message. Do not commit any changes to the
`build-data/paper.at` file, just use it to initially change the visibility of members until you have finalized what you
need. Then, in the commit message for the patch which requires the ATs, add a header at the bottom of the commit message
before any co-authors. It should look like the following after you `./gradlew rebuildPatches`.
```
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Wed, 8 Jun 2022 22:20:16 -0700
Subject: [PATCH] Paper config files
This patch adds Paper configuration files.
Access transformers for this patch are below, but before the co-authors.
== AT ==
public org.spigotmc.SpigotWorldConfig getBoolean(Ljava/lang/String;Z)Z
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
diff --git a/build.gradle.kts b/build.gradle.kts
...
```
## Patch Notes
@@ -318,7 +324,7 @@ Subject: [PATCH] revert serverside behavior of keepalives
This patch intends to bump up the time that a client has to reply to the
server back to 30 seconds as per pre 1.12.2, which allowed clients
more than enough time to reply potentially allowing them to be less
tempermental due to lag spikes on the network thread, e.g. that caused
temperamental due to lag spikes on the network thread, e.g. that caused
by plugins that are interacting with netty.
We also add a system property to allow people to tweak how long the server
@@ -336,31 +342,18 @@ index a92bf8967..d0ab87d0f 100644
## Obfuscation Helpers
In an effort to make future updates easier on ourselves, Paper tries to use
obfuscation helpers whenever possible. The purpose of these helpers is to make
the code more readable and maintainable. These helpers should be be made as easy
to inline as possible by the JVM whenever possible.
An obfuscation helper to access an obfuscated item may be as simple as something
like this:
While rarely needed, obfuscation helpers are sometimes useful when it comes
to unmapped local variables, or poorly named method parameters. In an effort
to make future updates easier on ourselves, Paper tries to use obfuscation
helpers wherever it makes sense. The purpose of these helpers is to make the
code more readable and maintainable. These helpers should be made easy to
inline by the JVM wherever possible.
An example of an obfuscation helper for a local variable:
```java
public final int getStuckArrows() { return this.bY(); } // Paper - OBFHELPER
```
Or it may be as complex as forwarding an entire method so that it can be
overridden later:
```java
public boolean be() {
// Paper start - OBFHELPER
return this.pushedByWater();
}
public boolean pushedByWater() {
// Paper end
return true;
}
double d0 = entity.getX(); final double fromX = d0; // Paper - OBFHELPER
// ...
this.someMethod(fromX); // Paper
```
While they may not always be done in exactly the same way, the general goal is
@@ -369,56 +362,83 @@ what fits best in your situation.
## Configuration files
To use a configurable value in your patch, add a new entry in either the
`PaperConfig` or `PaperWorldConfig` classes. Use `PaperConfig` if a value
To use a configurable value in your patch, add a new field in either the
`GlobalConfiguration` or `WorldConfiguration` classes (inside the
`io.papermc.paper.configuration` package). Use `GlobalConfiguration` if a value
must remain the same throughout all worlds, or the latter if it can change
between worlds. World-specific configuration options are preferred whenever
possible.
### PaperConfig example
### Example
This is adding a new miscellaneous setting that doesn't seem to fit in other categories.
Try to check and see if an existing category (inner class) exists that matches
whatever configuration option you are adding.
```java
public static boolean saveEmptyScoreboardTeams = false;
private static void saveEmptyScoreboardTeams() {
// This is called automatically!
// The name also doesn't matter.
saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false);
public class GlobalConfiguration {
// other sections
public class Misc extends ConfigurationPart {
// other settings
public boolean lagCompensateBlockBreaking = true;
public boolean useDimensionTypeForCustomSpawners = false;
public int maxNumOfPlayers = 20; // This is the new setting
}
}
```
You set the type of the setting as the field type, and the default value is the
initial field value. The name of the setting defaults to the snake-case of the
field name, so in this case it would be `misc.max-num-of-players`. You can use
the `@Setting` annotation to override that, but generally just try to set the
field name to what you want the setting to be called.
Notice that the field is always public, but the setter is always private. This
is important to the way the configuration generation system works. To access
this value, reference it as you would any other static value:
#### Accessing the value
If you added a new global config value, you can access it in the code just by
doing
```java
if (!PaperConfig.saveEmptyScoreboardTeams) {
int maxPlayers = GlobalConfiguration.get().misc.maxNumOfPlayers;
```
Generally for global config values you will use the fully qualified class name,
`io.papermc.paper.configuration.GlobalConfiguration` since it's not imported in
most places.
---
If you are adding a new world config value, you must have access to an instance
of the `net.minecraft.world.level.Level` which you can then access the config by doing
```java
int maxPlayers = level.paperConfig().misc.maxNumOfPlayers;
```
It is often preferred that you use the fully qualified name for the
configuration class when accessing it, like so:
`com.destroystokyo.paper.PaperConfig.valueHere`.
If this is not done, a developer for Paper might fix that for you before
merging, but it's always nice if you make it a habit where you only need 1-2
lines changed.
#### Committing changes
All changes to the `GlobalConfiguration` and `WorldConfiguration` files
should be done in the commit that created them. So do an interactive rebase
or fixup to apply just those changes to that commit, then add a new commit
that includes the logic that uses that option in the server somewhere.
### PaperWorldConfig example
## Testing API changes
```java
public boolean useInhabitedTime = true;
private void useInhabitedTime() {
// This is called automatically!
// The name also doesn't matter.
useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
}
```
### Using the Paper Test Plugin
Again, notice that the field is always public, but the setter is always private.
To access this value, you'll need an instance of the `net.minecraft.World`
object:
The Paper project has a `test-plugin` module for easily testing out API changes
and additions. To use the test plugin, enable it in `test-plugin.settings.gradle.kts`,
which will be generated after running Gradle at least once. After this, you can edit
the test plugin, and run a server with the plugin using `./gradlew runDev` (or any
of the other Paper run tasks).
```java
return this.world.paperConfig.useInhabitedTime ? this.w : 0;
```
### Publishing to Maven local (use in external plugins)
To build and install the Paper APIs and Server to your local Maven repository, do the following:
- Run `./gradlew publishToMavenLocal` in the base directory.
If you use Gradle to build your plugin:
- Add `mavenLocal()` as a repository. Gradle checks repositories in the order they are declared,
so if you also have the Paper repository added, put the local repository above Paper's.
- Make sure to remove `mavenLocal()` when you are done testing, see the [Gradle docs](https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local)
for more details.
If you use Maven to build your plugin:
- If you later need to use the Paper-API, you might want to remove the jar
from your local Maven repository.
If you use Windows and don't usually build using WSL, you might not need to
do this.
## Frequently Asked Questions
@@ -433,39 +453,25 @@ patching process.
progress will be lost if you do not;
1. Identify the name(s) of the file(s) you want to import.
- A complete list of all possible file names can be found at
`./work/Minecraft/$MCVER/spigot/net/minecraft/server`. You might find
[MiniMappingViewer] very useful to find the file you need.
1. Open the file at `./scripts/importmcdev.sh` and add the name of your file to
the script. Skip to the 2nd last header and follow the instructions there;
1. Re-patch the server `./paper patch`;
`./Paper-Server/.gradle/caches/paperweight/mc-dev-sources/net/minecraft/`. You might find
[MappingViewer] useful if you need to translate between Mojang and Spigot mapped names.
1. Open the file at `./build-data/dev-imports.txt` and add the name of your file to
the script. Follow the instructions there;
1. Re-patch the server `./gradlew applyPatches`;
1. Edit away!
> ❗ This change is temporary! **DO NOT COMMIT CHANGES TO THIS FILE!**
> Once you have made your changes to the new file, and rebuilt patches, you may
> undo your changes to `importmcdev.sh`.
> undo your changes to `dev-imports.txt`.
Any file modified in a patch file gets automatically imported, so you only need
this temporarily to import it to create the first patch.
To undo your changes to the file, type `git checkout scripts/importmcdev.sh`.
### Where can I learn how to name method/field?
For most cases, it is preferred if you use [yarn], as their license works with
Paper's license. If you can't do that, [MiniMappingViewer] is always around to
provide you with more of a general idea, *but* you cannot use the Mojang names
for more than understanding the code.
[yarn] is in general more thorough than Mojang's own mappings, as they include
method arguments as well, whereas Mojang's do not. If you need local variables
to understand the code, you might be more lucky with ModCoderPack.
For more information on the Mojang name licensing issues, check this out:
<https://cpw.github.io/MinecraftMappingData.html>
To undo your changes to the file, type `git checkout build-data/dev-imports.txt`.
### My commit doesn't need a build, what do I do?
Well, quite simple: You add `[CI-SKIP]` to the start of your commit subject.
Well, quite simple: You add `[ci skip]` to the start of your commit subject.
This case most often applies to changes to files like `README.md`, this very
file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
@@ -473,16 +479,16 @@ file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
### Patching and building is *really* slow, what can I do?
This only applies if you're running Windows. If you're running a prior Windows
release, either update to Windows 10 or move to macOS/Linux/BSD.
release, either update to Windows 10/11 or move to macOS/Linux/BSD.
In order to speed up patching process on Windows, it's recommended you get WSL
2. This is available in Windows 10 v2004, build 19041 or higher. (You can check
your version by running `winver` in the run window (Windows key + R)). If you're
out of date, update your system with the
[Windows Update Assistant](https://www.microsoft.com/en-us/software-download/windows10).
using an out of date version of Windows 10, update your system with the
[Windows 10 Update Assistant](https://www.microsoft.com/en-us/software-download/windows10) or [Windows 11 Update Assistant](https://www.microsoft.com/en-us/software-download/windows11).
To setup WSL 2, follow the information here:
<https://docs.microsoft.com/en-us/windows/wsl/install-win10>
To set up WSL 2, follow the information here:
<https://docs.microsoft.com/en-us/windows/wsl/install>
You will most likely want to use the Ubuntu apps. Once it's set up, install the
required tools with `sudo apt-get update && sudo apt-get install $TOOL_NAMES
@@ -492,26 +498,6 @@ everything like usual.
> ❗ Do not use the `/mnt/` directory in WSL! Instead, mount the WSL directories
> in Windows like described here:
> <https://www.howtogeek.com/426749/how-to-access-your-linux-wsl-files-in-windows-10/>
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
### I wrote some API, how do I use it in Paper-Server?
To install the API to your local maven repository, do the following:
- Enter the API directory by running `./paper api`;
- Run `mvn install`.
- If you are working on a patch without much care for whether the tests
pass, you can instead run `mvn install -DskipTests`. Do not PR changes
without running tests first.
- If a test failed, you have to identify the failing tests by scrolling up a
couple lines (i.e. around 50-200). You should find it fairly quickly.
- If you later need to use the Paper-API, you might want to remove the jar
from your local maven repository.
If you use Windows and don't usually build using WSL, you might not need to
do this.
You can now use the API in your plugin to test it before PRing. You will also
need to do this to build the Server with the implemented API.
[MiniMappingViewer]: https://minidigger.github.io/MiniMappingViewer/
[yarn]: https://github.com/FabricMC/yarn
[MappingViewer]: https://mappings.cephx.dev/
+22 -4
View File
@@ -17,7 +17,6 @@ should submit a pull request to this project to add their name.
```text
Zach Brown <zach.brown@destroystokyo.com>
Daniel Ennis <aikar@aikar.co>
Kyle Wood <demonwav@gmail.com>
kashike <kashike@vq.lc>
Black Hole <black-hole@live.com>
Mark Vainomaa <mikroskeem@mikroskeem.eu>
@@ -29,12 +28,11 @@ chickeneer <emcchickeneer@gmail.com>
Minecrell <minecrell@minecrell.net>
Techcable <Techcable@outlook.com>
BillyGalbreath <blake.galbreath@gmail.com>
MiniDigger <admin@minidigger.me>
MiniDigger <admin@benndorf.dev>
Brokkonaut <hannos17@gmx.de>
vemacs <d@nkmem.es>
stonar96 <minecraft.stonar96@gmail.com>
Hugo Manrique <hugmanrique@gmail.com>
Andrew Steinborn <git@steinborn.me>
willies952002 <admin@domnian.com>
MicleBrick <miclebrick@outlook.com>
Trigary <trigary0@gmail.com>
@@ -42,9 +40,29 @@ rickyboy320 <rickw320@hotmail.com>
DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com>
JRoy <joshroy126@gmail.com>
ysl3000 <yannicklamprecht@live.de>
KennyTV <jahnke.nassim@gmail.com>
Machine_Maker <machine@machinemaker.me>
Ivan Pekov <ivan@mrivanplays.com>
Camotoy <20743703+Camotoy@users.noreply.github.com>
Bjarne Koll <lynxplay101@gmail.com>
MeFisto94 <MeFisto94@users.noreply.github.com>
Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
LemonCaramel <admin@caramel.moe>
Noah van der Aa <ndvdaa@gmail.com>
Doc <nachito94@msn.com>
Nick Hensel <nickhensel25@icloud.com>
vytskalt <vytskalt@protonmail.com>
TheFruxz <cedricspitzer@outlook.de>
Kieran Wallbanks <kieran.wallbanks@gmail.com>
Denery <dorofeevij@gmail.com>
Jakubk15 <jakubk15@protonmail.com>
Redned <redned235@gmail.com>
Luke Chambers <consolelogluke@gmail.com>
Emily <emilia.lopezf.1999@gmail.com>
dawon <dawon@dawon.eu>
Ollie <69084614+olijeffers0n@users.noreply.github.com>
Oliwier Miodun <naczs@blueflow.pl>
aerulion <aerulion@gmail.com>
Lukas Planz <lukas.planz@web.de>
granny <contact@granny.dev>
mja00 <me@mja00.dev>
```
-204
View File
@@ -1,204 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-parent</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-mojangapi</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Paper-MojangAPI</name>
<url>https://github.com/PaperMC/Paper</url>
<description>API additions that utilize Mojang Specific API's</description>
<properties>
<!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>spigotmc-public</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>minecraft-libraries</id>
<name>Minecraft Libraries</name>
<url>https://libraries.minecraft.net</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spigotmc-public</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- mojang api -->
<dependency>
<groupId>com.mojang</groupId>
<artifactId>brigadier</artifactId>
<version>1.0.17</version>
<scope>compile</scope>
</dependency>
<!-- utils -->
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
<version>8.2.2</version>
<scope>provided</scope>
</dependency>
<!-- annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>18.0.0</version>
<scope>provided</scope>
</dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>7.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<dependencies>
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.8.5-spigotmc</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.bukkit</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<!-- when downloading via Maven we can pull depends individually -->
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>development</id>
<properties>
<skipTests>false</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.29</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.18</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -1,9 +0,0 @@
package com.destroystokyo.paper.brigadier;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.suggestion.SuggestionProvider;
import java.util.function.Predicate;
public interface BukkitBrigadierCommand <S extends BukkitBrigadierCommandSource> extends Command<S>, Predicate<S>, SuggestionProvider<S> {
}
@@ -1,21 +0,0 @@
package com.destroystokyo.paper.brigadier;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.jetbrains.annotations.Nullable;
public interface BukkitBrigadierCommandSource {
@Nullable
Entity getBukkitEntity();
@Nullable
World getBukkitWorld();
@Nullable
Location getBukkitLocation();
CommandSender getBukkitSender();
}
@@ -1,65 +0,0 @@
package com.destroystokyo.paper.event.brigadier;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.mojang.brigadier.tree.RootCommandNode;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands.
* You may manipulate this CommandNode to change what the client sees.
*
* This event may fire on login, world change, and permission rebuilds, by plugin request, and potentially future means.
*
* This event will fire before {@link org.bukkit.event.player.PlayerCommandSendEvent}, so no filtering has been done by
* other plugins yet.
*
* WARNING: This event will potentially (and most likely) fire twice! Once for Async, and once again for Sync.
* It is important that you check event.isAsynchronous() and event.hasFiredAsync() to ensure you only act once.
* If for some reason we are unable to send this asynchronously in the future, only the sync method will fire.
*
* Your logic should look like this:
* if (event.isAsynchronous() || !event.hasFiredAsync()) { do stuff }
*
* If your logic is not safe to run asynchronously, only react to the synchronous version.
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
*/
public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSource> extends PlayerEvent {
private static final HandlerList handlers = new HandlerList();
private final RootCommandNode<S> node;
private final boolean hasFiredAsync;
public AsyncPlayerSendCommandsEvent(Player player, RootCommandNode<S> node, boolean hasFiredAsync) {
super(player, !Bukkit.isPrimaryThread());
this.node = node;
this.hasFiredAsync = hasFiredAsync;
}
/**
* @return The full Root Command Node being sent to the client, which is mutable.
*/
public RootCommandNode<S> getCommandNode() {
return node;
}
/**
* @return If this event has already fired asynchronously.
*/
public boolean hasFiredAsync() {
return hasFiredAsync;
}
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}
@@ -1,77 +0,0 @@
package com.destroystokyo.paper.event.brigadier;
import com.mojang.brigadier.suggestion.Suggestions;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Called when sending Suggestions to the client. Will be called asynchronously if a plugin
* marks the AsyncTabComplete event handled asynchronously, otherwise called synchronously.
*/
public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean cancelled = false;
private Suggestions suggestions;
private final String buffer;
public AsyncPlayerSendSuggestionsEvent(Player player, Suggestions suggestions, String buffer) {
super(player, !Bukkit.isPrimaryThread());
this.suggestions = suggestions;
this.buffer = buffer;
}
/**
* @return The input buffer sent to request these suggestions
*/
public String getBuffer() {
return buffer;
}
/**
* @return The suggestions being sent to client
*/
public Suggestions getSuggestions() {
return suggestions;
}
/**
* @param suggestions The suggestions to be sent to client if need to change them
*/
public void setSuggestions(Suggestions suggestions) {
this.suggestions = suggestions;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels sending suggestions to the client
* {@inheritDoc}
*/
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}
@@ -1,122 +0,0 @@
package com.destroystokyo.paper.event.brigadier;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommand;
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
import com.mojang.brigadier.tree.ArgumentCommandNode;
import com.mojang.brigadier.tree.LiteralCommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
import org.bukkit.command.Command;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import org.bukkit.event.server.ServerEvent;
import org.jetbrains.annotations.NotNull;
/**
* Fired anytime the server synchronizes Bukkit CommandMap to Brigadier.
*
* Allows a plugin to control the Literal and Argument nodes for this command to be
* sent to the client.
* This is done at Plugin Enable time after commands have been registered, but some
* plugins may use reflection to retrigger this rebuild during runtime.
*
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
*/
public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final String commandLabel;
private final Command command;
private final BukkitBrigadierCommand<S> brigadierCommand;
private final RootCommandNode<S> root;
private final ArgumentCommandNode<S, String> defaultArgs;
private LiteralCommandNode<S> literal;
private boolean cancelled = false;
public CommandRegisteredEvent(String commandLabel, BukkitBrigadierCommand<S> brigadierCommand, Command command, RootCommandNode<S> root, LiteralCommandNode<S> literal, ArgumentCommandNode<S, String> defaultArgs) {
this.commandLabel = commandLabel;
this.brigadierCommand = brigadierCommand;
this.command = command;
this.root = root;
this.literal = literal;
this.defaultArgs = defaultArgs;
}
/**
* @return The command name being registered
*/
public String getCommandLabel() {
return commandLabel;
}
/**
* @return The Bukkit API Brigadier Wrapped Command Object to handle executions and suggestions
*/
public BukkitBrigadierCommand<S> getBrigadierCommand() {
return brigadierCommand;
}
public Command getCommand() {
return command;
}
/**
* @return Gets the root command node being used to register a command to.
*/
public RootCommandNode<S> getRoot() {
return root;
}
/**
* Returns the Bukkit API's default handling of Arguments, if you wish to reuse it.
* @return
*/
public ArgumentCommandNode<S, String> getDefaultArgs() {
return defaultArgs;
}
/**
* Returns the Bukkit API's default literal for this command, including the {@link #getDefaultArgs()} as a child already.
* @return
*/
public LiteralCommandNode<S> getLiteral() {
return literal;
}
/**
* Changes the literal used to register this command. The previous literable is mutable, so this is primarily if
* you want to completely replace the object.
* @param literal
*/
public void setLiteral(LiteralCommandNode<S> literal) {
this.literal = literal;
}
/**
* {@inheritDoc}
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Cancels registering this command to Brigadier, but will remain in Bukkit Command Map. Can be used to hide a
* command from all players.
*
* {@inheritDoc}
*/
@Override
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
@NotNull
public HandlerList getHandlers() {
return handlers;
}
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}
}
+49 -29
View File
@@ -1,76 +1,96 @@
Paper ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/PaperMC/Paper/Build%20Paper/master)
Paper [![Paper Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Paper/build.yml?branch=master)](https://github.com/PaperMC/Paper/actions)
[![Discord](https://img.shields.io/discord/289587909051416579.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/papermc)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/papermc?label=GitHub%20Sponsors)](https://github.com/sponsors/PaperMC)
[![Open Collective](https://img.shields.io/opencollective/all/papermc?label=OpenCollective%20Sponsors)](https://opencollective.com/papermc)
===========
High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.
The most widely used, high-performance Minecraft server that aims to fix gameplay and mechanics inconsistencies.
**Support and Project Discussion:**
- [IRC](https://webchat.esper.net/?channels=paper) or [Discord](https://discord.gg/papermc)
- [Our forums](https://forums.papermc.io/) or [Discord](https://discord.gg/papermc)
How To (Server Admins)
------
Paperclip is a jar file that you can download and run just like a normal jar file.
Download Paper from our [downloads page](https://papermc.io/downloads).
Download Paper from our [downloads page](https://papermc.io/downloads/paper).
Run the Paperclip jar directly from your server. Just like old times
* Documentation on using Paper: [paper.readthedocs.io](https://paper.readthedocs.io/)
* For a sneak peak on upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
* Documentation on using Paper: [docs.papermc.io](https://docs.papermc.io)
* For a sneak peek at upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
How To (Plugin Developers)
------
* See our API patches [here](Spigot-API-Patches)
* See upcoming, pending, and recently added API [here](https://github.com/PaperMC/Paper/projects/6)
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
* Maven Repo (for paper-api):
* See our API patches [here](patches/api)
* See upcoming, pending, and recently added API [here](https://github.com/orgs/PaperMC/projects/2/views/4)
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
#### Repository (for paper-api)
##### Maven
```xml
<repository>
<id>papermc</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
```
* Artifact Information:
```xml
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
**Or alternatively, with Gradle:**
* Repository:
```groovy
```
##### Gradle
```kotlin
repositories {
maven {
url 'https://papermc.io/repo/repository/maven-public/'
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
```
* Artifact:
```groovy
dependencies {
compileOnly 'com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT'
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
```
How To (Compiling Jar From Source)
------
To compile Paper, you need JDK 8, maven, and an internet connection.
To compile Paper, you need JDK 21 and an internet connection.
Clone this repo, run `./paper jar` from *bash*, get files.
Clone this repo, run `./gradlew applyPatches`, then `./gradlew createMojmapBundlerJar` from your terminal. You can find the compiled jar in the project root's `build/libs` directory.
To get a full list of tasks, run `./gradlew tasks`.
How To (Pull Request)
------
See [Contributing](CONTRIBUTING.md)
Support Us
------
First of all, thank you for considering helping out, we really appreciate that!
PaperMC has various recurring expenses, mostly related to infrastructure. Paper uses [Open Collective](https://opencollective.com/) via the [Open Source Collective fiscal host](https://opencollective.com/opensource) to manage expenses. Open Collective allows us to be extremely transparent, so you can always see how your donations are used. You can read more about financially supporting PaperMC [on our website](https://papermc.io/sponsors).
You can find our collective [here](https://opencollective.com/papermc), or you can donate via GitHub Sponsors [here](https://github.com/sponsors/PaperMC), which will also go towards the collective.
Special Thanks To:
-------------
![YourKit-Logo](https://www.yourkit.com/images/yklogo.png)
[![YourKit-Logo](https://www.yourkit.com/images/yklogo.png)](https://www.yourkit.com/)
[YourKit](https://www.yourkit.com/), makers of the outstanding java profiler, support open source projects of all kinds with their full featured [Java](https://www.yourkit.com/java/profiler) and [.NET](https://www.yourkit.com/.net/profiler) application profilers. We thank them for granting Paper an OSS license so that we can make our software the best it can be.
[<img src="https://user-images.githubusercontent.com/21148213/121807008-8ffc6700-cc52-11eb-96a7-2f6f260f8fda.png" alt="" width="150">](https://www.jetbrains.com)
[JetBrains](https://www.jetbrains.com/), creators of the IntelliJ IDEA, supports Paper with one of their [Open Source Licenses](https://www.jetbrains.com/opensource/). IntelliJ IDEA is the recommended IDE for working with Paper, and most of the Paper team uses it.
All our sponsors!
[![Sponsor Image](https://raw.githubusercontent.com/PaperMC/papermc.io/data/sponsors.png)](https://papermc.io/sponsors)
+14
View File
@@ -0,0 +1,14 @@
# Security Policy
## Supported Versions
We generally only fully support the latest version, the same applies to exploits such as server crashes and item
duplication bugs. In the transition period during larger Minecraft updates, we may still backport important fixes to the
last minor or major release.
## Reporting a Vulnerability
For any issues that are NOT duplication bugs, server/client crashes, or otherwise serious exploits, please open an issue
through the [Issues tab](https://github.com/PaperMC/Paper/issues).
For exploits, please [join our Discord](https://discord.gg/papermc) and see the [#paper-exploit-report channel](https://discord.com/channels/289587909051416579/1208749386348101682) for
further instructions.
-106
View File
@@ -1,106 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 5f3253b9c4a533e746707d602d4a7988519742ef..61b8ee4e3e122dd2671f50ea3b432e4abd4600a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,33 +2,34 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-parent</artifactId>
+ <version>dev-SNAPSHOT</version>
+ </parent>
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
- <url>https://www.spigotmc.org/</url>
+ <name>Paper-API</name>
+ <url>https://github.com/PaperMC/Paper</url>
<description>An enhanced plugin API for Minecraft servers.</description>
<properties>
- <skipTests>true</skipTests>
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
- <distributionManagement>
+ <repositories>
<repository>
- <id>spigotmc-releases</id>
- <url>https://hub.spigotmc.org/nexus/content/repositories/releases/</url>
+ <id>sonatype</id>
+ <url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
- <snapshotRepository>
- <id>spigotmc-snapshots</id>
- <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
- </snapshotRepository>
- </distributionManagement>
+ </repositories>
<dependencies>
<dependency>
@@ -37,6 +38,20 @@
<version>2.6</version>
<scope>compile</scope>
</dependency>
+ <!-- bundled with Minecraft, shouldn't ever change -->
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>1.3.9</version>
+ <scope>compile</scope>
+ </dependency>
+ <!-- used in previous versions of the API -->
+ <dependency>
+ <groupId>com.googlecode.json-simple</groupId>
+ <artifactId>json-simple</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
<!-- bundled with Minecraft, should be kept in sync -->
<dependency>
<groupId>com.google.guava</groupId>
@@ -93,6 +108,7 @@
</dependencies>
<build>
+ <defaultGoal>clean install</defaultGoal>
<plugins>
<plugin>
<groupId>net.md-5</groupId>
@@ -111,10 +127,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
- <configuration>
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
- <compilerId>eclipse</compilerId>
- </configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -164,6 +176,7 @@
</excludes>
</filter>
</filters>
+ <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<!-- when downloading via Maven we can pull depends individually -->
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
@@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 1 Apr 2016 00:02:47 -0400
Subject: [PATCH] Add FastUtil to Bukkit
Doesn't expose to plugins, just allows Paper-API to use it for optimization
diff --git a/pom.xml b/pom.xml
index 61b8ee4e3e122dd2671f50ea3b432e4abd4600a2..12306d830c6889c2c9b12699abebe0411262aef6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,6 +32,12 @@
</repositories>
<dependencies>
+ <dependency>
+ <groupId>it.unimi.dsi</groupId>
+ <artifactId>fastutil</artifactId>
+ <version>8.2.2</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,33 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Mon, 29 Feb 2016 17:22:34 -0600
Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index c5e7e037493ffe1f1764c3ad5d3e12bfac498cb2..e3a23cef93df2bbb2f27f87150bc1dbf7fd051b5 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1365,6 +1365,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Deprecated // Paper
public String getLocale();
+ // Paper start
+ /**
+ * Get whether the player can affect mob spawning
+ *
+ * @return if the player can affect mob spawning
+ */
+ public boolean getAffectsSpawning();
+
+ /**
+ * Set whether the player can affect mob spawning
+ *
+ * @param affects Whether the player can affect mob spawning
+ */
+ public void setAffectsSpawning(boolean affects);
+ // Paper end
+
/**
* Update the list of commands sent to the client.
* <br>
@@ -1,49 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 17:24:57 -0600
Subject: [PATCH] Add getTPS method
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 426b1e83226e674ee4bf3ec05ddcd3ac4376b06d..cd1b4be422a3a4290579d5daed9466084f18ed60 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1531,6 +1531,17 @@ public final class Bukkit {
return server.getEntity(uuid);
}
+ // Paper start
+ /**
+ * Gets the current server TPS
+ * @return current server TPS (1m, 5m, 15m in Paper-Server)
+ */
+ @NotNull
+ public static double[] getTPS() {
+ return server.getTPS();
+ }
+ // Paper end
+
/**
* Get the advancement specified by this key.
*
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index d9515a79dc7ed60c66960cd6c6bb4c108f206f3c..9ec374570e135a4ba14db7efdbb5c1bd213226eb 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1290,6 +1290,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@Nullable
Entity getEntity(@NotNull UUID uuid);
+ // Paper start
+ /**
+ * Gets the current server TPS
+ *
+ * @return current server TPS (1m, 5m, 15m in Paper-Server)
+ */
+ @NotNull
+ public double[] getTPS();
+ // Paper end
+
/**
* Get the advancement specified by this key.
*
@@ -1,66 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 17:50:31 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 41a1bc45cc5eb7f19374115ade7f5328c7fc1dae..e9d0d507b47b0347b975b1a83f5ae70dca5587b8 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -609,5 +609,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName())));
}
+
+ /**
+ * Gets the location where this entity originates from.
+ * <p>
+ * This value can be null if the entity hasn't yet been added to the world.
+ *
+ * @return Location where entity originates or null if not yet added
+ */
+ @Nullable
+ Location getOrigin();
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
index 64f9d3fd870d65afd2ee9a85625b149163eee144..14cb0d770561151570ab4399ca5facff43076819 100644
--- a/src/main/java/org/bukkit/entity/FallingBlock.java
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
@@ -54,4 +54,15 @@ public interface FallingBlock extends Entity {
* @param hurtEntities whether entities will be damaged by this block.
*/
void setHurtEntities(boolean hurtEntities);
+
+ /**
+ * Gets the source block location of the FallingBlock
+ *
+ * @return the source block location the FallingBlock was spawned from
+ * @deprecated replaced by {@link Entity#getOrigin()}
+ */
+ @Deprecated
+ default org.bukkit.Location getSourceLoc() {
+ return this.getOrigin();
+ }
}
diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
index a23cfdf66877f0a61eae700de084c76e6ee7b431..0813bd913c8fdb2001963ce3e82c07c2af105418 100644
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
@@ -53,4 +53,15 @@ public interface TNTPrimed extends Explosive {
* @param source the source of this primed TNT
*/
public void setSource(@Nullable Entity source);
+
+ /**
+ * Gets the source block location of the TNTPrimed
+ *
+ * @return the source block location the TNTPrimed was spawned from
+ * @deprecated replaced by {@link Entity#getOrigin()}
+ */
+ @Deprecated
+ default org.bukkit.Location getSourceLoc() {
+ return this.getOrigin();
+ }
}
@@ -1,185 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 27 May 2019 01:10:06 -0500
Subject: [PATCH] Version Command 2.0
diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
new file mode 100644
index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c716339346
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
@@ -0,0 +1,45 @@
+package com.destroystokyo.paper.util;
+
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.bukkit.Bukkit;
+import org.jetbrains.annotations.NotNull;
+
+public interface VersionFetcher {
+ /**
+ * Amount of time to cache results for in milliseconds
+ * <p>
+ * Negative values will never cache.
+ *
+ * @return cache time
+ */
+ long getCacheTime();
+
+ /**
+ * Gets the version message to cache and show to command senders.
+ *
+ * <p>NOTE: This is run in a new thread separate from that of the command processing thread</p>
+ *
+ * @param serverVersion the current version of the server (will match {@link Bukkit#getVersion()})
+ * @return the message to show when requesting a version
+ */
+ @NotNull
+ Component getVersionMessage(@NotNull String serverVersion);
+
+ class DummyVersionFetcher implements VersionFetcher {
+
+ @Override
+ public long getCacheTime() {
+ return -1;
+ }
+
+ @NotNull
+ @Override
+ public Component getVersionMessage(@NotNull String serverVersion) {
+ Bukkit.getLogger().warning("Version provider has not been set, cannot check for updates!");
+ Bukkit.getLogger().info("Override the default implementation of org.bukkit.UnsafeValues#getVersionFetcher()");
+ new Throwable().printStackTrace();
+ return Component.text("Unable to check for updates. No version provider set.", NamedTextColor.RED);
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 207c656c0a11a3a630bc70491efcf433b2681e18..195b6bb328de92c4d17d1cd14e13578226b1ac3c 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -84,5 +84,12 @@ public interface UnsafeValues {
* @return name
*/
String getTimingsServerName();
+
+ /**
+ * Called once by the version command on first use, then cached.
+ */
+ default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
+ return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
+ }
// Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9be1d3ff9 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -1,5 +1,6 @@
package org.bukkit.command.defaults;
+import com.destroystokyo.paper.util.VersionFetcher; // Paper - version supplier
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableList;
import com.google.common.io.Resources;
@@ -16,6 +17,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
+import net.kyori.adventure.text.Component; // Paper
import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
@@ -26,6 +28,15 @@ import org.bukkit.util.StringUtil;
import org.jetbrains.annotations.NotNull;
public class VersionCommand extends BukkitCommand {
+ private VersionFetcher versionFetcher;
+ private VersionFetcher getVersionFetcher() { // lazy load because unsafe isn't available at command registration
+ if (versionFetcher == null) {
+ versionFetcher = Bukkit.getUnsafe().getVersionFetcher();
+ }
+
+ return versionFetcher;
+ }
+
public VersionCommand(@NotNull String name) {
super(name);
@@ -40,7 +51,7 @@ public class VersionCommand extends BukkitCommand {
if (!testPermission(sender)) return true;
if (args.length == 0) {
- sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
+ //sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")"); // Paper - moved to setVersionMessage
sendVersion(sender);
} else {
StringBuilder name = new StringBuilder();
@@ -146,14 +157,14 @@ public class VersionCommand extends BukkitCommand {
private final ReentrantLock versionLock = new ReentrantLock();
private boolean hasVersion = false;
- private String versionMessage = null;
+ private Component versionMessage = null; // Paper
private final Set<CommandSender> versionWaiters = new HashSet<CommandSender>();
private boolean versionTaskStarted = false;
private long lastCheck = 0;
private void sendVersion(@NotNull CommandSender sender) {
if (hasVersion) {
- if (System.currentTimeMillis() - lastCheck > 21600000) {
+ if (System.currentTimeMillis() - lastCheck > getVersionFetcher().getCacheTime()) { // Paper - use version supplier
lastCheck = System.currentTimeMillis();
hasVersion = false;
} else {
@@ -168,7 +179,7 @@ public class VersionCommand extends BukkitCommand {
return;
}
versionWaiters.add(sender);
- sender.sendMessage("Checking version, please wait...");
+ sender.sendMessage(Component.text("Checking version, please wait...", net.kyori.adventure.text.format.NamedTextColor.WHITE, net.kyori.adventure.text.format.TextDecoration.ITALIC)); // Paper
if (!versionTaskStarted) {
versionTaskStarted = true;
new Thread(new Runnable() {
@@ -186,6 +197,13 @@ public class VersionCommand extends BukkitCommand {
private void obtainVersion() {
String version = Bukkit.getVersion();
+ // Paper start
+ if (version.startsWith("null")) { // running from ide?
+ setVersionMessage(Component.text("Unknown version, custom build?", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
+ return;
+ }
+ setVersionMessage(getVersionFetcher().getVersionMessage(version));
+ /*
if (version == null) version = "Custom";
String[] parts = version.substring(0, version.indexOf(' ')).split("-");
if (parts.length == 4) {
@@ -215,11 +233,24 @@ public class VersionCommand extends BukkitCommand {
} else {
setVersionMessage("Unknown version, custom build?");
}
+ */
+ // Paper end
}
- private void setVersionMessage(@NotNull String msg) {
+ // Paper start
+ private void setVersionMessage(final @NotNull Component msg) {
lastCheck = System.currentTimeMillis();
- versionMessage = msg;
+ final Component message = net.kyori.adventure.text.TextComponent.ofChildren(
+ Component.text("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")", net.kyori.adventure.text.format.NamedTextColor.WHITE),
+ Component.newline(),
+ msg
+ );
+ this.versionMessage = Component.text()
+ .append(message)
+ .hoverEvent(Component.text("Click to copy to clipboard", net.kyori.adventure.text.format.NamedTextColor.WHITE))
+ .clickEvent(net.kyori.adventure.text.event.ClickEvent.copyToClipboard(net.kyori.adventure.text.serializer.plain.PlainComponentSerializer.plain().serialize(message)))
+ .build();
+ // Paper end
versionLock.lock();
try {
hasVersion = true;
@@ -1,62 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Mon, 29 Feb 2016 18:02:25 -0600
Subject: [PATCH] Add PlayerLocaleChangeEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..29dd763a99ce7c6ecb176b9fb346a400369d48a0
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java
@@ -0,0 +1,50 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+
+/**
+ * Called when the locale of the player is changed.
+ *
+ * @deprecated Replaced by {@link org.bukkit.event.player.PlayerLocaleChangeEvent} upstream
+ */
+@Deprecated
+public class PlayerLocaleChangeEvent extends PlayerEvent {
+ private static final HandlerList handlers = new HandlerList();
+ private final String oldLocale;
+ private final String newLocale;
+
+ public PlayerLocaleChangeEvent(final Player player, final String oldLocale, final String newLocale) {
+ super(player);
+ this.oldLocale = oldLocale;
+ this.newLocale = newLocale;
+ }
+
+ /**
+ * Gets the locale the player switched from.
+ *
+ * @return player's old locale
+ */
+ public String getOldLocale() {
+ return oldLocale;
+ }
+
+ /**
+ * Gets the locale the player is changed to.
+ *
+ * @return player's new locale
+ */
+ public String getNewLocale() {
+ return newLocale;
+ }
+
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,39 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 18:05:37 -0600
Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index e3a23cef93df2bbb2f27f87150bc1dbf7fd051b5..1ce07f925acb550c379e4deb1a013bcbe5701a8a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1379,6 +1379,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param affects Whether the player can affect mob spawning
*/
public void setAffectsSpawning(boolean affects);
+
+ /**
+ * Gets the view distance for this player
+ *
+ * @return the player's view distance
+ * @deprecated This is unimplemented and <i>will</i> throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work.
+ * @see org.bukkit.World#getViewDistance()
+ * @see org.bukkit.World#getNoTickViewDistance()
+ */
+ @Deprecated
+ public int getViewDistance();
+
+ /**
+ * Sets the view distance for this player
+ *
+ * @param viewDistance the player's view distance
+ * @deprecated This is unimplemented and <i>will</i> throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work.
+ * @see org.bukkit.World#setViewDistance(int)
+ * @see org.bukkit.World#setNoTickViewDistance(int)
+ */
+ @Deprecated
+ public void setViewDistance(int viewDistance);
// Paper end
/**
@@ -1,98 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Mon, 29 Feb 2016 18:09:40 -0600
Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/block/BeaconEffectEvent.java b/src/main/java/com/destroystokyo/paper/event/block/BeaconEffectEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..978813b94a5eae0afccbd3b38b463091a46b56ac
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/block/BeaconEffectEvent.java
@@ -0,0 +1,86 @@
+package com.destroystokyo.paper.event.block;
+
+import org.bukkit.block.Block;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.block.BlockEvent;
+import org.bukkit.potion.PotionEffect;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called when a beacon effect is being applied to a player.
+ */
+public class BeaconEffectEvent extends BlockEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancelled;
+ private PotionEffect effect;
+ private Player player;
+ private boolean primary;
+
+ public BeaconEffectEvent(@NotNull Block block, @NotNull PotionEffect effect, @NotNull Player player, boolean primary) {
+ super(block);
+ this.effect = effect;
+ this.player = player;
+ this.primary = primary;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancelled) {
+ this.cancelled = cancelled;
+ }
+
+ /**
+ * Gets the potion effect being applied.
+ *
+ * @return Potion effect
+ */
+ @NotNull
+ public PotionEffect getEffect() {
+ return effect;
+ }
+
+ /**
+ * Sets the potion effect that will be applied.
+ *
+ * @param effect Potion effect
+ */
+ public void setEffect(@NotNull PotionEffect effect) {
+ this.effect = effect;
+ }
+
+ /**
+ * Gets the player who the potion effect is being applied to.
+ *
+ * @return Affected player
+ */
+ @NotNull
+ public Player getPlayer() {
+ return player;
+ }
+
+ /**
+ * Gets whether the effect is a primary beacon effect.
+ *
+ * @return true if this event represents a primary effect
+ */
+ public boolean isPrimary() {
+ return primary;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com>
Date: Mon, 29 Feb 2016 18:13:58 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerInitialSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerInitialSpawnEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..8b1fdb9d2869d4c1862d557c91bf8a1d8c537507
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerInitialSpawnEvent.java
@@ -0,0 +1,16 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.Location;
+import org.bukkit.entity.Player;
+import org.jetbrains.annotations.NotNull;
+import org.spigotmc.event.player.PlayerSpawnLocationEvent;
+
+/**
+ * @deprecated Use {@link PlayerSpawnLocationEvent}, Duplicate API
+ */
+public class PlayerInitialSpawnEvent extends PlayerSpawnLocationEvent {
+
+ public PlayerInitialSpawnEvent(@NotNull Player who, @NotNull Location spawnLocation) {
+ super(who, spawnLocation);
+ }
+}
@@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 29 Feb 2016 19:45:21 -0600
Subject: [PATCH] Automatically disable plugins that fail to load
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index b6d739ca8ad8ebd4b1be7ebd129f9a7ae16b2a2a..c8497cb3021f584a885f4cb21c3be576ce0935a7 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -344,6 +344,10 @@ public final class JavaPluginLoader implements PluginLoader {
jPlugin.setEnabled(true);
} catch (Throwable ex) {
server.getLogger().log(Level.SEVERE, "Error occurred while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ // Paper start - Disable plugins that fail to load
+ disablePlugin(jPlugin);
+ return;
+ // Paper end
}
// Perhaps abort here, rather than continue going, but as it stands,
@@ -1,50 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Mon, 29 Feb 2016 19:48:59 -0600
Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index cd1b4be422a3a4290579d5daed9466084f18ed60..10274053320f1ec690a65d3794abb44b58658059 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1705,6 +1705,19 @@ public final class Bukkit {
return server.getUnsafe();
}
+
+ // Paper start
+ /**
+ * Gets the active {@link org.bukkit.command.CommandMap}
+ *
+ * @return the active command map
+ */
+ @NotNull
+ public static org.bukkit.command.CommandMap getCommandMap() {
+ return server.getCommandMap();
+ }
+ // Paper end
+
@NotNull
public static Server.Spigot spigot() {
return server.spigot();
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9ec374570e135a4ba14db7efdbb5c1bd213226eb..7e4a728ceb943b6a32b9ba9b84bada34e71c0980 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1300,6 +1300,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
public double[] getTPS();
// Paper end
+ // Paper start
+ /**
+ * Gets the active {@link org.bukkit.command.CommandMap}
+ *
+ * @return the active command map
+ */
+ @NotNull
+ org.bukkit.command.CommandMap getCommandMap();
+
/**
* Get the advancement specified by this key.
*
@@ -1,124 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 19:54:32 -0600
Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
Change Javadoc to be accurate
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 10274053320f1ec690a65d3794abb44b58658059..22b83b142de97dcba28fa9a49730de7880d0b5d2 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -285,6 +285,30 @@ public final class Bukkit {
return server.broadcastMessage(message);
}
+ // Paper start
+ /**
+ * Sends the component to all online players.
+ *
+ * @param component the component to send
+ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
+ */
+ @Deprecated
+ public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ server.broadcast(component);
+ }
+
+ /**
+ * Sends an array of components as a single message to all online players.
+ *
+ * @param components the components to send
+ * @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
+ */
+ @Deprecated
+ public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ server.broadcast(components);
+ }
+ // Paper end
+
/**
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 7e4a728ceb943b6a32b9ba9b84bada34e71c0980..9ce9b4ce2da6c57c62607502ae2042e30fc26d88 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -234,6 +234,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@Deprecated // Paper
public int broadcastMessage(@NotNull String message);
+ // Paper start
+ /**
+ * Sends the component to all online players.
+ *
+ * @param component the component to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */
+ @Deprecated
+ public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ spigot().broadcast(component);
+ }
+
+ /**
+ * Sends an array of components as a single message to all online players.
+ *
+ * @param components the components to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */
+ @Deprecated
+ public default void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ spigot().broadcast(components);
+ }
+ // Paper end
+
/**
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 68795a48cb15d322906ce0569b7701231c1f94c2..88853cc165c67fd60a0a8f87e4ce356e4ca045f9 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -614,6 +614,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendMap(@NotNull MapView map);
+ // Paper start
+ /**
+ * Sends the component to the player
+ *
+ * @param component the components to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */
+ @Override
+ @Deprecated
+ public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ spigot().sendMessage(component);
+ }
+
+ /**
+ * Sends an array of components as a single message to the player
+ *
+ * @param components the components to send
+ * @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
+ */
+ @Override
+ @Deprecated
+ public default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ spigot().sendMessage(components);
+ }
+
+ /**
+ * Sends an array of components as a single message to the specified screen position of this player
+ *
+ * @param position the screen position
+ * @param components the components to send
+ */
+ public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
+ spigot().sendMessage(position, components);
+ }
+ // Paper end
+
/**
* Forces an update of the player's entire inventory.
*
@@ -1,577 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Mon, 29 Feb 2016 20:02:40 -0600
Subject: [PATCH] Player Tab List and Title APIs
Co-authored-by: Fruxz <cedricspitzer@outlook.de>
diff --git a/src/main/java/com/destroystokyo/paper/Title.java b/src/main/java/com/destroystokyo/paper/Title.java
new file mode 100644
index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb902cb35d8c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/Title.java
@@ -0,0 +1,420 @@
+package com.destroystokyo.paper;
+
+import net.md_5.bungee.api.chat.BaseComponent;
+import net.md_5.bungee.api.chat.TextComponent;
+
+import org.bukkit.Bukkit;
+import org.bukkit.entity.Player;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Represents a title to may be sent to a {@link Player}.
+ *
+ * <p>A title can be sent without subtitle text.</p>
+ *
+ * @deprecated use {@link net.kyori.adventure.title.Title}
+ */
+@Deprecated
+public final class Title {
+
+ /**
+ * The default number of ticks for the title to fade in.
+ */
+ public static final int DEFAULT_FADE_IN = 20;
+ /**
+ * The default number of ticks for the title to stay.
+ */
+ public static final int DEFAULT_STAY = 200;
+ /**
+ * The default number of ticks for the title to fade out.
+ */
+ public static final int DEFAULT_FADE_OUT = 20;
+
+ private final BaseComponent[] title;
+ private final BaseComponent[] subtitle;
+ private final int fadeIn;
+ private final int stay;
+ private final int fadeOut;
+
+ /**
+ * Create a title with the default time values and no subtitle.
+ *
+ * <p>Times use default values.</p>
+ *
+ * @param title the main text of the title
+ * @throws NullPointerException if the title is null
+ */
+ public Title(@NotNull BaseComponent title) {
+ this(title, null);
+ }
+
+ /**
+ * Create a title with the default time values and no subtitle.
+ *
+ * <p>Times use default values.</p>
+ *
+ * @param title the main text of the title
+ * @throws NullPointerException if the title is null
+ */
+ public Title(@NotNull BaseComponent[] title) {
+ this(title, null);
+ }
+
+ /**
+ * Create a title with the default time values and no subtitle.
+ *
+ * <p>Times use default values.</p>
+ *
+ * @param title the main text of the title
+ * @throws NullPointerException if the title is null
+ */
+ public Title(@NotNull String title) {
+ this(title, null);
+ }
+
+ /**
+ * Create a title with the default time values.
+ *
+ * <p>Times use default values.</p>
+ *
+ * @param title the main text of the title
+ * @param subtitle the secondary text of the title
+ */
+ public Title(@NotNull BaseComponent title, @Nullable BaseComponent subtitle) {
+ this(title, subtitle, DEFAULT_FADE_IN, DEFAULT_STAY, DEFAULT_FADE_OUT);
+ }
+
+ /**
+ * Create a title with the default time values.
+ *
+ * <p>Times use default values.</p>
+ *
+ * @param title the main text of the title
+ * @param subtitle the secondary text of the title
+ */
+ public Title(@NotNull BaseComponent[] title, @Nullable BaseComponent[] subtitle) {
+ this(title, subtitle, DEFAULT_FADE_IN, DEFAULT_STAY, DEFAULT_FADE_OUT);
+ }
+
+ /**
+ * Create a title with the default time values.
+ *
+ * <p>Times use default values.</p>
+ *
+ * @param title the main text of the title
+ * @param subtitle the secondary text of the title
+ */
+ public Title(@NotNull String title, @Nullable String subtitle) {
+ this(title, subtitle, DEFAULT_FADE_IN, DEFAULT_STAY, DEFAULT_FADE_OUT);
+ }
+
+ /**
+ * Creates a new title.
+ *
+ * @param title the main text of the title
+ * @param subtitle the secondary text of the title
+ * @param fadeIn the number of ticks for the title to fade in
+ * @param stay the number of ticks for the title to stay on screen
+ * @param fadeOut the number of ticks for the title to fade out
+ * @throws IllegalArgumentException if any of the times are negative
+ */
+ public Title(@NotNull BaseComponent title, @Nullable BaseComponent subtitle, int fadeIn, int stay, int fadeOut) {
+ this(
+ new BaseComponent[]{checkNotNull(title, "title")},
+ subtitle == null ? null : new BaseComponent[]{subtitle},
+ fadeIn,
+ stay,
+ fadeOut
+ );
+ }
+
+ /**
+ * Creates a new title.
+ *
+ * @param title the main text of the title
+ * @param subtitle the secondary text of the title
+ * @param fadeIn the number of ticks for the title to fade in
+ * @param stay the number of ticks for the title to stay on screen
+ * @param fadeOut the number of ticks for the title to fade out
+ * @throws IllegalArgumentException if any of the times are negative
+ */
+ public Title(@Nullable BaseComponent[] title, @NotNull BaseComponent[] subtitle, int fadeIn, int stay, int fadeOut) {
+ checkArgument(fadeIn >= 0, "Negative fadeIn: %s", fadeIn);
+ checkArgument(stay >= 0, "Negative stay: %s", stay);
+ checkArgument(fadeOut >= 0, "Negative fadeOut: %s", fadeOut);
+ this.title = checkNotNull(title, "title");
+ this.subtitle = subtitle;
+ this.fadeIn = fadeIn;
+ this.stay = stay;
+ this.fadeOut = fadeOut;
+ }
+
+ /**
+ * Creates a new title.
+ *
+ * <p>It is recommended to the {@link BaseComponent} constrctors.</p>
+ *
+ * @param title the main text of the title
+ * @param subtitle the secondary text of the title
+ * @param fadeIn the number of ticks for the title to fade in
+ * @param stay the number of ticks for the title to stay on screen
+ * @param fadeOut the number of ticks for the title to fade out
+ */
+ public Title(@NotNull String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut) {
+ this(
+ TextComponent.fromLegacyText(checkNotNull(title, "title")),
+ subtitle == null ? null : TextComponent.fromLegacyText(subtitle),
+ fadeIn,
+ stay,
+ fadeOut
+ );
+ }
+
+ /**
+ * Gets the text of this title
+ *
+ * @return the text
+ */
+ @NotNull
+ public BaseComponent[] getTitle() {
+ return this.title;
+ }
+
+ /**
+ * Gets the text of this title's subtitle
+ *
+ * @return the text
+ */
+ @Nullable
+ public BaseComponent[] getSubtitle() {
+ return this.subtitle;
+ }
+
+ /**
+ * Gets the number of ticks to fade in.
+ *
+ * <p>The returned value is never negative.</p>
+ *
+ * @return the number of ticks to fade in
+ */
+ public int getFadeIn() {
+ return this.fadeIn;
+ }
+
+ /**
+ * Gets the number of ticks to stay.
+ *
+ * <p>The returned value is never negative.</p>
+ *
+ * @return the number of ticks to stay
+ */
+ public int getStay() {
+ return this.stay;
+ }
+
+ /**
+ * Gets the number of ticks to fade out.
+ *
+ * <p>The returned value is never negative.</p>
+ *
+ * @return the number of ticks to fade out
+ */
+ public int getFadeOut() {
+ return this.fadeOut;
+ }
+
+ /**
+ * Sends the title directly to an player
+ *
+ * @param player the receiver of the title
+ */
+ public void send(@NotNull Player player) {
+ player.sendTitle(this);
+ }
+
+ /**
+ * Sends the title directly to the defined players
+ *
+ * @param players the receivers of the title
+ */
+ public void send(@NotNull Collection<? extends Player> players) {
+ for (Player player : players) {
+ player.sendTitle(this);
+ }
+ }
+
+ /**
+ * Sends the title directly to the defined players
+ *
+ * @param players the receivers of the title
+ */
+ public void send(@NotNull Player[] players) {
+ for (Player player : players) {
+ player.sendTitle(this);
+ }
+ }
+
+ /**
+ * Sends the title directly to all online players
+ */
+ public void broadcast() {
+ send(Bukkit.getOnlinePlayers());
+ }
+
+ @NotNull
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * A builder for creating titles
+ */
+ public static final class Builder {
+
+ private BaseComponent[] title;
+ private BaseComponent[] subtitle;
+ private int fadeIn = DEFAULT_FADE_IN;
+ private int stay = DEFAULT_STAY;
+ private int fadeOut = DEFAULT_FADE_OUT;
+
+ /**
+ * Sets the title to the given text.
+ *
+ * @param title the title text
+ * @return this builder instance
+ * @throws NullPointerException if the title is null
+ */
+ @NotNull
+ public Builder title(@NotNull BaseComponent title) {
+ return this.title(new BaseComponent[]{checkNotNull(title, "title")});
+ }
+
+ /**
+ * Sets the title to the given text.
+ *
+ * @param title the title text
+ * @return this builder instance
+ * @throws NullPointerException if the title is null
+ */
+ @NotNull
+ public Builder title(@NotNull BaseComponent[] title) {
+ this.title = checkNotNull(title, "title");
+ return this;
+ }
+
+ /**
+ * Sets the title to the given text.
+ *
+ * <p>It is recommended to the {@link BaseComponent} methods.</p>
+ *
+ * @param title the title text
+ * @return this builder instance
+ * @throws NullPointerException if the title is null
+ */
+ @NotNull
+ public Builder title(@NotNull String title) {
+ return this.title(TextComponent.fromLegacyText(checkNotNull(title, "title")));
+ }
+
+ /**
+ * Sets the subtitle to the given text.
+ *
+ * @param subtitle the title text
+ * @return this builder instance
+ */
+ @NotNull
+ public Builder subtitle(@Nullable BaseComponent subtitle) {
+ return this.subtitle(subtitle == null ? null : new BaseComponent[]{subtitle});
+ }
+
+ /**
+ * Sets the subtitle to the given text.
+ *
+ * @param subtitle the title text
+ * @return this builder instance
+ */
+ @NotNull
+ public Builder subtitle(@Nullable BaseComponent[] subtitle) {
+ this.subtitle = subtitle;
+ return this;
+ }
+
+ /**
+ * Sets the subtitle to the given text.
+ *
+ * <p>It is recommended to the {@link BaseComponent} methods.</p>
+ *
+ * @param subtitle the title text
+ * @return this builder instance
+ */
+ @NotNull
+ public Builder subtitle(@Nullable String subtitle) {
+ return this.subtitle(subtitle == null ? null : TextComponent.fromLegacyText(subtitle));
+ }
+
+ /**
+ * Sets the number of ticks for the title to fade in
+ *
+ * @param fadeIn the number of ticks to fade in
+ * @return this builder instance
+ * @throws IllegalArgumentException if it is negative
+ */
+ @NotNull
+ public Builder fadeIn(int fadeIn) {
+ checkArgument(fadeIn >= 0, "Negative fadeIn: %s", fadeIn);
+ this.fadeIn = fadeIn;
+ return this;
+ }
+
+
+ /**
+ * Sets the number of ticks for the title to stay.
+ *
+ * @param stay the number of ticks to stay
+ * @return this builder instance
+ * @throws IllegalArgumentException if it is negative
+ */
+ @NotNull
+ public Builder stay(int stay) {
+ checkArgument(stay >= 0, "Negative stay: %s", stay);
+ this.stay = stay;
+ return this;
+ }
+
+ /**
+ * Sets the number of ticks for the title to fade out.
+ *
+ * @param fadeOut the number of ticks to fade out
+ * @return this builder instance
+ * @throws IllegalArgumentException if it is negative
+ */
+ @NotNull
+ public Builder fadeOut(int fadeOut) {
+ checkArgument(fadeOut >= 0, "Negative fadeOut: %s", fadeOut);
+ this.fadeOut = fadeOut;
+ return this;
+ }
+
+ /**
+ * Create a title based on the values in the builder.
+ *
+ * @return a title from the values in this builder
+ * @throws IllegalStateException if title isn't specified
+ */
+ @NotNull
+ public Title build() {
+ checkState(title != null, "Title not specified");
+ return new Title(this.title, this.subtitle, this.fadeIn, this.stay, this.fadeOut);
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 88853cc165c67fd60a0a8f87e4ce356e4ca045f9..c9e4cb2d153fc0c6853fe520263a0073e7504e38 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2,6 +2,7 @@ package org.bukkit.entity;
import java.net.InetSocketAddress;
import java.util.UUID;
+import com.destroystokyo.paper.Title; // Paper
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -648,6 +649,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components);
}
+
+ /**
+ * Set the text displayed in the player list header and footer for this player
+ *
+ * @param header content for the top of the player list
+ * @param footer content for the bottom of the player list
+ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)}
+ */
+ @Deprecated
+ public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent[] header, @Nullable net.md_5.bungee.api.chat.BaseComponent[] footer);
+
+ /**
+ * Set the text displayed in the player list header and footer for this player
+ *
+ * @param header content for the top of the player list
+ * @param footer content for the bottom of the player list
+ * @deprecated in favour of {@link #sendPlayerListHeaderAndFooter(net.kyori.adventure.text.Component, net.kyori.adventure.text.Component)}
+ */
+ @Deprecated
+ public void setPlayerListHeaderFooter(@Nullable net.md_5.bungee.api.chat.BaseComponent header, @Nullable net.md_5.bungee.api.chat.BaseComponent footer);
+
+ /**
+ * Update the times for titles displayed to the player
+ *
+ * @param fadeInTicks ticks to fade-in
+ * @param stayTicks ticks to stay visible
+ * @param fadeOutTicks ticks to fade-out
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks);
+
+ /**
+ * Update the subtitle of titles displayed to the player
+ *
+ * @param subtitle Subtitle to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle);
+
+ /**
+ * Update the subtitle of titles displayed to the player
+ *
+ * @param subtitle Subtitle to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle);
+
+ /**
+ * Show the given title to the player, along with the last subtitle set, using the last set times
+ *
+ * @param title Title to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title);
+
+ /**
+ * Show the given title to the player, along with the last subtitle set, using the last set times
+ *
+ * @param title Title to set
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title);
+
+ /**
+ * Show the given title and subtitle to the player using the given times
+ *
+ * @param title big text
+ * @param subtitle little text under it
+ * @param fadeInTicks ticks to fade-in
+ * @param stayTicks ticks to stay visible
+ * @param fadeOutTicks ticks to fade-out
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title, @Nullable net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
+
+ /**
+ * Show the given title and subtitle to the player using the given times
+ *
+ * @param title big text
+ * @param subtitle little text under it
+ * @param fadeInTicks ticks to fade-in
+ * @param stayTicks ticks to stay visible
+ * @param fadeOutTicks ticks to fade-out
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title, @Nullable net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
+
+ /**
+ * Show the title to the player, overriding any previously displayed title.
+ *
+ * <p>This method overrides any previous title, use {@link #updateTitle(Title)} to change the existing one.</p>
+ *
+ * @param title the title to send
+ * @throws NullPointerException if the title is null
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ void sendTitle(@NotNull Title title);
+
+ /**
+ * Show the title to the player, overriding any previously displayed title.
+ *
+ * <p>This method doesn't override previous titles, but changes their values.</p>
+ *
+ * @param title the title to send
+ * @throws NullPointerException if title is null
+ * @deprecated use {@link #showTitle(net.kyori.adventure.title.Title)}
+ */
+ @Deprecated
+ void updateTitle(@NotNull Title title);
+
+ /**
+ * Hide any title that is currently visible to the player
+ *
+ * @deprecated use {@link #clearTitle()}
+ */
+ @Deprecated
+ public void hideTitle();
// Paper end
/**
@@ -1,604 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:24:35 -0600
Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..2f573299a9a817a98372817a1de8bf641aaca956
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java
@@ -0,0 +1,43 @@
+package com.destroystokyo.paper.event.server;
+
+import com.google.common.base.Preconditions;
+import org.apache.commons.lang.Validate;
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import com.destroystokyo.paper.exception.ServerException;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called whenever an exception is thrown in a recoverable section of the server.
+ */
+public class ServerExceptionEvent extends Event {
+ private static final HandlerList handlers = new HandlerList();
+ @NotNull private ServerException exception;
+
+ public ServerExceptionEvent(@NotNull ServerException exception) {
+ super(!Bukkit.isPrimaryThread());
+ this.exception = Preconditions.checkNotNull(exception, "exception");
+ }
+
+ /**
+ * Gets the wrapped exception that was thrown.
+ *
+ * @return Exception thrown
+ */
+ @NotNull
+ public ServerException getException() {
+ return exception;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerCommandException.java b/src/main/java/com/destroystokyo/paper/exception/ServerCommandException.java
new file mode 100644
index 0000000000000000000000000000000000000000..6fb39af0479a818f7f1465bcdfe505ab4ff7da1a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerCommandException.java
@@ -0,0 +1,64 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Thrown when a command throws an exception
+ */
+public class ServerCommandException extends ServerException {
+
+ private final Command command;
+ private final CommandSender commandSender;
+ private final String[] arguments;
+
+ public ServerCommandException(String message, Throwable cause, Command command, CommandSender commandSender, String[] arguments) {
+ super(message, cause);
+ this.commandSender = checkNotNull(commandSender, "commandSender");
+ this.arguments = checkNotNull(arguments, "arguments");
+ this.command = checkNotNull(command, "command");
+ }
+
+ public ServerCommandException(Throwable cause, Command command, CommandSender commandSender, String[] arguments) {
+ super(cause);
+ this.commandSender = checkNotNull(commandSender, "commandSender");
+ this.arguments = checkNotNull(arguments, "arguments");
+ this.command = checkNotNull(command, "command");
+ }
+
+ protected ServerCommandException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Command command, CommandSender commandSender, String[] arguments) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ this.commandSender = checkNotNull(commandSender, "commandSender");
+ this.arguments = checkNotNull(arguments, "arguments");
+ this.command = checkNotNull(command, "command");
+ }
+
+ /**
+ * Gets the command which threw the exception
+ *
+ * @return exception throwing command
+ */
+ public Command getCommand() {
+ return command;
+ }
+
+ /**
+ * Gets the command sender which executed the command request
+ *
+ * @return command sender of exception thrown command request
+ */
+ public CommandSender getCommandSender() {
+ return commandSender;
+ }
+
+ /**
+ * Gets the arguments which threw the exception for the command
+ *
+ * @return arguments of exception thrown command request
+ */
+ public String[] getArguments() {
+ return arguments;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerEventException.java b/src/main/java/com/destroystokyo/paper/exception/ServerEventException.java
new file mode 100644
index 0000000000000000000000000000000000000000..410b24139535cd5d8439ad581c43c61b5757fbf6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerEventException.java
@@ -0,0 +1,52 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.event.Event;
+import org.bukkit.event.Listener;
+import org.bukkit.plugin.Plugin;
+
+import static com.google.common.base.Preconditions.*;
+
+/**
+ * Exception thrown when a server event listener throws an exception
+ */
+public class ServerEventException extends ServerPluginException {
+
+ private final Listener listener;
+ private final Event event;
+
+ public ServerEventException(String message, Throwable cause, Plugin responsiblePlugin, Listener listener, Event event) {
+ super(message, cause, responsiblePlugin);
+ this.listener = checkNotNull(listener, "listener");
+ this.event = checkNotNull(event, "event");
+ }
+
+ public ServerEventException(Throwable cause, Plugin responsiblePlugin, Listener listener, Event event) {
+ super(cause, responsiblePlugin);
+ this.listener = checkNotNull(listener, "listener");
+ this.event = checkNotNull(event, "event");
+ }
+
+ protected ServerEventException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Plugin responsiblePlugin, Listener listener, Event event) {
+ super(message, cause, enableSuppression, writableStackTrace, responsiblePlugin);
+ this.listener = checkNotNull(listener, "listener");
+ this.event = checkNotNull(event, "event");
+ }
+
+ /**
+ * Gets the listener which threw the exception
+ *
+ * @return event listener
+ */
+ public Listener getListener() {
+ return listener;
+ }
+
+ /**
+ * Gets the event which caused the exception
+ *
+ * @return event
+ */
+ public Event getEvent() {
+ return event;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerException.java b/src/main/java/com/destroystokyo/paper/exception/ServerException.java
new file mode 100644
index 0000000000000000000000000000000000000000..c06ea3942447d4824b83ff839cb449fb818dede1
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerException.java
@@ -0,0 +1,23 @@
+package com.destroystokyo.paper.exception;
+
+/**
+ * Wrapper exception for all exceptions that are thrown by the server.
+ */
+public class ServerException extends Exception {
+
+ public ServerException(String message) {
+ super(message);
+ }
+
+ public ServerException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ServerException(Throwable cause) {
+ super(cause);
+ }
+
+ protected ServerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java
new file mode 100644
index 0000000000000000000000000000000000000000..e762ed0dbad51625e65fef2e1898679108459a36
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java
@@ -0,0 +1,35 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.Bukkit;
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
+
+/**
+ * Thrown when the internal server throws a recoverable exception.
+ */
+public class ServerInternalException extends ServerException {
+
+ public ServerInternalException(String message) {
+ super(message);
+ }
+
+ public ServerInternalException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public ServerInternalException(Throwable cause) {
+ super(cause);
+ }
+
+ protected ServerInternalException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+
+ public static void reportInternalException(Throwable cause) {
+ try {
+ Bukkit.getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(cause)));
+ ;
+ } catch (Throwable t) {
+ t.printStackTrace(); // Don't want to rethrow!
+ }
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginEnableDisableException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginEnableDisableException.java
new file mode 100644
index 0000000000000000000000000000000000000000..f016ba3b1b62e554a9bacbb9635f2dbe441b3c4e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginEnableDisableException.java
@@ -0,0 +1,20 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.plugin.Plugin;
+
+/**
+ * Thrown whenever there is an exception with any enabling or disabling of plugins.
+ */
+public class ServerPluginEnableDisableException extends ServerPluginException {
+ public ServerPluginEnableDisableException(String message, Throwable cause, Plugin responsiblePlugin) {
+ super(message, cause, responsiblePlugin);
+ }
+
+ public ServerPluginEnableDisableException(Throwable cause, Plugin responsiblePlugin) {
+ super(cause, responsiblePlugin);
+ }
+
+ protected ServerPluginEnableDisableException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Plugin responsiblePlugin) {
+ super(message, cause, enableSuppression, writableStackTrace, responsiblePlugin);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java
new file mode 100644
index 0000000000000000000000000000000000000000..6defac287d0214fdf99418d979144050cc1e53bc
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java
@@ -0,0 +1,38 @@
+package com.destroystokyo.paper.exception;
+
+import com.google.common.base.Preconditions;
+import org.apache.commons.lang.Validate;
+import org.bukkit.plugin.Plugin;
+
+import static com.google.common.base.Preconditions.*;
+
+/**
+ * Wrapper exception for all cases to which a plugin can be immediately blamed for
+ */
+public class ServerPluginException extends ServerException {
+ public ServerPluginException(String message, Throwable cause, Plugin responsiblePlugin) {
+ super(message, cause);
+ this.responsiblePlugin = checkNotNull(responsiblePlugin, "responsiblePlugin");
+ }
+
+ public ServerPluginException(Throwable cause, Plugin responsiblePlugin) {
+ super(cause);
+ this.responsiblePlugin = checkNotNull(responsiblePlugin, "responsiblePlugin");
+ }
+
+ protected ServerPluginException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Plugin responsiblePlugin) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ this.responsiblePlugin = checkNotNull(responsiblePlugin, "responsiblePlugin");
+ }
+
+ private final Plugin responsiblePlugin;
+
+ /**
+ * Gets the plugin which is directly responsible for the exception being thrown
+ *
+ * @return plugin which is responsible for the exception throw
+ */
+ public Plugin getResponsiblePlugin() {
+ return responsiblePlugin;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
new file mode 100644
index 0000000000000000000000000000000000000000..89e132525cfae0ce979e37b3e2793df781e47227
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
@@ -0,0 +1,64 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.entity.Player;
+import org.bukkit.plugin.Plugin;
+
+import static com.google.common.base.Preconditions.*;
+
+/**
+ * Thrown when an incoming plugin message channel throws an exception
+ */
+public class ServerPluginMessageException extends ServerPluginException {
+
+ private final Player player;
+ private final String channel;
+ private final byte[] data;
+
+ public ServerPluginMessageException(String message, Throwable cause, Plugin responsiblePlugin, Player player, String channel, byte[] data) {
+ super(message, cause, responsiblePlugin);
+ this.player = checkNotNull(player, "player");
+ this.channel = checkNotNull(channel, "channel");
+ this.data = checkNotNull(data, "data");
+ }
+
+ public ServerPluginMessageException(Throwable cause, Plugin responsiblePlugin, Player player, String channel, byte[] data) {
+ super(cause, responsiblePlugin);
+ this.player = checkNotNull(player, "player");
+ this.channel = checkNotNull(channel, "channel");
+ this.data = checkNotNull(data, "data");
+ }
+
+ protected ServerPluginMessageException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Plugin responsiblePlugin, Player player, String channel, byte[] data) {
+ super(message, cause, enableSuppression, writableStackTrace, responsiblePlugin);
+ this.player = checkNotNull(player, "player");
+ this.channel = checkNotNull(channel, "channel");
+ this.data = checkNotNull(data, "data");
+ }
+
+ /**
+ * Gets the channel to which the error occurred from recieving data from
+ *
+ * @return exception channel
+ */
+ public String getChannel() {
+ return channel;
+ }
+
+ /**
+ * Gets the data to which the error occurred from
+ *
+ * @return exception data
+ */
+ public byte[] getData() {
+ return data;
+ }
+
+ /**
+ * Gets the player which the plugin message causing the exception originated from
+ *
+ * @return exception player
+ */
+ public Player getPlayer() {
+ return player;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerSchedulerException.java b/src/main/java/com/destroystokyo/paper/exception/ServerSchedulerException.java
new file mode 100644
index 0000000000000000000000000000000000000000..2d0b2d4a9b3e5bdeec0e4ea7ab69858d86aa3715
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerSchedulerException.java
@@ -0,0 +1,37 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.scheduler.BukkitTask;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Thrown when a plugin's scheduler fails with an exception
+ */
+public class ServerSchedulerException extends ServerPluginException {
+
+ private final BukkitTask task;
+
+ public ServerSchedulerException(String message, Throwable cause, BukkitTask task) {
+ super(message, cause, task.getOwner());
+ this.task = checkNotNull(task, "task");
+ }
+
+ public ServerSchedulerException(Throwable cause, BukkitTask task) {
+ super(cause, task.getOwner());
+ this.task = checkNotNull(task, "task");
+ }
+
+ protected ServerSchedulerException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, BukkitTask task) {
+ super(message, cause, enableSuppression, writableStackTrace, task.getOwner());
+ this.task = checkNotNull(task, "task");
+ }
+
+ /**
+ * Gets the task which threw the exception
+ *
+ * @return exception throwing task
+ */
+ public BukkitTask getTask() {
+ return task;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerTabCompleteException.java b/src/main/java/com/destroystokyo/paper/exception/ServerTabCompleteException.java
new file mode 100644
index 0000000000000000000000000000000000000000..5582999fe94c7a3dac655044ccc6d078cd9521a1
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerTabCompleteException.java
@@ -0,0 +1,22 @@
+package com.destroystokyo.paper.exception;
+
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+
+/**
+ * Called when a tab-complete request throws an exception
+ */
+public class ServerTabCompleteException extends ServerCommandException {
+
+ public ServerTabCompleteException(String message, Throwable cause, Command command, CommandSender commandSender, String[] arguments) {
+ super(message, cause, command, commandSender, arguments);
+ }
+
+ public ServerTabCompleteException(Throwable cause, Command command, CommandSender commandSender, String[] arguments) {
+ super(cause, command, commandSender, arguments);
+ }
+
+ protected ServerTabCompleteException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, Command command, CommandSender commandSender, String[] arguments) {
+ super(message, cause, enableSuppression, writableStackTrace, command, commandSender, arguments);
+ }
+}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index f020cb04eba27a2e70fc7cf799ebbfb434b9d974..adfc7aae2c0f49bbcdd358e83b04a0cf078a7d52 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -8,6 +8,10 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
+import com.destroystokyo.paper.exception.ServerCommandException;
+import com.destroystokyo.paper.exception.ServerTabCompleteException;
import org.apache.commons.lang.Validate;
import org.bukkit.Location;
import org.bukkit.Server;
@@ -155,11 +159,14 @@ public class SimpleCommandMap implements CommandMap {
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
} // target.timings.stopTiming(); // Spigot // Paper
} catch (CommandException ex) {
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
//target.timings.stopTiming(); // Spigot // Paper
throw ex;
} catch (Throwable ex) {
//target.timings.stopTiming(); // Spigot // Paper
- throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex);
+ String msg = "Unhandled exception executing '" + commandLine + "' in " + target;
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
+ throw new CommandException(msg, ex);
}
// return true as command was handled
@@ -238,7 +245,9 @@ public class SimpleCommandMap implements CommandMap {
} catch (CommandException ex) {
throw ex;
} catch (Throwable ex) {
- throw new CommandException("Unhandled exception executing tab-completer for '" + cmdLine + "' in " + target, ex);
+ String msg = "Unhandled exception executing tab-completer for '" + cmdLine + "' in " + target;
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerTabCompleteException(msg, ex, target, sender, args))); // Paper
+ throw new CommandException(msg, ex);
}
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 745eaa8f2f2ff83536301db8ca47a8af30df7a73..d0fec44d2546290091649879450761ce08514fcb 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -23,6 +23,10 @@ import java.util.WeakHashMap;
import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
+import com.destroystokyo.paper.exception.ServerEventException;
+import com.destroystokyo.paper.exception.ServerPluginEnableDisableException;
import org.apache.commons.lang.Validate;
import org.bukkit.Server;
import org.bukkit.World;
@@ -478,7 +482,8 @@ public final class SimplePluginManager implements PluginManager {
try {
plugin.getPluginLoader().enablePlugin(plugin);
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while enabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ handlePluginException("Error occurred (in the plugin loader) while enabling "
+ + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin);
}
HandlerList.bakeAll();
@@ -499,32 +504,37 @@ public final class SimplePluginManager implements PluginManager {
try {
plugin.getPluginLoader().disablePlugin(plugin);
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while disabling " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ handlePluginException("Error occurred (in the plugin loader) while disabling "
+ + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
}
try {
server.getScheduler().cancelTasks(plugin);
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while cancelling tasks for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ handlePluginException("Error occurred (in the plugin loader) while cancelling tasks for "
+ + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
}
try {
server.getServicesManager().unregisterAll(plugin);
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering services for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ handlePluginException("Error occurred (in the plugin loader) while unregistering services for "
+ + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
}
try {
HandlerList.unregisterAll(plugin);
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering events for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ handlePluginException("Error occurred (in the plugin loader) while unregistering events for "
+ + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
}
try {
server.getMessenger().unregisterIncomingPluginChannel(plugin);
server.getMessenger().unregisterOutgoingPluginChannel(plugin);
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Error occurred (in the plugin loader) while unregistering plugin channels for " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
+ handlePluginException("Error occurred (in the plugin loader) while unregistering plugin channels for "
+ + plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
}
try {
@@ -537,6 +547,13 @@ public final class SimplePluginManager implements PluginManager {
}
}
+ // Paper start
+ private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
+ server.getLogger().log(Level.SEVERE, msg, ex);
+ callEvent(new ServerExceptionEvent(new ServerPluginEnableDisableException(msg, ex, plugin)));
+ }
+ // Paper end
+
@Override
public void clearPlugins() {
synchronized (this) {
@@ -600,7 +617,13 @@ public final class SimplePluginManager implements PluginManager {
));
}
} catch (Throwable ex) {
- server.getLogger().log(Level.SEVERE, "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName(), ex);
+ // Paper start - error reporting
+ String msg = "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName();
+ server.getLogger().log(Level.SEVERE, msg, ex);
+ if (!(event instanceof ServerExceptionEvent)) { // We don't want to cause an endless event loop
+ callEvent(new ServerExceptionEvent(new ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
+ }
+ // Paper end
}
}
}
@@ -1,54 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 8 Mar 2016 13:05:59 -0800
Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java
index c88418c7aa19b4fecdfa9af3d18ff202a5dc5763..fb0e608fa92dae99b9eee8fc1cbdf4b91a33e620 100644
--- a/src/main/java/org/bukkit/command/CommandSender.java
+++ b/src/main/java/org/bukkit/command/CommandSender.java
@@ -1,6 +1,9 @@
package org.bukkit.command;
import java.util.UUID;
+import net.kyori.adventure.audience.MessageType;
+import net.kyori.adventure.identity.Identity;
+import net.kyori.adventure.text.Component;
import org.bukkit.Server;
import org.bukkit.permissions.Permissible;
import org.jetbrains.annotations.NotNull;
@@ -117,5 +120,33 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
default void sendMessage(final @NotNull net.kyori.adventure.identity.Identity identity, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
this.sendMessage(org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(message));
}
+
+ /**
+ * Sends the component to the sender
+ *
+ * <p>If this sender does not support sending full components then
+ * the component will be sent as legacy text.</p>
+ *
+ * @param component the component to send
+ * @deprecated use {@link #sendMessage(Identity, Component, MessageType)} instead
+ */
+ @Deprecated
+ default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
+ this.sendMessage(component.toLegacyText());
+ }
+
+ /**
+ * Sends an array of components as a single message to the sender
+ *
+ * <p>If this sender does not support sending full components then
+ * the components will be sent as legacy text.</p>
+ *
+ * @param components the components to send
+ * @deprecated use {@link #sendMessage(Identity, Component, MessageType)} instead
+ */
+ @Deprecated
+ default void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
+ this.sendMessage(new net.md_5.bungee.api.chat.TextComponent(components).toLegacyText());
+ }
// Paper end
}
@@ -1,30 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:47:27 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 24c858182f25496cc7254f7cf9e996b3bea1f9ec..45e9f585c3e522ecf94a6bc42cdc190e1a191a5c 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -605,4 +605,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @return Whether the entity is invisible
*/
public boolean isInvisible();
+
+ // Paper start
+ /**
+ * Get the number of arrows stuck in this entity
+ * @return Number of arrows stuck
+ */
+ int getArrowsStuck();
+
+ /**
+ * Set the number of arrows stuck in this entity
+ *
+ * @param arrows Number of arrows to stick in this entity
+ */
+ void setArrowsStuck(int arrows);
+ // Paper end
}
@@ -1,118 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 22:59:54 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a3d3cefb3739f3cb787befb03a5ddc38fb343849..38f47517d5391696c52d8848c21dee40033458e6 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1124,7 +1124,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException Thrown if the URL is null.
* @throws IllegalArgumentException Thrown if the URL is too long. The
* length restriction is an implementation specific arbitrary value.
+ * @deprecated use {@link #setResourcePack(String, String)}
*/
+ @Deprecated // Paper
public void setResourcePack(@NotNull String url);
/**
@@ -1586,6 +1588,60 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.displayName())));
}
+
+ /**
+ * Request that the player's client download and switch resource packs.
+ * <p>
+ * The player's client will download the new resource pack asynchronously
+ * in the background, and will automatically switch to it once the
+ * download is complete. If the client has downloaded and cached the same
+ * resource pack in the past, it will perform a quick timestamp check
+ * over the network to determine if the resource pack has changed and
+ * needs to be downloaded again. When this request is sent for the very
+ * first time from a given server, the client will first display a
+ * confirmation GUI to the player before proceeding with the download.
+ * <p>
+ * Notes:
+ * <ul>
+ * <li>Players can disable server resources on their client, in which
+ * case this method will have no affect on them.
+ * <li>There is no concept of resetting resource packs back to default
+ * within Minecraft, so players will have to relog to do so.
+ * </ul>
+ *
+ * @param url The URL from which the client will download the resource
+ * pack. The string must contain only US-ASCII characters and should
+ * be encoded as per RFC 1738.
+ * @param hash A 40 character hexadecimal and lowercase SHA-1 digest of
+ * the resource pack file.
+ * @throws IllegalArgumentException Thrown if the URL is null.
+ * @throws IllegalArgumentException Thrown if the URL is too long. The
+ * length restriction is an implementation specific arbitrary value.
+ */
+ void setResourcePack(@NotNull String url, @NotNull String hash);
+
+ /**
+ * @return the most recent resource pack status received from the player,
+ * or null if no status has ever been received from this player.
+ */
+ @Nullable
+ org.bukkit.event.player.PlayerResourcePackStatusEvent.Status getResourcePackStatus();
+
+ /**
+ * @return the most recent resource pack hash received from the player,
+ * or null if no hash has ever been received from this player.
+ *
+ * @deprecated This is no longer sent from the client and will always be null
+ */
+ @Nullable
+ @Deprecated
+ String getResourcePackHash();
+
+ /**
+ * @return true if the last resource pack status received from this player
+ * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
+ */
+ boolean hasResourcePack();
// Paper end
// Spigot start
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
index b98195650d49d78ec35970ca0376b6289b861e4b..4c2102a11c3d682d98f0db4ccafa35231e66bcdd 100644
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
@@ -11,13 +11,32 @@ import org.jetbrains.annotations.NotNull;
public class PlayerResourcePackStatusEvent extends PlayerEvent {
private static final HandlerList handlers = new HandlerList();
+ @Deprecated
+ private final String hash; // Paper
private final Status status;
public PlayerResourcePackStatusEvent(@NotNull final Player who, @NotNull Status resourcePackStatus) {
super(who);
+ this.hash = null; // Paper
this.status = resourcePackStatus;
}
+ @Deprecated // Paper
+ public PlayerResourcePackStatusEvent(final Player who, Status resourcePackStatus, String hash) {
+ super(who);
+ this.hash = hash; // Paper
+ this.status = resourcePackStatus;
+ }
+
+ @Deprecated
+ /**
+ * @deprecated Hash does not seem to ever be set
+ */
+ public String getHash() {
+ return this.hash;
+ }
+ // Paper end
+
/**
* Gets the status of this pack.
*
@@ -1,398 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 13:20:33 -0700
Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods.
diff --git a/pom.xml b/pom.xml
index 75b2830340051deb0fa39149e80872d2b88ed6f0..c3d65e441f5c26b6c6b10f4924504d8f3837e674 100644
--- a/pom.xml
+++ b/pom.xml
@@ -143,6 +143,17 @@
<version>9.1</version>
<scope>test</scope>
</dependency>
+ <!-- ASM -->
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>9.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ <version>9.0</version>
+ </dependency>
</dependencies>
<build>
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
new file mode 100644
index 0000000000000000000000000000000000000000..5b28e9b1daba7834af67dbc193dd656bedd9a994
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
@@ -0,0 +1,42 @@
+package com.destroystokyo.paper.event.executor;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.Method;
+
+import com.destroystokyo.paper.util.SneakyThrow;
+import org.bukkit.event.Event;
+import org.bukkit.event.EventException;
+import org.bukkit.event.Listener;
+import org.bukkit.plugin.EventExecutor;
+import org.jetbrains.annotations.NotNull;
+
+public class MethodHandleEventExecutor implements EventExecutor {
+ private final Class<? extends Event> eventClass;
+ private final MethodHandle handle;
+
+ public MethodHandleEventExecutor(@NotNull Class<? extends Event> eventClass, @NotNull MethodHandle handle) {
+ this.eventClass = eventClass;
+ this.handle = handle;
+ }
+
+ public MethodHandleEventExecutor(@NotNull Class<? extends Event> eventClass, @NotNull Method m) {
+ this.eventClass = eventClass;
+ try {
+ m.setAccessible(true);
+ this.handle = MethodHandles.lookup().unreflect(m);
+ } catch (IllegalAccessException e) {
+ throw new AssertionError("Unable to set accessible", e);
+ }
+ }
+
+ @Override
+ public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
+ if (!eventClass.isInstance(event)) return;
+ try {
+ handle.invoke(listener, event);
+ } catch (Throwable t) {
+ SneakyThrow.sneaky(t);
+ }
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java
new file mode 100644
index 0000000000000000000000000000000000000000..c83672427324bd068ed52916f700b68446a226f6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java
@@ -0,0 +1,43 @@
+package com.destroystokyo.paper.event.executor;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+import com.destroystokyo.paper.util.SneakyThrow;
+import com.google.common.base.Preconditions;
+
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.event.EventException;
+import org.bukkit.event.Listener;
+import org.bukkit.plugin.EventExecutor;
+import org.jetbrains.annotations.NotNull;
+
+public class StaticMethodHandleEventExecutor implements EventExecutor {
+ private final Class<? extends Event> eventClass;
+ private final MethodHandle handle;
+
+ public StaticMethodHandleEventExecutor(@NotNull Class<? extends Event> eventClass, @NotNull Method m) {
+ Preconditions.checkArgument(Modifier.isStatic(m.getModifiers()), "Not a static method: %s", m);
+ Preconditions.checkArgument(eventClass != null, "eventClass is null");
+ this.eventClass = eventClass;
+ try {
+ m.setAccessible(true);
+ this.handle = MethodHandles.lookup().unreflect(m);
+ } catch (IllegalAccessException e) {
+ throw new AssertionError("Unable to set accessible", e);
+ }
+ }
+
+ @Override
+ public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException {
+ if (!eventClass.isInstance(event)) return;
+ try {
+ handle.invoke(event);
+ } catch (Throwable throwable) {
+ SneakyThrow.sneaky(throwable);
+ }
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
new file mode 100644
index 0000000000000000000000000000000000000000..b6e7d8ee8d903ebf975d60bec0e08603d9a49fdb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
@@ -0,0 +1,47 @@
+package com.destroystokyo.paper.event.executor.asm;
+
+import java.lang.reflect.Method;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.bukkit.plugin.EventExecutor;
+import org.jetbrains.annotations.NotNull;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Type;
+import org.objectweb.asm.commons.GeneratorAdapter;
+
+import static org.objectweb.asm.Opcodes.*;
+
+public class ASMEventExecutorGenerator {
+ @NotNull
+ public static byte[] generateEventExecutor(@NotNull Method m, @NotNull String name) {
+ ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
+ writer.visit(V1_8, ACC_PUBLIC, name.replace('.', '/'), null, Type.getInternalName(Object.class), new String[] {Type.getInternalName(EventExecutor.class)});
+ // Generate constructor
+ GeneratorAdapter methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null), ACC_PUBLIC, "<init>", "()V");
+ methodGenerator.loadThis();
+ methodGenerator.visitMethodInsn(INVOKESPECIAL, Type.getInternalName(Object.class), "<init>", "()V", false); // Invoke the super class (Object) constructor
+ methodGenerator.returnValue();
+ methodGenerator.endMethod();
+ // Generate the execute method
+ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V", null, null), ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Listener;)V");;
+ methodGenerator.loadArg(0);
+ methodGenerator.checkCast(Type.getType(m.getDeclaringClass()));
+ methodGenerator.loadArg(1);
+ methodGenerator.checkCast(Type.getType(m.getParameterTypes()[0]));
+ methodGenerator.visitMethodInsn(m.getDeclaringClass().isInterface() ? INVOKEINTERFACE : INVOKEVIRTUAL, Type.getInternalName(m.getDeclaringClass()), m.getName(), Type.getMethodDescriptor(m), m.getDeclaringClass().isInterface());
+ if (m.getReturnType() != void.class) {
+ methodGenerator.pop();
+ }
+ methodGenerator.returnValue();
+ methodGenerator.endMethod();
+ writer.visitEnd();
+ return writer.toByteArray();
+ }
+
+ public static AtomicInteger NEXT_ID = new AtomicInteger(1);
+ @NotNull
+ public static String generateName() {
+ int id = NEXT_ID.getAndIncrement();
+ return "com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor" + id;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
new file mode 100644
index 0000000000000000000000000000000000000000..f79685b48bb581277a6891927988b6f7a4389dc4
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
@@ -0,0 +1,34 @@
+package com.destroystokyo.paper.event.executor.asm;
+
+import org.jetbrains.annotations.NotNull;
+
+public interface ClassDefiner {
+
+ /**
+ * Returns if the defined classes can bypass access checks
+ *
+ * @return if classes bypass access checks
+ */
+ public default boolean isBypassAccessChecks() {
+ return false;
+ }
+
+ /**
+ * Define a class
+ *
+ * @param parentLoader the parent classloader
+ * @param name the name of the class
+ * @param data the class data to load
+ * @return the defined class
+ * @throws ClassFormatError if the class data is invalid
+ * @throws NullPointerException if any of the arguments are null
+ */
+ @NotNull
+ public Class<?> defineClass(@NotNull ClassLoader parentLoader, @NotNull String name, @NotNull byte[] data);
+
+ @NotNull
+ public static ClassDefiner getInstance() {
+ return SafeClassDefiner.INSTANCE;
+ }
+
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java
new file mode 100644
index 0000000000000000000000000000000000000000..ac99477e9f2c08041aeff31abc1d1edee58d0a67
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java
@@ -0,0 +1,66 @@
+package com.destroystokyo.paper.event.executor.asm;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import com.google.common.base.Preconditions;
+
+import com.google.common.collect.MapMaker;
+import org.jetbrains.annotations.NotNull;
+import org.objectweb.asm.Type;
+
+public class SafeClassDefiner implements ClassDefiner {
+ /* default */ static final SafeClassDefiner INSTANCE = new SafeClassDefiner();
+
+ private SafeClassDefiner() {}
+
+ private final ConcurrentMap<ClassLoader, GeneratedClassLoader> loaders = new MapMaker().weakKeys().makeMap();
+
+ @NotNull
+ @Override
+ public Class<?> defineClass(@NotNull ClassLoader parentLoader, @NotNull String name, @NotNull byte[] data) {
+ GeneratedClassLoader loader = loaders.computeIfAbsent(parentLoader, GeneratedClassLoader::new);
+ synchronized (loader.getClassLoadingLock(name)) {
+ Preconditions.checkState(!loader.hasClass(name), "%s already defined", name);
+ Class<?> c = loader.define(name, data);
+ assert c.getName().equals(name);
+ return c;
+ }
+ }
+
+ private static class GeneratedClassLoader extends ClassLoader {
+ static {
+ ClassLoader.registerAsParallelCapable();
+ }
+
+ protected GeneratedClassLoader(@NotNull ClassLoader parent) {
+ super(parent);
+ }
+
+ private Class<?> define(@NotNull String name, byte[] data) {
+ synchronized (getClassLoadingLock(name)) {
+ assert !hasClass(name);
+ Class<?> c = defineClass(name, data, 0, data.length);
+ resolveClass(c);
+ return c;
+ }
+ }
+
+ @Override
+ @NotNull
+ public Object getClassLoadingLock(@NotNull String name) {
+ return super.getClassLoadingLock(name);
+ }
+
+ public boolean hasClass(@NotNull String name) {
+ synchronized (getClassLoadingLock(name)) {
+ try {
+ Class.forName(name);
+ return true;
+ } catch (ClassNotFoundException e) {
+ return false;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java
index a850f0780de05463fc0d3f9e15ff7f19d88b2aed..9026e108ccd3a88aee1267ee275137befa646455 100644
--- a/src/main/java/org/bukkit/plugin/EventExecutor.java
+++ b/src/main/java/org/bukkit/plugin/EventExecutor.java
@@ -5,9 +5,75 @@ import org.bukkit.event.EventException;
import org.bukkit.event.Listener;
import org.jetbrains.annotations.NotNull;
+// Paper start
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.function.Function;
+
+import com.destroystokyo.paper.event.executor.MethodHandleEventExecutor;
+import com.destroystokyo.paper.event.executor.StaticMethodHandleEventExecutor;
+import com.destroystokyo.paper.event.executor.asm.ASMEventExecutorGenerator;
+import com.destroystokyo.paper.event.executor.asm.ClassDefiner;
+import com.google.common.base.Preconditions;
+// Paper end
+
/**
* Interface which defines the class for event call backs to plugins
*/
public interface EventExecutor {
public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException;
+
+ // Paper start
+ ConcurrentMap<Method, Class<? extends EventExecutor>> eventExecutorMap = new ConcurrentHashMap<Method, Class<? extends EventExecutor>>() {
+ @NotNull
+ @Override
+ public Class<? extends EventExecutor> computeIfAbsent(@NotNull Method key, @NotNull Function<? super Method, ? extends Class<? extends EventExecutor>> mappingFunction) {
+ Class<? extends EventExecutor> executorClass = get(key);
+ if (executorClass != null)
+ return executorClass;
+
+ //noinspection SynchronizationOnLocalVariableOrMethodParameter
+ synchronized (key) {
+ executorClass = get(key);
+ if (executorClass != null)
+ return executorClass;
+
+ return super.computeIfAbsent(key, mappingFunction);
+ }
+ }
+ };
+
+ @NotNull
+ public static EventExecutor create(@NotNull Method m, @NotNull Class<? extends Event> eventClass) {
+ Preconditions.checkNotNull(m, "Null method");
+ Preconditions.checkArgument(m.getParameterCount() != 0, "Incorrect number of arguments %s", m.getParameterCount());
+ Preconditions.checkArgument(m.getParameterTypes()[0] == eventClass, "First parameter %s doesn't match event class %s", m.getParameterTypes()[0], eventClass);
+ ClassDefiner definer = ClassDefiner.getInstance();
+ if (Modifier.isStatic(m.getModifiers())) {
+ return new StaticMethodHandleEventExecutor(eventClass, m);
+ } else if (definer.isBypassAccessChecks() || Modifier.isPublic(m.getDeclaringClass().getModifiers()) && Modifier.isPublic(m.getModifiers())) {
+ // get the existing generated EventExecutor class for the Method or generate one
+ Class<? extends EventExecutor> executorClass = eventExecutorMap.computeIfAbsent(m, (__) -> {
+ String name = ASMEventExecutorGenerator.generateName();
+ byte[] classData = ASMEventExecutorGenerator.generateEventExecutor(m, name);
+ return definer.defineClass(m.getDeclaringClass().getClassLoader(), name, classData).asSubclass(EventExecutor.class);
+ });
+
+ try {
+ EventExecutor asmExecutor = executorClass.newInstance();
+ // Define a wrapper to conform to bukkit stupidity (passing in events that don't match and wrapper exception)
+ return (listener, event) -> {
+ if (!eventClass.isInstance(event)) return;
+ asmExecutor.execute(listener, event);
+ };
+ } catch (InstantiationException | IllegalAccessException e) {
+ throw new AssertionError("Unable to initialize generated event executor", e);
+ }
+ } else {
+ return new MethodHandleEventExecutor(eventClass, m);
+ }
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index c8497cb3021f584a885f4cb21c3be576ce0935a7..5be6460e8eb81381c7e305cb7ab6b77c0c7a8fe5 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -300,21 +300,7 @@ public final class JavaPluginLoader implements PluginLoader {
}
}
- EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Paper
- @Override
- public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
- try {
- if (!eventClass.isAssignableFrom(event.getClass())) {
- return;
- }
- method.invoke(listener, event);
- } catch (InvocationTargetException ex) {
- throw new EventException(ex.getCause());
- } catch (Throwable t) {
- throw new EventException(t);
- }
- }
- }, plugin, method, eventClass); // Paper
+ EventExecutor executor = new co.aikar.timings.TimedEventExecutor(EventExecutor.create(method, eventClass), plugin, method, eventClass); // Paper // Paper (Yes.) - Use factory method `EventExecutor.create()`
if (false) { // Spigot - RL handles useTimings check now
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
} else {
@@ -1,104 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William <admin@domnian.com>
Date: Fri, 18 Mar 2016 03:28:07 -0400
Subject: [PATCH] Add command to reload permissions.yml and require confirm to
reload
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 22b83b142de97dcba28fa9a49730de7880d0b5d2..945d75525465739dd30610dff985ea0fb0f1c8df 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1740,6 +1740,13 @@ public final class Bukkit {
public static org.bukkit.command.CommandMap getCommandMap() {
return server.getCommandMap();
}
+
+ /**
+ * Reload the Permissions in permissions.yml
+ */
+ public static void reloadPermissions() {
+ server.reloadPermissions();
+ }
// Paper end
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9ce9b4ce2da6c57c62607502ae2042e30fc26d88..f69c30ebea9c9e9add0b6c97994be0ce64a80ad3 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1538,4 +1538,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@NotNull
Spigot spigot();
// Spigot end
+
+ void reloadPermissions(); // Paper
}
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index 50cc311be7904cc8fc6070a21c8e4de3a489fd20..c62da4131b17e66892678e8b618fb9ba3de93b56 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -13,15 +13,35 @@ public class ReloadCommand extends BukkitCommand {
public ReloadCommand(@NotNull String name) {
super(name);
this.description = "Reloads the server configuration and plugins";
- this.usageMessage = "/reload";
+ this.usageMessage = "/reload [permissions]"; // Paper
this.setPermission("bukkit.command.reload");
this.setAliases(Arrays.asList("rl"));
}
@Override
- public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) {
+ public boolean execute(@NotNull CommandSender sender, @NotNull String currentAlias, @NotNull String[] args) { // Paper
if (!testPermission(sender)) return true;
+ // Paper start - Reload permissions.yml & require confirm
+ boolean confirmed = System.getProperty("LetMeReload") != null;
+ if (args.length == 1) {
+ if (args[0].equalsIgnoreCase("permissions")) {
+ Bukkit.getServer().reloadPermissions();
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Permissions successfully reloaded.");
+ return true;
+ } else if ("confirm".equalsIgnoreCase(args[0])) {
+ confirmed = true;
+ } else {
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "Usage: " + usageMessage);
+ return true;
+ }
+ }
+ if (!confirmed) {
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "Are you sure you wish to reload your server? Doing so may cause bugs and memory leaks. It is recommended to restart instead of using /reload. To confirm, please type " + ChatColor.YELLOW + "/reload confirm");
+ return true;
+ }
+ // Paper end
+
Command.broadcastCommandMessage(sender, ChatColor.RED + "Please note that this command is not supported and may cause issues when using some plugins.");
Command.broadcastCommandMessage(sender, ChatColor.RED + "If you encounter any issues please use the /stop command to restart your server.");
Bukkit.reload();
@@ -33,6 +53,6 @@ public class ReloadCommand extends BukkitCommand {
@NotNull
@Override
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException {
- return Collections.emptyList();
+ return java.util.Collections.singletonList("permissions"); // Paper
}
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index d0fec44d2546290091649879450761ce08514fcb..8b33d914d29897c0276f9e2e7ce83bd2c316d5e2 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -894,4 +894,13 @@ public final class SimplePluginManager implements PluginManager {
public void useTimings(boolean use) {
co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
}
+
+ // Paper start
+ public void clearPermissions() {
+ permissions.clear();
+ defaultPerms.get(true).clear();
+ defaultPerms.get(false).clear();
+ }
+ // Paper end
+
}
@@ -1,48 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:05:21 -0400
Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
index c2793f3ef01c1246c130971c17e1c2bf8f551435..373f4b5b5185aa81ff728da89c9cc4e0ccf87889 100644
--- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
@@ -22,6 +22,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private boolean isCancelled = false;
private ItemStack item;
+ @Nullable private ItemStack replacement; // Paper
/**
* @param player the player consuming
@@ -58,6 +59,29 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
}
}
+ // Paper start
+ /**
+ * Return the custom item stack that will replace the consumed item, or null if no
+ * custom replacement has been set (which means the default replacement will be used).
+ *
+ * @return The custom item stack that will replace the consumed item or null
+ */
+ @Nullable
+ public ItemStack getReplacement() {
+ return this.replacement;
+ }
+
+ /**
+ * Set a custom item stack to replace the consumed item. Pass null to clear any custom
+ * stack that has been set and use the default replacement.
+ *
+ * @param replacement Replacement item to set, null to clear any custom stack and use default
+ */
+ public void setReplacement(@Nullable ItemStack replacement) {
+ this.replacement = replacement;
+ }
+ // Paper end
+
@Override
public boolean isCancelled() {
return this.isCancelled;
@@ -1,79 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:26:34 -0400
Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityAddToWorldEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityAddToWorldEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..07660202e41ee86f1b66bad3335cf6fe126e7f9c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityAddToWorldEvent.java
@@ -0,0 +1,32 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.Entity;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired any time an entity is being added to the world for any reason.
+ *
+ * Not to be confused with {@link org.bukkit.event.entity.CreatureSpawnEvent}
+ * This will fire anytime a chunk is reloaded too.
+ */
+public class EntityAddToWorldEvent extends EntityEvent {
+
+ public EntityAddToWorldEvent(@NotNull Entity entity) {
+ super(entity);
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityRemoveFromWorldEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityRemoveFromWorldEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..e5dbbd660409bae0d3b96e83390511d3a423a52e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityRemoveFromWorldEvent.java
@@ -0,0 +1,29 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.Entity;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired any time an entity is being removed from a world for any reason
+ */
+public class EntityRemoveFromWorldEvent extends EntityEvent {
+
+ public EntityRemoveFromWorldEvent(@NotNull Entity entity) {
+ super(entity);
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,95 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 21:15:34 -0400
Subject: [PATCH] EntityPathfindEvent
Fires when an Entity decides to start moving to a location.
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..63e46b2fb1b12b36fcb1e98b178cf29dd2e3d1b5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityPathfindEvent.java
@@ -0,0 +1,82 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.Location;
+import org.bukkit.entity.Entity;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Fired when an Entity decides to start moving towards a location.
+ *
+ * This event does not fire for the entities actual movement. Only when it
+ * is choosing to start moving to a location.
+ */
+public class EntityPathfindEvent extends EntityEvent implements Cancellable {
+ @Nullable private final Entity targetEntity;
+ @NotNull private final Location loc;
+
+ public EntityPathfindEvent(@NotNull Entity entity, @NotNull Location loc, @Nullable Entity targetEntity) {
+ super(entity);
+ this.targetEntity = targetEntity;
+ this.loc = loc;
+ }
+
+ /**
+ * The Entity that is pathfinding.
+ * @return The Entity that is pathfinding.
+ */
+ @NotNull
+ public Entity getEntity() {
+ return entity;
+ }
+
+ /**
+ * If the Entity is trying to pathfind to an entity, this is the entity in relation.
+ *
+ * Otherwise this will return null.
+ *
+ * @return The entity target or null
+ */
+ @Nullable
+ public Entity getTargetEntity() {
+ return targetEntity;
+ }
+
+ /**
+ * The Location of where the entity is about to move to.
+ *
+ * Note that if the target happened to of been an entity
+ * @return Location of where the entity is trying to pathfind to.
+ */
+ @NotNull
+ public Location getLoc() {
+ return loc;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+}
@@ -1,90 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: crast <contact@jamescrasta.com>
Date: Sat, 1 Jun 2013 13:52:30 -0600
Subject: [PATCH] Reduce thread synchronization in MetadataStoreBase
Use ConcurrentHashMap to allow thread-safe access methods and very
limited synchronized portions to allow much higher concurrency in
MetadataStore as well as far less locking, especially on reads
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
index baf850226aed8545a5794deba6dff9603953b4b2..d363d517c05b3335101d829ce4ec22d049059c24 100644
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
@@ -12,7 +12,7 @@ import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
public abstract class MetadataStoreBase<T> {
- private Map<String, Map<Plugin, MetadataValue>> metadataMap = new HashMap<String, Map<Plugin, MetadataValue>>();
+ private Map<String, Map<Plugin, MetadataValue>> metadataMap = new java.util.concurrent.ConcurrentHashMap<String, Map<Plugin, MetadataValue>>(); // Paper
/**
* Adds a metadata value to an object. Each metadata value is owned by a
@@ -46,7 +46,9 @@ public abstract class MetadataStoreBase<T> {
entry = new WeakHashMap<Plugin, MetadataValue>(1);
metadataMap.put(key, entry);
}
- entry.put(owningPlugin, newMetadataValue);
+ synchronized (entry) {
+ entry.put(owningPlugin, newMetadataValue);
+ }
}
/**
@@ -60,10 +62,11 @@ public abstract class MetadataStoreBase<T> {
* @see MetadataStore#getMetadata(Object, String)
*/
@NotNull
- public synchronized List<MetadataValue> getMetadata(@NotNull T subject, @NotNull String metadataKey) {
+ public List<MetadataValue> getMetadata(@NotNull T subject, @NotNull String metadataKey) { // Paper
String key = disambiguate(subject, metadataKey);
- if (metadataMap.containsKey(key)) {
- Collection<MetadataValue> values = metadataMap.get(key).values();
+ Map<Plugin, MetadataValue> entry = metadataMap.get(key);
+ if (entry != null) {
+ Collection<MetadataValue> values = entry.values();
return Collections.unmodifiableList(new ArrayList<MetadataValue>(values));
} else {
return Collections.emptyList();
@@ -78,7 +81,7 @@ public abstract class MetadataStoreBase<T> {
* @param metadataKey the unique metadata key being queried.
* @return the existence of the metadataKey within subject.
*/
- public synchronized boolean hasMetadata(@NotNull T subject, @NotNull String metadataKey) {
+ public boolean hasMetadata(@NotNull T subject, @NotNull String metadataKey) { // Paper
String key = disambiguate(subject, metadataKey);
return metadataMap.containsKey(key);
}
@@ -94,17 +97,18 @@ public abstract class MetadataStoreBase<T> {
* @see MetadataStore#removeMetadata(Object, String,
* org.bukkit.plugin.Plugin)
*/
- public synchronized void removeMetadata(@NotNull T subject, @NotNull String metadataKey, @NotNull Plugin owningPlugin) {
+ public void removeMetadata(@NotNull T subject, @NotNull String metadataKey, @NotNull Plugin owningPlugin) { // Paper
Validate.notNull(owningPlugin, "Plugin cannot be null");
String key = disambiguate(subject, metadataKey);
Map<Plugin, MetadataValue> entry = metadataMap.get(key);
if (entry == null) {
return;
}
-
- entry.remove(owningPlugin);
- if (entry.isEmpty()) {
- metadataMap.remove(key);
+ synchronized (entry) {
+ entry.remove(owningPlugin);
+ if (entry.isEmpty()) {
+ metadataMap.remove(key);
+ }
}
}
@@ -117,7 +121,7 @@ public abstract class MetadataStoreBase<T> {
* @throws IllegalArgumentException If plugin is null
* @see MetadataStore#invalidateAll(org.bukkit.plugin.Plugin)
*/
- public synchronized void invalidateAll(@NotNull Plugin owningPlugin) {
+ public void invalidateAll(@NotNull Plugin owningPlugin) { // Paper
Validate.notNull(owningPlugin, "Plugin cannot be null");
for (Map<Plugin, MetadataValue> values : metadataMap.values()) {
if (values.containsKey(owningPlugin)) {
@@ -1,46 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 16 Jul 2013 21:26:50 -0400
Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
So that on reload, metadata will be cleared
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
index d363d517c05b3335101d829ce4ec22d049059c24..abbe545af572687a0399c2387434863cd2b70f68 100644
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator; // Paper
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
@@ -130,6 +131,26 @@ public abstract class MetadataStoreBase<T> {
}
}
+ /**
+ * Removes all metadata in the metadata store that originates from the
+ * given plugin.
+ *
+ * @param owningPlugin the plugin requesting the invalidation.
+ * @throws IllegalArgumentException If plugin is null
+ */
+ public void removeAll(@NotNull Plugin owningPlugin) {
+ Validate.notNull(owningPlugin, "Plugin cannot be null");
+ for (Iterator<Map<Plugin, MetadataValue>> iterator = metadataMap.values().iterator(); iterator.hasNext(); ) {
+ Map<Plugin, MetadataValue> values = iterator.next();
+ if (values.containsKey(owningPlugin)) {
+ values.remove(owningPlugin);
+ }
+ if (values.isEmpty()) {
+ iterator.remove();
+ }
+ }
+ }
+
/**
* Creates a unique name for the object receiving metadata by combining
* unique data from the subject with a metadataKey.
@@ -1,58 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 05:08:36 -0400
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..09cfdf48ead8f03f3497646537292174241b0868
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
@@ -0,0 +1,46 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.bukkit.inventory.EquipmentSlot;
+import org.jetbrains.annotations.NotNull;
+
+public class PlayerUseUnknownEntityEvent extends PlayerEvent {
+
+ private static final HandlerList handlers = new HandlerList();
+ private final int entityId;
+ private final boolean attack;
+ @NotNull private final EquipmentSlot hand;
+
+ public PlayerUseUnknownEntityEvent(@NotNull Player who, int entityId, boolean attack, @NotNull EquipmentSlot hand) {
+ super(who);
+ this.entityId = entityId;
+ this.attack = attack;
+ this.hand = hand;
+ }
+
+ public int getEntityId() {
+ return this.entityId;
+ }
+
+ public boolean isAttack() {
+ return this.attack;
+ }
+
+ @NotNull
+ public EquipmentSlot getHand() {
+ return this.hand;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,290 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 13 Apr 2016 20:20:18 -0700
Subject: [PATCH] Add handshake event to allow plugins to handle client
handshaking logic themselves
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..a077962fa786a3291849abfa823c7f0ec4664fce
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java
@@ -0,0 +1,277 @@
+package com.destroystokyo.paper.event.player;
+
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import org.apache.commons.lang.Validate;
+import org.bukkit.Bukkit;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import java.util.UUID;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * This event is fired during a player handshake.
+ *
+ * <p>If there are no listeners listening to this event, the logic default
+ * to your server platform will be ran.</p>
+ *
+ * <p>WARNING: TAMPERING WITH THIS EVENT CAN BE DANGEROUS</p>
+ */
+public class PlayerHandshakeEvent extends Event implements Cancellable {
+
+ private static final HandlerList HANDLERS = new HandlerList();
+ @NotNull private final String originalHandshake;
+ @NotNull private final String originalSocketAddressHostname;
+ private boolean cancelled;
+ @Nullable private String serverHostname;
+ @Nullable private String socketAddressHostname;
+ @Nullable private UUID uniqueId;
+ @Nullable private String propertiesJson;
+ private boolean failed;
+ private Component failMessage = Component.text("If you wish to use IP forwarding, please enable it in your BungeeCord config as well!", NamedTextColor.YELLOW);
+
+ /**
+ * Creates a new {@link PlayerHandshakeEvent}.
+ *
+ * @param originalHandshake the original handshake string
+ * @param cancelled if this event is enabled
+ *
+ * @deprecated in favour of {@link PlayerHandshakeEvent(String, String, boolean)}
+ */
+ @Deprecated
+ public PlayerHandshakeEvent(@NotNull String originalHandshake, boolean cancelled) {
+ this(originalHandshake, "127.0.0.1", cancelled);
+ }
+
+ /**
+ * Creates a new {@link PlayerHandshakeEvent}.
+ *
+ * @param originalHandshake the original handshake string
+ * @param originalSocketAddressHostname the original socket address hostname
+ * @param cancelled if this event is enabled
+ */
+ public PlayerHandshakeEvent(@NotNull String originalHandshake, @NotNull String originalSocketAddressHostname, boolean cancelled) {
+ super(true);
+ this.originalHandshake = originalHandshake;
+ this.originalSocketAddressHostname = originalSocketAddressHostname;
+ this.cancelled = cancelled;
+ }
+
+ /**
+ * Determines if this event is cancelled.
+ *
+ * <p>When this event is cancelled, custom handshake logic will not
+ * be processed.</p>
+ *
+ * @return {@code true} if this event is cancelled, {@code false} otherwise
+ */
+ @Override
+ public boolean isCancelled() {
+ return this.cancelled;
+ }
+
+ /**
+ * Sets if this event is cancelled.
+ *
+ * <p>When this event is cancelled, custom handshake logic will not
+ * be processed.</p>
+ *
+ * @param cancelled {@code true} if this event is cancelled, {@code false} otherwise
+ */
+ @Override
+ public void setCancelled(boolean cancelled) {
+ this.cancelled = cancelled;
+ }
+
+ /**
+ * Gets the original handshake string.
+ *
+ * @return the original handshake string
+ */
+ @NotNull
+ public String getOriginalHandshake() {
+ return this.originalHandshake;
+ }
+
+ /**
+ * Gets the original socket address hostname.
+ *
+ * <p>This does not include the port.</p>
+ * <p>In cases where this event is manually fired and the plugin wasn't updated yet, the default is {@code "127.0.0.1"}.</p>
+ *
+ * @return the original socket address hostname
+ */
+ @NotNull
+ public String getOriginalSocketAddressHostname() {
+ return this.originalSocketAddressHostname;
+ }
+
+ /**
+ * Gets the server hostname string.
+ *
+ * <p>This should not include the port.</p>
+ *
+ * @return the server hostname string
+ */
+ @Nullable
+ public String getServerHostname() {
+ return this.serverHostname;
+ }
+
+ /**
+ * Sets the server hostname string.
+ *
+ * <p>This should not include the port.</p>
+ *
+ * @param serverHostname the server hostname string
+ */
+ public void setServerHostname(@NotNull String serverHostname) {
+ this.serverHostname = serverHostname;
+ }
+
+ /**
+ * Gets the socket address hostname string.
+ *
+ * <p>This should not include the port.</p>
+ *
+ * @return the socket address hostname string
+ */
+ @Nullable
+ public String getSocketAddressHostname() {
+ return this.socketAddressHostname;
+ }
+
+ /**
+ * Sets the socket address hostname string.
+ *
+ * <p>This should not include the port.</p>
+ *
+ * @param socketAddressHostname the socket address hostname string
+ */
+ public void setSocketAddressHostname(@NotNull String socketAddressHostname) {
+ this.socketAddressHostname = socketAddressHostname;
+ }
+
+ /**
+ * Gets the unique id.
+ *
+ * @return the unique id
+ */
+ @Nullable
+ public UUID getUniqueId() {
+ return this.uniqueId;
+ }
+
+ /**
+ * Sets the unique id.
+ *
+ * @param uniqueId the unique id
+ */
+ public void setUniqueId(@NotNull UUID uniqueId) {
+ this.uniqueId = uniqueId;
+ }
+
+ /**
+ * Gets the profile properties.
+ *
+ * <p>This should be a valid JSON string.</p>
+ *
+ * @return the profile properties, as JSON
+ */
+ @Nullable
+ public String getPropertiesJson() {
+ return this.propertiesJson;
+ }
+
+ /**
+ * Determines if authentication failed.
+ *
+ * <p>When {@code true}, the client connecting will be disconnected
+ * with the {@link #getFailMessage() fail message}.</p>
+ *
+ * @return {@code true} if authentication failed, {@code false} otherwise
+ */
+ public boolean isFailed() {
+ return this.failed;
+ }
+
+ /**
+ * Sets if authentication failed and the client should be disconnected.
+ *
+ * <p>When {@code true}, the client connecting will be disconnected
+ * with the {@link #getFailMessage() fail message}.</p>
+ *
+ * @param failed {@code true} if authentication failed, {@code false} otherwise
+ */
+ public void setFailed(boolean failed) {
+ this.failed = failed;
+ }
+
+ /**
+ * Sets the profile properties.
+ *
+ * <p>This should be a valid JSON string.</p>
+ *
+ * @param propertiesJson the profile properties, as JSON
+ */
+ public void setPropertiesJson(@NotNull String propertiesJson) {
+ this.propertiesJson = propertiesJson;
+ }
+
+ /**
+ * Gets the message to display to the client when authentication fails.
+ *
+ * @return the message to display to the client
+ */
+ @NotNull
+ public Component failMessage() {
+ return this.failMessage;
+ }
+
+ /**
+ * Sets the message to display to the client when authentication fails.
+ *
+ * @param failMessage the message to display to the client
+ */
+ public void failMessage(@NotNull Component failMessage) {
+ this.failMessage = failMessage;
+ }
+
+ /**
+ * Gets the message to display to the client when authentication fails.
+ *
+ * @return the message to display to the client
+ * @deprecated use {@link #failMessage()}
+ */
+ @NotNull
+ @Deprecated
+ public String getFailMessage() {
+ return Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.failMessage());
+ }
+
+ /**
+ * Sets the message to display to the client when authentication fails.
+ *
+ * @param failMessage the message to display to the client
+ * @deprecated use {@link #failMessage(Component)}
+ */
+ @Deprecated
+ public void setFailMessage(@NotNull String failMessage) {
+ Validate.notEmpty(failMessage, "fail message cannot be null or empty");
+ this.failMessage(Bukkit.getUnsafe().legacyComponentSerializer().deserialize(failMessage));
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLERS;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLERS;
+ }
+}
@@ -1,49 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Fri, 4 Mar 2016 03:13:18 -0500
Subject: [PATCH] Arrow pickup rule API
diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java
index 5b50a4e10e8ace8cc53ad3c8d7c3185f88d5c8db..e8e56e89e32d84af0639fe2e9b0eeabd747b6007 100644
--- a/src/main/java/org/bukkit/entity/AbstractArrow.java
+++ b/src/main/java/org/bukkit/entity/AbstractArrow.java
@@ -141,4 +141,38 @@ public interface AbstractArrow extends Projectile {
*/
CREATIVE_ONLY
}
+
+ // Paper start
+ /**
+ * Gets the {@link PickupRule} for this arrow.
+ *
+ * <p>This is generally {@link PickupRule#ALLOWED} only if the arrow was
+ * <b>not</b> fired from a bow with the infinity enchantment.</p>
+ *
+ * @return The pickup rule
+ * @deprecated Use {@link Arrow#getPickupStatus()} as an upstream compatible replacement for this function
+ */
+ @Deprecated
+ default PickupRule getPickupRule() {
+ return PickupRule.valueOf(this.getPickupStatus().name());
+ }
+
+ /**
+ * Set the rule for which players can pickup this arrow as an item.
+ *
+ * @param rule The pickup rule
+ * @deprecated Use {@link Arrow#setPickupStatus(PickupStatus)} with {@link PickupStatus} as an upstream compatible replacement for this function
+ */
+ @Deprecated
+ default void setPickupRule(PickupRule rule) {
+ this.setPickupStatus(PickupStatus.valueOf(rule.name()));
+ }
+
+ @Deprecated
+ enum PickupRule {
+ DISALLOWED,
+ ALLOWED,
+ CREATIVE_ONLY;
+ }
+ // Paper end
}
-402
View File
@@ -1,402 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 1 May 2016 15:19:49 -0400
Subject: [PATCH] LootTable API
Provides API to control what Loot Table an object uses.
Also provides an Event to control if a lootable inventory should
auto replenish for a player.
Provides methods to determine players looted state for an object
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java
new file mode 100644
index 0000000000000000000000000000000000000000..92d7b853a2ccaae5afa8ac141bead840942944ef
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableBlockInventory.java
@@ -0,0 +1,17 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.block.Block;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Represents an Inventory that can generate loot, such as Chests inside of Fortresses and Mineshafts
+ */
+public interface LootableBlockInventory extends LootableInventory {
+
+ /**
+ * Gets the block that is lootable
+ * @return The Block
+ */
+ @NotNull
+ Block getBlock();
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableEntityInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableEntityInventory.java
new file mode 100644
index 0000000000000000000000000000000000000000..b387894fe8001edb41ad2ad2b70ebabe065b682e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableEntityInventory.java
@@ -0,0 +1,17 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.entity.Entity;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Represents an Inventory that can generate loot, such as Minecarts inside of Mineshafts
+ */
+public interface LootableEntityInventory extends LootableInventory {
+
+ /**
+ * Gets the entity that is lootable
+ * @return The Entity
+ */
+ @NotNull
+ Entity getEntity();
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
new file mode 100644
index 0000000000000000000000000000000000000000..97815eeb231cf0706b34fa47a4f7d1bb786305b4
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
@@ -0,0 +1,116 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.entity.Player;
+import org.bukkit.loot.Lootable;
+
+import java.util.UUID;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Represents an Inventory that contains a Loot Table associated to it that will
+ * automatically fill on first open.
+ *
+ * A new feature and API is provided to support automatically refreshing the contents
+ * of the inventory based on that Loot Table after a configurable amount of time has passed.
+ *
+ * The behavior of how the Inventory is filled based on the loot table may vary based
+ * on Minecraft versions and the Loot Table feature.
+ */
+public interface LootableInventory extends Lootable {
+
+ /**
+ * Server owners have to enable whether or not an object in a world should refill
+ *
+ * @return If the world this inventory is currently in has Replenishable Lootables enabled
+ */
+ boolean isRefillEnabled();
+
+ /**
+ * Whether or not this object has ever been filled
+ * @return Has ever been filled
+ */
+ boolean hasBeenFilled();
+
+ /**
+ * Has this player ever looted this block
+ * @param player The player to check
+ * @return Whether or not this player has looted this block
+ */
+ default boolean hasPlayerLooted(@NotNull Player player) {
+ return hasPlayerLooted(player.getUniqueId());
+ }
+
+ /**
+ * Has this player ever looted this block
+ * @param player The player to check
+ * @return Whether or not this player has looted this block
+ */
+ boolean hasPlayerLooted(@NotNull UUID player);
+
+ /**
+ * Gets the timestamp, in milliseconds, of when the player last looted this object
+ *
+ * @param player The player to check
+ * @return Timestamp last looted, or null if player has not looted this object
+ */
+ @Nullable
+ default Long getLastLooted(@NotNull Player player) {
+ return getLastLooted(player.getUniqueId());
+ }
+
+ /**
+ * Gets the timestamp, in milliseconds, of when the player last looted this object
+ *
+ * @param player The player to check
+ * @return Timestamp last looted, or null if player has not looted this object
+ */
+ @Nullable
+ Long getLastLooted(@NotNull UUID player);
+
+ /**
+ * Change the state of whether or not a player has looted this block
+ * @param player The player to change state for
+ * @param looted true to add player to looted list, false to remove
+ * @return The previous state of whether the player had looted this or not
+ */
+ default boolean setHasPlayerLooted(@NotNull Player player, boolean looted) {
+ return setHasPlayerLooted(player.getUniqueId(), looted);
+ }
+
+ /**
+ * Change the state of whether or not a player has looted this block
+ * @param player The player to change state for
+ * @param looted true to add player to looted list, false to remove
+ * @return The previous state of whether the player had looted this or not
+ */
+ boolean setHasPlayerLooted(@NotNull UUID player, boolean looted);
+
+ /**
+ * Returns Whether or not this object has been filled and now has a pending refill
+ * @return Has pending refill
+ */
+ boolean hasPendingRefill();
+
+ /**
+ * Gets the timestamp in milliseconds that the Lootable object was last refilled
+ *
+ * @return -1 if it was never refilled, or timestamp in milliseconds
+ */
+ long getLastFilled();
+
+ /**
+ * Gets the timestamp in milliseconds that the Lootable object will refill
+ *
+ * @return -1 if it is not scheduled for refill, or timestamp in milliseconds
+ */
+ long getNextRefill();
+
+ /**
+ * Sets the timestamp in milliseconds of the next refill for this object
+ *
+ * @param refillAt timestamp in milliseconds. -1 to clear next refill
+ * @return The previous scheduled time to refill, or -1 if was not scheduled
+ */
+ long setNextRefill(long refillAt);
+}
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..fd184f13f5e8ee5cf829fff4f44696e1f760430b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventoryReplenishEvent.java
@@ -0,0 +1,45 @@
+package com.destroystokyo.paper.loottable;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.NotNull;
+
+public class LootableInventoryReplenishEvent extends PlayerEvent implements Cancellable {
+ @NotNull private final LootableInventory inventory;
+
+ public LootableInventoryReplenishEvent(@NotNull Player player, @NotNull LootableInventory inventory) {
+ super(player);
+ this.inventory = inventory;
+ }
+
+ @NotNull
+ public LootableInventory getInventory() {
+ return inventory;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+}
diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java
index b451191312e4fb19f2131c2d0a0c0337953f6c7c..db6affbc78106b2d93b41953b624a0bca0ca1d72 100644
--- a/src/main/java/org/bukkit/block/Chest.java
+++ b/src/main/java/org/bukkit/block/Chest.java
@@ -1,5 +1,7 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory; // Paper
+import org.bukkit.Nameable; // Paper
import org.bukkit.inventory.Inventory;
import org.bukkit.loot.Lootable;
import org.jetbrains.annotations.NotNull;
@@ -7,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a captured state of a chest.
*/
-public interface Chest extends Container, Lootable, Lidded {
+public interface Chest extends Container, LootableBlockInventory, Lidded { // Paper
/**
* Gets the inventory of the chest block represented by this block state.
diff --git a/src/main/java/org/bukkit/block/Dispenser.java b/src/main/java/org/bukkit/block/Dispenser.java
index 74cd194c9a98245dc52e7e352d7d6c046e1e5cf3..07af1a3f011d4b96275f919d302ac367198e923e 100644
--- a/src/main/java/org/bukkit/block/Dispenser.java
+++ b/src/main/java/org/bukkit/block/Dispenser.java
@@ -1,5 +1,6 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.Nameable;
import org.bukkit.loot.Lootable;
import org.bukkit.projectiles.BlockProjectileSource;
@@ -8,7 +9,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a captured state of a dispenser.
*/
-public interface Dispenser extends Container, Nameable, Lootable {
+public interface Dispenser extends Container, Nameable, LootableBlockInventory { // Paper
/**
* Gets the BlockProjectileSource object for the dispenser.
diff --git a/src/main/java/org/bukkit/block/Dropper.java b/src/main/java/org/bukkit/block/Dropper.java
index 424392fb5ed4628199b0e73689522aa3c90740cb..c76202321e29ad67597ca3017eb8d9baf6787383 100644
--- a/src/main/java/org/bukkit/block/Dropper.java
+++ b/src/main/java/org/bukkit/block/Dropper.java
@@ -1,11 +1,12 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.loot.Lootable;
/**
* Represents a captured state of a dropper.
*/
-public interface Dropper extends Container, Lootable {
+public interface Dropper extends Container, LootableBlockInventory { // Paper
/**
* Tries to drop a randomly selected item from the dropper's inventory,
diff --git a/src/main/java/org/bukkit/block/Hopper.java b/src/main/java/org/bukkit/block/Hopper.java
index 58e493099810fb8d4705ecd49b4a5e1e1949b87b..7ade312f180b7e30871d3a3240c76325cc369c26 100644
--- a/src/main/java/org/bukkit/block/Hopper.java
+++ b/src/main/java/org/bukkit/block/Hopper.java
@@ -1,8 +1,9 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.loot.Lootable;
/**
* Represents a captured state of a hopper.
*/
-public interface Hopper extends Container, Lootable { }
+public interface Hopper extends Container, LootableBlockInventory { } // Paper
diff --git a/src/main/java/org/bukkit/block/ShulkerBox.java b/src/main/java/org/bukkit/block/ShulkerBox.java
index 2ab26605814c0745ddb0836b2b3618a5b9251ab7..172f383fea619127324fec2b043639fd0683f135 100644
--- a/src/main/java/org/bukkit/block/ShulkerBox.java
+++ b/src/main/java/org/bukkit/block/ShulkerBox.java
@@ -1,5 +1,6 @@
package org.bukkit.block;
+import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.DyeColor;
import org.bukkit.loot.Lootable;
import org.jetbrains.annotations.NotNull;
@@ -7,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a captured state of a ShulkerBox.
*/
-public interface ShulkerBox extends Container, Lootable, Lidded {
+public interface ShulkerBox extends Container, LootableBlockInventory, Lidded { // Paper
/**
* Get the {@link DyeColor} corresponding to this ShulkerBox
diff --git a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
index 937b99f8734d71b2ad33af142afbc251b81d9745..db69687a7ad4b18d17ab1677cae5d8dd4dcd3678 100644
--- a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
+++ b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
@@ -1,5 +1,6 @@
package org.bukkit.entity.minecart;
+import com.destroystokyo.paper.loottable.LootableEntityInventory;
import org.bukkit.entity.Minecart;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.loot.Lootable;
@@ -7,7 +8,7 @@ import org.bukkit.loot.Lootable;
/**
* Represents a Minecart with a Hopper inside it
*/
-public interface HopperMinecart extends Minecart, InventoryHolder, Lootable {
+public interface HopperMinecart extends Minecart, InventoryHolder, LootableEntityInventory {
/**
* Checks whether or not this Minecart will pick up
diff --git a/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java b/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java
index 9ea403e6fd8e960d017660e0aec118abeda2c42b..238d118f7788b13cd86b7e9ea3a0fc38e2e09715 100644
--- a/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java
+++ b/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java
@@ -1,5 +1,6 @@
package org.bukkit.entity.minecart;
+import com.destroystokyo.paper.loottable.LootableEntityInventory;
import org.bukkit.entity.Minecart;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.loot.Lootable;
@@ -9,5 +10,5 @@ import org.bukkit.loot.Lootable;
* minecarts} have their own inventory that can be accessed using methods
* from the {@link InventoryHolder} interface.
*/
-public interface StorageMinecart extends Minecart, InventoryHolder, Lootable {
+public interface StorageMinecart extends Minecart, InventoryHolder, LootableEntityInventory { // Paper
}
diff --git a/src/main/java/org/bukkit/loot/Lootable.java b/src/main/java/org/bukkit/loot/Lootable.java
index 24a3d989db3bc67e7afe8459a3d4bb132f448ea7..901db852498e0658c79a57582508dab29bf0a798 100644
--- a/src/main/java/org/bukkit/loot/Lootable.java
+++ b/src/main/java/org/bukkit/loot/Lootable.java
@@ -36,6 +36,34 @@ public interface Lootable {
@Nullable
LootTable getLootTable();
+ // Paper start
+ /**
+ * Set the loot table and seed for a container or entity at the same time.
+ *
+ * @param table the Loot Table this {@link org.bukkit.block.Container} or {@link org.bukkit.entity.Mob} will have.
+ * @param seed the seed to used to generate loot. Default is 0.
+ */
+ default void setLootTable(@Nullable LootTable table, long seed) {
+ setLootTable(table);
+ setSeed(seed);
+ }
+
+ /**
+ * Returns whether or not this object has a Loot Table
+ * @return Has a loot table
+ */
+ default boolean hasLootTable() {
+ return getLootTable() != null;
+ }
+
+ /**
+ * Clears the associated Loot Table to this object
+ */
+ default void clearLootTable() {
+ setLootTable(null);
+ }
+ // Paper end
+
/**
* Set the seed used when this Loot Table generates loot.
*
@@ -1,123 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:34 -0700
Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..3b725a489008d333630af166d2be5fc48168a6b9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
@@ -0,0 +1,65 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.apache.commons.lang.Validate;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.LightningStrike;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.bukkit.event.entity.EntityTransformEvent;
+
+import java.util.Collections;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when lightning strikes an entity
+ */
+public class EntityZapEvent extends EntityTransformEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancelled;
+ @NotNull private final LightningStrike bolt;
+
+ public EntityZapEvent(@NotNull final Entity entity, @NotNull final LightningStrike bolt, @NotNull final Entity replacementEntity) {
+ super(entity, Collections.singletonList(replacementEntity), TransformReason.LIGHTNING);
+ Validate.notNull(bolt);
+ Validate.notNull(replacementEntity);
+ this.bolt = bolt;
+ }
+
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ public void setCancelled(boolean cancel) {
+ this.cancelled = cancel;
+ }
+
+ /**
+ * Gets the lightning bolt that is striking the entity.
+ * @return The lightning bolt responsible for this event
+ */
+ @NotNull
+ public LightningStrike getBolt() {
+ return bolt;
+ }
+
+ /**
+ * Gets the entity that will replace the struck entity.
+ * @return The entity that will replace the struck entity
+ */
+ @NotNull
+ public Entity getReplacementEntity() {
+ return getTransformedEntity();
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
index 0e0ed93b568fd2c0d8f6e359c31dc29cb0fa71c2..d3949edfc736b3d67a627ef378748b374769e183 100644
--- a/src/main/java/org/bukkit/event/entity/PigZapEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
@@ -2,6 +2,7 @@ package org.bukkit.event.entity;
import java.util.Collections;
import org.bukkit.entity.Entity;
+import com.destroystokyo.paper.event.entity.EntityZapEvent;
import org.bukkit.entity.LightningStrike;
import org.bukkit.entity.Pig;
import org.bukkit.entity.PigZombie;
@@ -12,14 +13,14 @@ import org.jetbrains.annotations.NotNull;
/**
* Stores data for pigs being zapped
*/
-public class PigZapEvent extends EntityTransformEvent implements Cancellable {
- private static final HandlerList handlers = new HandlerList();
+public class PigZapEvent extends EntityZapEvent implements Cancellable {
+ //private static final HandlerList handlers = new HandlerList();
private boolean canceled;
private final PigZombie pigzombie;
private final LightningStrike bolt;
public PigZapEvent(@NotNull final Pig pig, @NotNull final LightningStrike bolt, @NotNull final PigZombie pigzombie) {
- super(pig, Collections.singletonList((Entity) pigzombie), TransformReason.LIGHTNING);
+ super(pig, bolt, pigzombie);
this.bolt = bolt;
this.pigzombie = pigzombie;
}
@@ -63,6 +64,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
return pigzombie;
}
+ // Paper start
+ /*
@NotNull
@Override
public HandlerList getHandlers() {
@@ -73,4 +76,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
public static HandlerList getHandlerList() {
return handlers;
}
+ */
+ // Paper end
}
@@ -1,108 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Mon, 28 Nov 2016 10:16:39 -0500
Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 945d75525465739dd30610dff985ea0fb0f1c8df..555ef4c187ce0c83cc29af145694ec9c448d452e 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1747,6 +1747,15 @@ public final class Bukkit {
public static void reloadPermissions() {
server.reloadPermissions();
}
+
+ /**
+ * Reload the Command Aliases in commands.yml
+ *
+ * @return Whether the reload was successful
+ */
+ public static boolean reloadCommandAliases() {
+ return server.reloadCommandAliases();
+ }
// Paper end
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index f69c30ebea9c9e9add0b6c97994be0ce64a80ad3..9d81f25e39d345b797f73855a802b186d77f6d12 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1540,4 +1540,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
// Spigot end
void reloadPermissions(); // Paper
+
+ boolean reloadCommandAliases(); // Paper
}
diff --git a/src/main/java/org/bukkit/command/CommandMap.java b/src/main/java/org/bukkit/command/CommandMap.java
index bd2c7a6964722412148fae39e1b4951fc0002b9b..864c263bbd4dd6dd7c37a74b39b1a40a884d0731 100644
--- a/src/main/java/org/bukkit/command/CommandMap.java
+++ b/src/main/java/org/bukkit/command/CommandMap.java
@@ -128,4 +128,14 @@ public interface CommandMap {
*/
@Nullable
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String cmdLine, @Nullable Location location) throws IllegalArgumentException;
+
+ // Paper start - Expose Known Commands
+ /**
+ * Return a Map of known commands
+ *
+ * @return known commands
+ */
+ @NotNull
+ public java.util.Map<String, Command> getKnownCommands();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index adfc7aae2c0f49bbcdd358e83b04a0cf078a7d52..460fda05a62b12db2edcfb7ea8b2a5dd8e4b110d 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -297,4 +297,11 @@ public class SimpleCommandMap implements CommandMap {
}
}
}
+
+ // Paper start - Expose Known Commands
+ @NotNull
+ public Map<String, Command> getKnownCommands() {
+ return knownCommands;
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
index c62da4131b17e66892678e8b618fb9ba3de93b56..0c7ba0718de2b93d013968ca0fec34ffd423990f 100644
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
@@ -13,7 +13,7 @@ public class ReloadCommand extends BukkitCommand {
public ReloadCommand(@NotNull String name) {
super(name);
this.description = "Reloads the server configuration and plugins";
- this.usageMessage = "/reload [permissions]"; // Paper
+ this.usageMessage = "/reload [permissions|commands|confirm]"; // Paper
this.setPermission("bukkit.command.reload");
this.setAliases(Arrays.asList("rl"));
}
@@ -29,6 +29,13 @@ public class ReloadCommand extends BukkitCommand {
Bukkit.getServer().reloadPermissions();
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Permissions successfully reloaded.");
return true;
+ } else if ("commands".equalsIgnoreCase(args[0])) {
+ if (Bukkit.getServer().reloadCommandAliases()) {
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Command aliases successfully reloaded.");
+ } else {
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "An error occurred while trying to reload command aliases.");
+ }
+ return true;
} else if ("confirm".equalsIgnoreCase(args[0])) {
confirmed = true;
} else {
@@ -53,6 +60,6 @@ public class ReloadCommand extends BukkitCommand {
@NotNull
@Override
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException {
- return java.util.Collections.singletonList("permissions"); // Paper
+ return com.google.common.collect.Lists.newArrayList("permissions", "commands"); // Paper
}
}
@@ -1,79 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Fri, 16 Dec 2016 21:25:39 -0600
Subject: [PATCH] Add ProjectileCollideEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..453663893021768ae21d4980ce17ffba55d9e129
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.java
@@ -0,0 +1,67 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.Projectile;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called when an projectile collides with an entity
+ * <p>
+ * This event is called <b>before</b> {@link org.bukkit.event.entity.EntityDamageByEntityEvent}, and cancelling it will allow the projectile to continue flying
+ */
+public class ProjectileCollideEvent extends EntityEvent implements Cancellable {
+ @NotNull private final Entity collidedWith;
+
+ /**
+ * Get the entity the projectile collided with
+ *
+ * @return the entity collided with
+ */
+ @NotNull
+ public Entity getCollidedWith() {
+ return collidedWith;
+ }
+
+ public ProjectileCollideEvent(@NotNull Projectile what, @NotNull Entity collidedWith) {
+ super(what);
+ this.collidedWith = collidedWith;
+ }
+
+ /**
+ * Get the projectile that collided
+ *
+ * @return the projectile that collided
+ */
+ @NotNull
+ public Projectile getEntity() {
+ return (Projectile) super.getEntity();
+ }
+
+ private static final HandlerList handlerList = new HandlerList();
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlerList;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlerList;
+ }
+
+ private boolean cancelled = false;
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ this.cancelled = cancel;
+ }
+}
@@ -1,86 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 20 Dec 2016 15:55:55 -0500
Subject: [PATCH] Add String based Action Bar API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 38f47517d5391696c52d8848c21dee40033458e6..f5d9899ec0788019ba14f15dc0f290abe4b3cfa8 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;
import java.net.InetSocketAddress;
import java.util.UUID;
import com.destroystokyo.paper.Title; // Paper
+import net.kyori.adventure.text.Component;
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -616,6 +617,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendMap(@NotNull MapView map);
// Paper start
+
+ /**
+ * Sends an Action Bar message to the client.
+ *
+ * Use Section symbols for legacy color codes to send formatting.
+ *
+ * @param message The message to send
+ * @deprecated use {@link #sendActionBar(Component)}
+ */
+ @Deprecated
+ public void sendActionBar(@NotNull String message);
+
+ /**
+ * Sends an Action Bar message to the client.
+ *
+ * Use supplied alternative character to the section symbol to represent legacy color codes.
+ *
+ * @param alternateChar Alternate symbol such as '&'
+ * @param message The message to send
+ * @deprecated use {@link #sendActionBar(Component)}
+ */
+ @Deprecated
+ public void sendActionBar(char alternateChar, @NotNull String message);
+
+ /**
+ * Sends an Action Bar message to the client.
+ *
+ * @param message The components to send
+ * @deprecated use {@link #sendActionBar(Component)}
+ */
+ @Deprecated
+ public void sendActionBar(@NotNull net.md_5.bungee.api.chat.BaseComponent... message);
+
/**
* Sends the component to the player
*
@@ -643,9 +677,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
* @param position the screen position
* @param components the components to send
*/
+ @Deprecated
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
spigot().sendMessage(position, components);
}
@@ -1713,6 +1749,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends the component to the specified screen position of this player
*
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
* @param position the screen position
* @param component the components to send
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
@@ -1725,6 +1762,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Sends an array of components as a single message to the specified screen position of this player
*
+ * @deprecated This is unlikely the API you want to use. See {@link #sendActionBar(String)} for a more proper Action Bar API. This deprecated API may send unsafe items to the client.
* @param position the screen position
* @param components the components to send
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
@@ -1,32 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 21 Dec 2016 11:47:25 -0600
Subject: [PATCH] Add API methods to control if armour stands can move
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
index e94ec567fbda93f4f5783f84b4b5136b309d0eab..fddc063798edc8084ca695578a47485204a7f3cd 100644
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
@@ -344,4 +344,21 @@ public interface ArmorStand extends LivingEntity {
*/
ADDING;
}
+ // Paper start
+ /**
+ * Tests if this armor stand can move.
+ *
+ * <p>The default value is {@code true}.</p>
+ *
+ * @return {@code true} if this armour stand can move, {@code false} otherwise
+ */
+ boolean canMove();
+
+ /**
+ * Sets if this armor stand can move.
+ *
+ * @param move {@code true} if this armour stand can move, {@code false} otherwise
+ */
+ void setCanMove(boolean move);
+ // Paper end
}
@@ -1,89 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:19:14 -0500
Subject: [PATCH] IllegalPacketEvent
Fire an event when an illegal packet is received to let plugins handle it
Lets plugins change the kick message and if it should kick or not.
diff --git a/src/main/java/com/destroystokyo/paper/event/player/IllegalPacketEvent.java b/src/main/java/com/destroystokyo/paper/event/player/IllegalPacketEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..8d8e9b16f2a6707d2af7567c7682dfc5db51a737
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/IllegalPacketEvent.java
@@ -0,0 +1,74 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.Bukkit;
+import org.bukkit.entity.Player;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * @deprecated Not used
+ */
+@Deprecated
+public class IllegalPacketEvent extends PlayerEvent {
+ @Nullable private final String type;
+ @Nullable private final String ex;
+ @Nullable private String kickMessage;
+ private boolean shouldKick = true;
+
+ public IllegalPacketEvent(@NotNull Player player, @Nullable String type, @Nullable String kickMessage, @NotNull Exception e) {
+ super(player);
+ this.type = type;
+ this.kickMessage = kickMessage;
+ this.ex = e.getMessage();
+ }
+
+ public boolean isShouldKick() {
+ return shouldKick;
+ }
+
+ public void setShouldKick(boolean shouldKick) {
+ this.shouldKick = shouldKick;
+ }
+
+ @Nullable
+ public String getKickMessage() {
+ return kickMessage;
+ }
+
+ public void setKickMessage(@Nullable String kickMessage) {
+ this.kickMessage = kickMessage;
+ }
+
+ @Nullable
+ public String getType() {
+ return type;
+ }
+
+ @Nullable
+ public String getExceptionMessage() {
+ return ex;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ public static void process(@NotNull Player player, @Nullable String type, @Nullable String kickMessage, @NotNull Exception exception) {
+ IllegalPacketEvent event = new IllegalPacketEvent(player, type, kickMessage, exception);
+ event.callEvent();
+ if (event.shouldKick) {
+ player.kickPlayer(kickMessage);
+ }
+ Bukkit.getLogger().severe(player.getName() + "/" + type + ": " + exception.getMessage());
+ }
+}
@@ -1,28 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 28 Dec 2016 01:18:55 -0500
Subject: [PATCH] Fireworks API's
Get the Entity being boosted
Get the firework launcher
diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java
index 05e86cb9d826cdf14490fa649348d46c51adbfdb..d616d5941b3c7b85e350e845901da798601b9a3c 100644
--- a/src/main/java/org/bukkit/entity/Firework.java
+++ b/src/main/java/org/bukkit/entity/Firework.java
@@ -43,4 +43,15 @@ public interface Firework extends Projectile {
* @param shotAtAngle the new shotAtAngle
*/
void setShotAtAngle(boolean shotAtAngle);
+
+ // Paper start
+ @org.jetbrains.annotations.Nullable
+ public java.util.UUID getSpawningEntity();
+ /**
+ * If this firework is boosting an entity, return it
+ * @return The entity being boosted
+ */
+ @org.jetbrains.annotations.Nullable
+ public LivingEntity getBoostedEntity();
+ // Paper end
}
@@ -1,42 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 31 Dec 2016 20:29:33 -0500
Subject: [PATCH] PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerTeleportEndGatewayEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerTeleportEndGatewayEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..b64ab6eecd8bc4ca9c109b9d83c82861d6260793
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerTeleportEndGatewayEvent.java
@@ -0,0 +1,29 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.Location;
+import org.bukkit.block.EndGateway;
+import org.bukkit.entity.Player;
+import org.bukkit.event.player.PlayerTeleportEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when a teleport is triggered for an End Gateway
+ */
+public class PlayerTeleportEndGatewayEvent extends PlayerTeleportEvent {
+ @NotNull private final EndGateway gateway;
+
+ public PlayerTeleportEndGatewayEvent(@NotNull Player player, @NotNull Location from, @NotNull Location to, @NotNull EndGateway gateway) {
+ super(player, from, to, PlayerTeleportEvent.TeleportCause.END_GATEWAY);
+ this.gateway = gateway;
+ }
+
+ /**
+ * The gateway triggering the teleport
+ *
+ * @return EndGateway used
+ */
+ @NotNull
+ public EndGateway getGateway() {
+ return gateway;
+ }
+}
@@ -1,46 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 15:23:03 -0500
Subject: [PATCH] Provide E/TE/Chunk count stat methods
Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 6b5dbe4ea711807a1944cfe2aae2ce415d4f2638..789e070f6aee83e4b6426def784e05df98e1bc65 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable;
*/
public interface World extends PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
+ // Paper start
+ /**
+ * @return The amount of Entities in this world
+ */
+ int getEntityCount();
+
+ /**
+ * @return The amount of Tile Entities in this world
+ */
+ int getTileEntityCount();
+
+ /**
+ * @return The amount of Tickable Tile Entities in this world
+ */
+ int getTickableTileEntityCount();
+
+ /**
+ * @return The amount of Chunks in this world
+ */
+ int getChunkCount();
+
+ /**
+ * @return The amount of Players in this world
+ */
+ int getPlayerCount();
+ // Paper end
+
/**
* Gets the {@link Block} at the given coordinates
*
@@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 21 Jan 2017 17:03:10 -0600
Subject: [PATCH] Expose WorldBorder#isInBounds(Location) check
diff --git a/src/main/java/org/bukkit/WorldBorder.java b/src/main/java/org/bukkit/WorldBorder.java
index 7e8f5649ce0eb0090899514b1e228601eb644613..afb7b136b461202026290624836446cff9f9e45d 100644
--- a/src/main/java/org/bukkit/WorldBorder.java
+++ b/src/main/java/org/bukkit/WorldBorder.java
@@ -117,4 +117,18 @@ public interface WorldBorder {
* @return if this location is inside the border or not
*/
public boolean isInside(@NotNull Location location);
+
+ // Paper start
+ /**
+ * Checks if the location is within the boundaries of this border.
+ *
+ * @param location specific location to check
+ * @return true if the location is within the bounds of this border, false otherwise.
+ * @deprecated use {@link #isInside(Location)} for an upstream compatible replacement
+ */
+ @Deprecated
+ public default boolean isInBounds(@NotNull Location location) {
+ return this.isInside(location);
+ }
+ // Paper end
}
@@ -1,60 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Fri, 9 Jun 2017 07:24:24 -0700
Subject: [PATCH] Add configuration option to prevent player names from being
suggested
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 555ef4c187ce0c83cc29af145694ec9c448d452e..2527e896a4409326ea2612723b829696d44fc199 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1756,6 +1756,16 @@ public final class Bukkit {
public static boolean reloadCommandAliases() {
return server.reloadCommandAliases();
}
+
+ /**
+ * Checks if player names should be suggested when a command returns {@code null} as
+ * their tab completion result.
+ *
+ * @return true if player names should be suggested
+ */
+ public static boolean suggestPlayerNamesWhenNullTabCompletions() {
+ return server.suggestPlayerNamesWhenNullTabCompletions();
+ }
// Paper end
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9d81f25e39d345b797f73855a802b186d77f6d12..7d94242b2f8ecb537b3140f9d6f706d3e266c456 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1542,4 +1542,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
void reloadPermissions(); // Paper
boolean reloadCommandAliases(); // Paper
+
+ // Paper start - allow preventing player name suggestions by default
+ /**
+ * Checks if player names should be suggested when a command returns {@code null} as
+ * their tab completion result.
+ *
+ * @return true if player names should be suggested
+ */
+ boolean suggestPlayerNamesWhenNullTabCompletions();
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 03bdc1622791e1206406c87065978688d602e39e..7c80dc54776d0d66f7816b77136f6dbd9b801704 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -99,7 +99,7 @@ public abstract class Command {
Validate.notNull(args, "Arguments cannot be null");
Validate.notNull(alias, "Alias cannot be null");
- if (args.length == 0) {
+ if (args.length == 0 || !sender.getServer().suggestPlayerNamesWhenNullTabCompletions()) { // Paper - allow preventing player name suggestions by default) {
return ImmutableList.of();
}
@@ -1,46 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 3f68baef538098d9ce66b91195b6fa17f26f0d78..e71b048e53ee2db4e768eea2ddf19b00a14d2484 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -634,7 +634,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* Use supplied alternative character to the section symbol to represent legacy color codes.
*
- * @param alternateChar Alternate symbol such as '&'
+ * @param alternateChar Alternate symbol such as '&amp;'
* @param message The message to send
* @deprecated use {@link #sendActionBar(Component)}
*/
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
*
* @return Location the player moved to
*/
- @Nullable
+ @NotNull // Paper
public Location getTo() {
return to;
}
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 91afd844dafec4ed9ab9e2e16b220ffbd35e7495..1e45c9078ffffe9d3c25538fdd433780ae751270 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory {
*
* @return the ItemStack in the given slot
*/
- @NotNull
+ @Nullable
public ItemStack getItem(@NotNull EquipmentSlot slot);
/**
@@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 5 May 2017 03:57:08 -0500
Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
index 3f2736fbddd8661e764bc2f8d0499bd13ca91df5..c404a5b8efea7c780db5ddae19456753808abb3d 100644
--- a/src/main/java/org/bukkit/entity/Item.java
+++ b/src/main/java/org/bukkit/entity/Item.java
@@ -75,4 +75,20 @@ public interface Item extends Entity {
*/
@Nullable
public UUID getThrower();
+
+ // Paper Start
+ /**
+ * Gets if non-player entities can pick this Item up
+ *
+ * @return True if non-player entities can pickup
+ */
+ public boolean canMobPickup();
+
+ /**
+ * Sets if non-player entities can pick this Item up
+ *
+ * @param canMobPickup True to allow non-player entity pickup
+ */
+ public void setCanMobPickup(boolean canMobPickup);
+ // Paper end
}
@@ -1,54 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 May 2017 06:26:01 -0500
Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
index 951ea2cc763973655beedcba3c75332d3f297313..18d82c111f30e0279c10a174a51bac018185cd38 100644
--- a/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java
@@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull;
public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final Item item;
+ private boolean flyAtPlayer = true; // Paper
private boolean cancel = false;
private final int remaining;
@@ -45,6 +46,27 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
return remaining;
}
+ // Paper Start
+ /**
+ * Set if the item will fly at the player
+ * <p>Cancelling the event will set this value to false.</p>
+ *
+ * @param flyAtPlayer True for item to fly at player
+ */
+ public void setFlyAtPlayer(boolean flyAtPlayer) {
+ this.flyAtPlayer = flyAtPlayer;
+ }
+
+ /**
+ * Gets if the item will fly at the player
+ *
+ * @return True if the item will fly at the player
+ */
+ public boolean getFlyAtPlayer() {
+ return flyAtPlayer;
+ }
+ // Paper End
+
@Override
public boolean isCancelled() {
return cancel;
@@ -53,6 +75,7 @@ public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
@Override
public void setCancelled(boolean cancel) {
this.cancel = cancel;
+ this.flyAtPlayer = !cancel; // Paper
}
@NotNull
@@ -1,102 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 11 Jun 2017 16:30:37 -0500
Subject: [PATCH] PlayerAttemptPickupItemEvent
diff --git a/src/main/java/org/bukkit/event/player/PlayerAttemptPickupItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerAttemptPickupItemEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..0788153a9641e75da565d2e6eee37eeee1cbc61e
--- /dev/null
+++ b/src/main/java/org/bukkit/event/player/PlayerAttemptPickupItemEvent.java
@@ -0,0 +1,90 @@
+package org.bukkit.event.player;
+
+import org.bukkit.entity.Item;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Thrown when a player attempts to pick an item up from the ground
+ */
+public class PlayerAttemptPickupItemEvent extends PlayerEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ @NotNull private final Item item;
+ private final int remaining;
+ private boolean flyAtPlayer = true;
+ private boolean isCancelled = false;
+
+ @Deprecated // Remove in 1.13 // Remove in 1.14?
+ public PlayerAttemptPickupItemEvent(@NotNull final Player player, @NotNull final Item item) {
+ this(player, item, 0);
+ }
+
+ public PlayerAttemptPickupItemEvent(@NotNull final Player player, @NotNull final Item item, final int remaining) {
+ super(player);
+ this.item = item;
+ this.remaining = remaining;
+ }
+
+ /**
+ * Gets the Item attempted by the player.
+ *
+ * @return Item
+ */
+ @NotNull
+ public Item getItem() {
+ return item;
+ }
+
+ /**
+ * Gets the amount that will remain on the ground, if any
+ *
+ * @return amount that will remain on the ground
+ */
+ public int getRemaining() {
+ return remaining;
+ }
+
+ /**
+ * Set if the item will fly at the player
+ * <p>Cancelling the event will set this value to false.</p>
+ *
+ * @param flyAtPlayer True for item to fly at player
+ */
+ public void setFlyAtPlayer(boolean flyAtPlayer) {
+ this.flyAtPlayer = flyAtPlayer;
+ }
+
+ /**
+ * Gets if the item will fly at the player
+ *
+ * @return True if the item will fly at the player
+ */
+ public boolean getFlyAtPlayer() {
+ return this.flyAtPlayer;
+ }
+
+
+ @Override
+ public boolean isCancelled() {
+ return this.isCancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ this.isCancelled = cancel;
+ this.flyAtPlayer = !cancel;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,126 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Sweepyoface <github@sweepy.pw>
Date: Sat, 17 Jun 2017 18:48:06 -0400
Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..d5632d352590dec6982a372b285a8d4a332fa589
--- /dev/null
+++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
@@ -0,0 +1,114 @@
+package org.bukkit.event.command;
+
+import net.kyori.adventure.text.Component;
+import org.bukkit.Bukkit;
+import org.bukkit.command.CommandSender;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.Event;
+
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Thrown when a player executes a command that is not defined
+ */
+public class UnknownCommandEvent extends Event {
+ private static final HandlerList handlers = new HandlerList();
+ @NotNull private CommandSender sender;
+ @NotNull private String commandLine;
+ @Nullable private Component message;
+
+ @Deprecated
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) {
+ this(sender, commandLine, message == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message));
+ }
+
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final Component message) {
+ super(false);
+ this.sender = sender;
+ this.commandLine = commandLine;
+ this.message = message;
+ }
+
+ /**
+ * Gets the CommandSender or ConsoleCommandSender
+ * <p>
+ *
+ * @return Sender of the command
+ */
+ @NotNull
+ public CommandSender getSender() {
+ return sender;
+ }
+
+ /**
+ * Gets the command that was send
+ * <p>
+ *
+ * @return Command sent
+ */
+ @NotNull
+ public String getCommandLine() {
+ return commandLine;
+ }
+
+ /**
+ * Gets message that will be returned
+ * <p>
+ *
+ * @return Unknown command message
+ * @deprecated use {@link #message()}
+ */
+ @Nullable
+ @Deprecated
+ public String getMessage() {
+ return this.message == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message);
+ }
+
+ /**
+ * Sets message that will be returned
+ * <p>
+ * Set to null to avoid any message being sent
+ *
+ * @param message the message to be returned, or null
+ * @deprecated use {@link #message(Component)}
+ */
+ @Deprecated
+ public void setMessage(@Nullable String message) {
+ this.message(message == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message));
+ }
+
+ /**
+ * Gets message that will be returned
+ * <p>
+ *
+ * @return Unknown command message
+ */
+ @Nullable
+ public Component message() {
+ return this.message;
+ }
+
+ /**
+ * Sets message that will be returned
+ * <p>
+ * Set to null to avoid any message being sent
+ *
+ * @param message the message to be returned, or null
+ */
+ public void message(@Nullable Component message) {
+ this.message = message;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
+
@@ -1,351 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 15 Jan 2018 21:46:46 -0500
Subject: [PATCH] Basic PlayerProfile API
Provides basic elements of a PlayerProfile to be used by future API/events
diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
new file mode 100644
index 0000000000000000000000000000000000000000..2ef9a7bd55e2c9cf8cb20d5f77282676ae11181f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
@@ -0,0 +1,177 @@
+package com.destroystokyo.paper.profile;
+
+import java.util.Collection;
+import java.util.Set;
+import java.util.UUID;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Represents a players profile for the game, such as UUID, Name, and textures.
+ */
+public interface PlayerProfile {
+
+ /**
+ * @return The players name, if set
+ */
+ @Nullable
+ String getName();
+
+ /**
+ * Sets this profiles Name
+ *
+ * @param name The new Name
+ * @return The previous Name
+ */
+ @NotNull
+ String setName(@Nullable String name);
+
+ /**
+ * @return The players unique identifier, if set
+ */
+ @Nullable UUID getId();
+
+ /**
+ * Sets this profiles UUID
+ *
+ * @param uuid The new UUID
+ * @return The previous UUID
+ */
+ @Nullable
+ UUID setId(@Nullable UUID uuid);
+
+ /**
+ * @return A Mutable set of this players properties, such as textures.
+ * Values specified here are subject to implementation details.
+ */
+ @NotNull Set<ProfileProperty> getProperties();
+
+ /**
+ * Check if the Profile has the specified property
+ * @param property Property name to check
+ * @return If the property is set
+ */
+ boolean hasProperty(@Nullable String property);
+
+ /**
+ * Sets a property. If the property already exists, the previous one will be replaced
+ * @param property Property to set.
+ */
+ void setProperty(@NotNull ProfileProperty property);
+
+ /**
+ * Sets multiple properties. If any of the set properties already exist, it will be replaced
+ * @param properties The properties to set
+ */
+ void setProperties(@NotNull Collection<ProfileProperty> properties);
+
+ /**
+ * Removes a specific property from this profile
+ * @param property The property to remove
+ * @return If a property was removed
+ */
+ boolean removeProperty(@Nullable String property);
+
+ /**
+ * Removes a specific property from this profile
+ * @param property The property to remove
+ * @return If a property was removed
+ */
+ default boolean removeProperty(@NotNull ProfileProperty property) {
+ return removeProperty(property.getName());
+ }
+
+ /**
+ * Removes all properties in the collection
+ * @param properties The properties to remove
+ * @return If any property was removed
+ */
+ default boolean removeProperties(@NotNull Collection<ProfileProperty> properties) {
+ boolean removed = false;
+ for (ProfileProperty property : properties) {
+ if (removeProperty(property)) {
+ removed = true;
+ }
+ }
+ return removed;
+ }
+
+ /**
+ * Clears all properties on this profile
+ */
+ void clearProperties();
+
+ /**
+ * @return If the profile is now complete (has UUID and Name)
+ */
+ boolean isComplete();
+
+ /**
+ * Like {@link #complete(boolean)} but will try only from cache, and not make network calls
+ * Does not account for textures.
+ *
+ * @return If the profile is now complete (has UUID and Name)
+ */
+ boolean completeFromCache();
+
+ /**
+ * Like {@link #complete(boolean)} but will try only from cache, and not make network calls
+ * Does not account for textures.
+ *
+ * @param onlineMode Treat this as online mode or not
+ * @return If the profile is now complete (has UUID and Name)
+ */
+ boolean completeFromCache(boolean onlineMode);
+
+ /**
+ * Like {@link #complete(boolean)} but will try only from cache, and not make network calls
+ * Does not account for textures.
+ *
+ * @param lookupUUID If only name is supplied, should we do a UUID lookup
+ * @param onlineMode Treat this as online mode or not
+ * @return If the profile is now complete (has UUID and Name)
+ */
+ boolean completeFromCache(boolean lookupUUID, boolean onlineMode);
+
+ /**
+ * If this profile is not complete, then make the API call to complete it.
+ * This is a blocking operation and should be done asynchronously.
+ *
+ * This will also complete textures. If you do not want to load textures, use {{@link #complete(boolean)}}
+ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail)
+ */
+ default boolean complete() {
+ return complete(true);
+ }
+
+ /**
+ * If this profile is not complete, then make the API call to complete it.
+ * This is a blocking operation and should be done asynchronously.
+ *
+ * Optionally will also fill textures.
+ *
+ * Online mode will be automatically determined
+ * @param textures controls if we should fill the profile with texture properties
+ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail)
+ */
+ boolean complete(boolean textures);
+
+ /**
+ * If this profile is not complete, then make the API call to complete it.
+ * This is a blocking operation and should be done asynchronously.
+ *
+ * Optionally will also fill textures.
+ * @param textures controls if we should fill the profile with texture properties
+ * @param onlineMode Treat this server as online mode or not
+ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail)
+ */
+ boolean complete(boolean textures, boolean onlineMode);
+
+ /**
+ * Whether or not this Profile has textures associated to it
+ * @return If has a textures property
+ */
+ default boolean hasTextures() {
+ return hasProperty("textures");
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java
new file mode 100644
index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6b0e0faee
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java
@@ -0,0 +1,72 @@
+package com.destroystokyo.paper.profile;
+
+import com.google.common.base.Preconditions;
+
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Represents a property on a {@link PlayerProfile}
+ */
+public class ProfileProperty {
+ private final String name;
+ private final String value;
+ private final String signature;
+
+ public ProfileProperty(@NotNull String name, @NotNull String value) {
+ this(name, value, null);
+ }
+
+ public ProfileProperty(@NotNull String name, @NotNull String value, @Nullable String signature) {
+ this.name = Preconditions.checkNotNull(name, "ProfileProperty name can not be null");
+ this.value = Preconditions.checkNotNull(value, "ProfileProperty value can not be null");
+ this.signature = signature;
+ }
+
+ /**
+ * @return The property name, ie "textures"
+ */
+ @NotNull
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return The property value, likely to be base64 encoded
+ */
+ @NotNull
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @return A signature from Mojang for signed properties
+ */
+ @Nullable
+ public String getSignature() {
+ return signature;
+ }
+
+ /**
+ * @return If this property has a signature or not
+ */
+ public boolean isSigned() {
+ return this.signature != null;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ ProfileProperty that = (ProfileProperty) o;
+ return Objects.equals(name, that.name) &&
+ Objects.equals(value, that.value) &&
+ Objects.equals(signature, that.signature);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name);
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 2527e896a4409326ea2612723b829696d44fc199..f5d3a7370390871d1b6075f32846d1a942b05b7f 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1766,6 +1766,40 @@ public final class Bukkit {
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
return server.suggestPlayerNamesWhenNullTabCompletions();
}
+
+ /**
+ * Creates a PlayerProfile for the specified uuid, with name as null
+ * @param uuid UUID to create profile for
+ * @return A PlayerProfile object
+ */
+ @NotNull
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull UUID uuid) {
+ return server.createProfile(uuid);
+ }
+
+ /**
+ * Creates a PlayerProfile for the specified name, with UUID as null
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ */
+ @NotNull
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull String name) {
+ return server.createProfile(name);
+ }
+
+ /**
+ * Creates a PlayerProfile for the specified name/uuid
+ *
+ * Both UUID and Name can not be null at same time. One must be supplied.
+ *
+ * @param uuid UUID to create profile for
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ */
+ @NotNull
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) {
+ return server.createProfile(uuid, name);
+ }
// Paper end
@NotNull
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 7d94242b2f8ecb537b3140f9d6f706d3e266c456..38d138b217734e598581ed14065ff2015135ee9a 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1551,5 +1551,33 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return true if player names should be suggested
*/
boolean suggestPlayerNamesWhenNullTabCompletions();
+
+ /**
+ * Creates a PlayerProfile for the specified uuid, with name as null
+ * @param uuid UUID to create profile for
+ * @return A PlayerProfile object
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull UUID uuid);
+
+ /**
+ * Creates a PlayerProfile for the specified name, with UUID as null
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull String name);
+
+ /**
+ * Creates a PlayerProfile for the specified name/uuid
+ *
+ * Both UUID and Name can not be null at same time. One must be supplied.
+ *
+ * @param uuid UUID to create profile for
+ * @param name Name to create profile for
+ * @return A PlayerProfile object
+ */
+ @NotNull
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name);
// Paper end
}
@@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 17 Jun 2017 15:04:51 -0400
Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
index 72178c3036f567ceaf15016978a9737eb9c4afc4..d212d5123b6294f7873d72f125505a006c290b05 100644
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
@@ -300,6 +300,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
*/
public int getExpToLevel();
+ // Paper start
+ /**
+ * If there is an Entity on this entities left shoulder, it will be released to the world and returned.
+ * If no Entity is released, null will be returned.
+ *
+ * @return The released entity, or null
+ */
+ @Nullable
+ public Entity releaseLeftShoulderEntity();
+
+ /**
+ * If there is an Entity on this entities left shoulder, it will be released to the world and returned.
+ * If no Entity is released, null will be returned.
+ *
+ * @return The released entity, or null
+ */
+ @Nullable
+ public Entity releaseRightShoulderEntity();
+ // Paper end
+
/**
* Gets the current cooldown for a player's attack.
*
@@ -1,174 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 17 Jun 2017 16:30:44 -0400
Subject: [PATCH] Profile Lookup Events
Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in profile data, and cache the responses from
profiles that had to be looked up.
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..8df37c07cd55ddf110d1dd68183d7b697f7a6756
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java
@@ -0,0 +1,46 @@
+package com.destroystokyo.paper.event.profile;
+
+import com.destroystokyo.paper.profile.PlayerProfile;
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Allows a plugin to be notified anytime AFTER a Profile has been looked up from the Mojang API
+ * This is an opportunity to view the response and potentially cache things.
+ *
+ * No guarantees are made about thread execution context for this event. If you need to know, check
+ * event.isAsync()
+ */
+public class LookupProfileEvent extends Event {
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull private final PlayerProfile profile;
+
+ public LookupProfileEvent(@NotNull PlayerProfile profile) {
+ super(!Bukkit.isPrimaryThread());
+ this.profile = profile;
+ }
+
+ /**
+ * @return The profile that was recently looked up. This profile can be mutated
+ */
+ @NotNull
+ public PlayerProfile getPlayerProfile() {
+ return profile;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..4dcf6242c9acc62d030a94f67b78729ed29f8c85
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java
@@ -0,0 +1,108 @@
+package com.destroystokyo.paper.event.profile;
+
+import com.destroystokyo.paper.profile.PlayerProfile;
+import com.destroystokyo.paper.profile.ProfileProperty;
+import com.google.common.collect.ArrayListMultimap;
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Allows a plugin to intercept a Profile Lookup for a Profile by name
+ *
+ * At the point of event fire, the UUID and properties are unset.
+ *
+ * If a plugin sets the UUID, and optionally the properties, the API call to look up the profile may be skipped.
+ *
+ * No guarantees are made about thread execution context for this event. If you need to know, check
+ * event.isAsync()
+ */
+public class PreLookupProfileEvent extends Event {
+
+ private static final HandlerList handlers = new HandlerList();
+ @NotNull private final String name;
+ private UUID uuid;
+ @NotNull private Set<ProfileProperty> properties = new HashSet<>();
+
+ public PreLookupProfileEvent(@NotNull String name) {
+ super(!Bukkit.isPrimaryThread());
+ this.name = name;
+ }
+
+ /**
+ * @return Name of the profile
+ */
+ @NotNull
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * If this value is left null by the completion of the event call, then the server will
+ * trigger a call to the Mojang API to look up the UUID (Network Request), and subsequently, fire a
+ * {@link LookupProfileEvent}
+ *
+ * @return The UUID of the profile if it has already been provided by a plugin
+ */
+ @Nullable
+ public UUID getUUID() {
+ return uuid;
+ }
+
+ /**
+ * Sets the UUID for this player name. This will skip the initial API call to find the players UUID.
+ *
+ * However, if Profile Properties are needed by the server, you must also set them or else an API call might still be made.
+ *
+ * @param uuid the UUID to set for the profile or null to reset
+ */
+ public void setUUID(@Nullable UUID uuid) {
+ this.uuid = uuid;
+ }
+
+ /**
+ * @return The currently pending prepopulated properties.
+ * Any property in this Set will be automatically prefilled on this Profile
+ */
+ @NotNull
+ public Set<ProfileProperty> getProfileProperties() {
+ return this.properties;
+ }
+
+ /**
+ * Clears any existing prepopulated properties and uses the supplied properties
+ * Any property in this Set will be automatically prefilled on this Profile
+ * @param properties The properties to add
+ */
+ public void setProfileProperties(@NotNull Set<ProfileProperty> properties) {
+ this.properties = new HashSet<>();
+ this.properties.addAll(properties);
+ }
+
+ /**
+ * Adds any properties currently missing to the prepopulated properties set, replacing any that already were set.
+ * Any property in this Set will be automatically prefilled on this Profile
+ * @param properties The properties to add
+ */
+ public void addProfileProperties(@NotNull Set<ProfileProperty> properties) {
+ this.properties.addAll(properties);
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+}
@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 18 Jun 2017 18:17:05 -0500
Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index e9d0d507b47b0347b975b1a83f5ae70dca5587b8..feb9507a972bf797144a01adeeaac83ec2bd165a 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -619,5 +619,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
@Nullable
Location getOrigin();
+
+ /**
+ * Returns whether this entity was spawned from a mob spawner.
+ *
+ * @return True if entity spawned from a mob spawner
+ */
+ boolean fromMobSpawner();
// Paper end
}
@@ -1,62 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] ensureServerConversions API
This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 3dba4c361993e143e511b4f108ac0b444a84d964..30ab5d38197bccfc06f6f5554b162f8bdbfe2a45 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -151,5 +151,17 @@ public interface ItemFactory {
*/
@NotNull
net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull ItemStack item, final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op);
+
+ /**
+ * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks.
+ *
+ * Use this method to to ensure any desired data conversions are processed.
+ * The input itemstack will not be the same as the returned itemstack.
+ *
+ * @param item The item to process conversions on
+ * @return A potentially Data Converted ItemStack
+ */
+ @NotNull
+ ItemStack ensureServerConversions(@NotNull ItemStack item);
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 4b20b557eaa958cf1ad1baf8d6cc17f38b180ff1..c31f667c466ba80bd88ae560d14dbd18a84118b4 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
}
}
- return result;
+ return result.ensureServerConversions(); // Paper
}
/**
@@ -602,5 +602,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
public net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowItem> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowItem> op) {
return org.bukkit.Bukkit.getServer().getItemFactory().asHoverEvent(this, op);
}
+
+ /**
+ * Minecart updates are converting simple item stacks into more complex NBT oriented Item Stacks.
+ *
+ * Use this method to to ensure any desired data conversions are processed.
+ * The input itemstack will not be the same as the returned itemstack.
+ *
+ * @return A potentially Data Converted ItemStack
+ */
+ @NotNull
+ public ItemStack ensureServerConversions() {
+ return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
+ }
// Paper end
}
@@ -1,52 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:55:48 -0400
Subject: [PATCH] Add getI18NDisplayName API
Gets the Display name as seen in the Client.
Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 30ab5d38197bccfc06f6f5554b162f8bdbfe2a45..3578f491a053154789ad696e93c70fdde74912e6 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -163,5 +163,16 @@ public interface ItemFactory {
*/
@NotNull
ItemStack ensureServerConversions(@NotNull ItemStack item);
+
+ /**
+ * Gets the Display name as seen in the Client.
+ * Currently the server only supports the English language. To override this,
+ * You must replace the language file embedded in the server jar.
+ *
+ * @param item Item to return Display name of
+ * @return Display name of Item
+ */
+ @Nullable
+ String getI18NDisplayName(@Nullable ItemStack item);
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index c31f667c466ba80bd88ae560d14dbd18a84118b4..77d6b2ed68d8ce30b5cadb156941d2d1f7dcf5b1 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -615,5 +615,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
public ItemStack ensureServerConversions() {
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
}
+
+ /**
+ * Gets the Display name as seen in the Client.
+ * Currently the server only supports the English language. To override this,
+ * You must replace the language file embedded in the server jar.
+ *
+ * @return Display name of Item
+ */
+ @Nullable
+ public String getI18NDisplayName() {
+ return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
+ }
// Paper end
}
@@ -1,157 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 3 Jul 2017 18:11:34 -0500
Subject: [PATCH] ProfileWhitelistVerifyEvent
Fires when the server is validating if a player is whitelisted.
Allows you to do dynamic whitelisting and change of kick message
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..8a259ab49ea79673b6da9e4e2aaecec67469994e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2017 - Daniel Ennis (Aikar) - MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.event.profile;
+
+import com.destroystokyo.paper.profile.PlayerProfile;
+import net.kyori.adventure.text.Component;
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Fires when the server needs to verify if a player is whitelisted.
+ *
+ * Plugins may override/control the servers whitelist with this event,
+ * and dynamically change the kick message.
+ */
+public class ProfileWhitelistVerifyEvent extends Event {
+ private static final HandlerList handlers = new HandlerList();
+ @NotNull private final PlayerProfile profile;
+ private final boolean whitelistEnabled;
+ private boolean whitelisted;
+ private final boolean isOp;
+ @Nullable private Component kickMessage;
+
+ @Deprecated
+ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable String kickMessage) {
+ this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(kickMessage));
+ }
+
+ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable Component kickMessage) {
+ this.profile = profile;
+ this.whitelistEnabled = whitelistEnabled;
+ this.whitelisted = whitelisted;
+ this.isOp = isOp;
+ this.kickMessage = kickMessage;
+ }
+
+ /**
+ * @return the currently planned message to send to the user if they are not whitelisted
+ * @deprecated use {@link #kickMessage()}
+ */
+ @Deprecated
+ @Nullable
+ public String getKickMessage() {
+ return this.kickMessage == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().serialize(kickMessage);
+ }
+
+ /**
+ * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default
+ * @deprecated Use {@link #kickMessage(Component)}
+ */
+ @Deprecated
+ public void setKickMessage(@Nullable String kickMessage) {
+ this.kickMessage(kickMessage == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(kickMessage));
+ }
+
+ /**
+ * @return the currently planned message to send to the user if they are not whitelisted
+ */
+ @Nullable
+ public Component kickMessage() {
+ return this.kickMessage;
+ }
+
+ /**
+ * @param kickMessage The message to send to the player on kick if not whitelisted. May set to null to use the server configured default
+ */
+ public void kickMessage(@Nullable Component kickMessage) {
+ this.kickMessage = kickMessage;
+ }
+
+ /**
+ * @return The profile of the player trying to connect
+ */
+ @NotNull
+ public PlayerProfile getPlayerProfile() {
+ return profile;
+ }
+
+ /**
+ * @return Whether the player is whitelisted to play on this server (whitelist may be off is why its true)
+ */
+ public boolean isWhitelisted() {
+ return whitelisted;
+ }
+
+ /**
+ * Changes the players whitelisted state. false will deny the login
+ * @param whitelisted The new whitelisted state
+ */
+ public void setWhitelisted(boolean whitelisted) {
+ this.whitelisted = whitelisted;
+ }
+
+ /**
+ * @return if the player obtained whitelist status by having op
+ */
+ public boolean isOp() {
+ return isOp;
+ }
+
+ /**
+ * @return if the server even has whitelist on
+ */
+ public boolean isWhitelistEnabled() {
+ return whitelistEnabled;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,56 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 02:08:55 -0500
Subject: [PATCH] Make /plugins list alphabetical
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..4de959bbd1270d7d6ea8e5e69521bcca6abe2138 100644
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
@@ -3,6 +3,9 @@ package org.bukkit.command.defaults;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@@ -34,15 +37,22 @@ public class PluginsCommand extends BukkitCommand {
@NotNull
private String getPluginList() {
- StringBuilder pluginList = new StringBuilder();
- Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
+ // Paper start
+ TreeMap<String, Plugin> plugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
+ plugins.put(plugin.getDescription().getName(), plugin);
+ }
- for (Plugin plugin : plugins) {
+ StringBuilder pluginList = new StringBuilder();
+ for (Map.Entry<String, Plugin> entry : plugins.entrySet()) {
if (pluginList.length() > 0) {
pluginList.append(ChatColor.WHITE);
pluginList.append(", ");
}
+ Plugin plugin = entry.getValue();
+
pluginList.append(plugin.isEnabled() ? ChatColor.GREEN : ChatColor.RED);
pluginList.append(plugin.getDescription().getName());
@@ -51,6 +61,8 @@ public class PluginsCommand extends BukkitCommand {
}
}
- return "(" + plugins.length + "): " + pluginList.toString();
+ return "(" + plugins.size() + "): " + pluginList.toString();
+ // Paper end
}
+
}
@@ -1,41 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:14:13 +0200
Subject: [PATCH] Handle plugin prefixes in implementation logging
configuration
Currently, plugin prefixes are prepended to the log message in
the PluginLogger before passing the message to the underlying
logging framework. This is bad design because they need to be
stripped manually when using custom appenders to log messages
in a different format.
Additionally, it makes integration of alternative logging APIs hard
because all logging must go through the PluginLogger. Avoid using
PluginLogger and create a regular logger using the plugin name.
The implementation should handle plugin prefixes by displaying
logger names when appropriate.
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
index 2231900549607a0917dd04e8b433c027b846cef9..bb2e55e97bf887a28cac7d4f9a0a23960d22cf56 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
@@ -42,7 +42,7 @@ public abstract class JavaPlugin extends PluginBase {
private boolean naggable = true;
private FileConfiguration newConfig = null;
private File configFile = null;
- private PluginLogger logger = null;
+ private Logger logger = null; // Paper - PluginLogger -> Logger
public JavaPlugin() {
final ClassLoader classLoader = this.getClass().getClassLoader();
@@ -276,7 +276,8 @@ public abstract class JavaPlugin extends PluginBase {
this.dataFolder = dataFolder;
this.classLoader = classLoader;
this.configFile = new File(dataFolder, "config.yml");
- this.logger = new PluginLogger(this);
+ // Paper - Handle plugin prefix in implementation
+ this.logger = Logger.getLogger(description.getPrefix() != null ? description.getPrefix() : description.getName());
}
/**
@@ -1,51 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 16:33:12 +0200
Subject: [PATCH] Allow plugins to use SLF4J for logging
SLF4J is a commonly used abstraction for various logging frameworks
such as java.util.logging (JUL) or Log4j. Currently, plugins are
required to do all their logging using the provided JUL logger.
This is annoying for plugins that target multiple platforms or when
using libraries that log messages using SLF4J.
Expose SLF4J as optional logging API for plugins, so they can use
it without having to shade it in the plugin and going through
several layers of logging abstraction.
diff --git a/pom.xml b/pom.xml
index 89918b5af7fbf42357e96dffb00b8a011a8ef13c..e1d1635889d68d1e17dc66f3a65545b44deffa69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,6 +124,13 @@
<version>20.1.0</version>
<scope>provided</scope>
</dependency>
+ <!-- Paper - Add SLF4J -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.25</version>
+ <scope>compile</scope>
+ </dependency>
<!-- testing -->
<dependency>
<groupId>junit</groupId>
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
index febfec6efafd76bb59b4b43aa223af16f73339b4..79890c68f1ad31f951dfdbd9a16dac500ec58c40 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -166,6 +166,13 @@ public interface Plugin extends TabExecutor {
@NotNull
public Logger getLogger();
+ // Paper start - Add SLF4J logger
+ @NotNull
+ default org.slf4j.Logger getSLF4JLogger() {
+ return org.slf4j.LoggerFactory.getLogger(getLogger().getName());
+ }
+ // Paper end
+
/**
* Returns the name of the plugin.
* <p>
@@ -1,117 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Thu, 21 Sep 2017 19:41:20 +0200
Subject: [PATCH] Add workaround for plugins modifying the parent of the plugin
logger
Essentials uses a custom logger name ("Essentials") instead of the
plugin logger. Log messages are redirected to the plugin logger by
setting the parent of the "Essentials" logger to the plugin logger.
With our changes, the plugin logger is now also called "Essentials",
resulting in an infinite loop. Make sure plugins can't change the
parent of the plugin logger to avoid this.
diff --git a/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java b/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java
new file mode 100644
index 0000000000000000000000000000000000000000..76f2cb9cd99cad2a9484eab2becd8c36f1dd91b3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/utils/PaperPluginLogger.java
@@ -0,0 +1,41 @@
+package com.destroystokyo.paper.utils;
+
+import org.bukkit.plugin.PluginDescriptionFile;
+
+import java.util.logging.Level;
+import java.util.logging.LogManager;
+import java.util.logging.Logger;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Prevents plugins (e.g. Essentials) from changing the parent of the plugin logger.
+ */
+public class PaperPluginLogger extends Logger {
+
+ @NotNull
+ public static Logger getLogger(@NotNull PluginDescriptionFile description) {
+ Logger logger = new PaperPluginLogger(description);
+ if (!LogManager.getLogManager().addLogger(logger)) {
+ // Disable this if it's going to happen across reloads anyways...
+ //logger.log(Level.WARNING, "Could not insert plugin logger - one was already found: {}", LogManager.getLogManager().getLogger(this.getName()));
+ logger = LogManager.getLogManager().getLogger(description.getPrefix() != null ? description.getPrefix() : description.getName());
+ }
+
+ return logger;
+ }
+
+ private PaperPluginLogger(@NotNull PluginDescriptionFile description) {
+ super(description.getPrefix() != null ? description.getPrefix() : description.getName(), null);
+ }
+
+ @Override
+ public void setParent(@NotNull Logger parent) {
+ if (getParent() != null) {
+ warning("Ignoring attempt to change parent of plugin logger");
+ } else {
+ this.log(Level.FINE, "Setting plugin logger parent to {0}", parent);
+ super.setParent(parent);
+ }
+ }
+
+}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
index bb2e55e97bf887a28cac7d4f9a0a23960d22cf56..04fa3991f6ce4e9dad804f28fc6c947695857089 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
@@ -42,7 +42,7 @@ public abstract class JavaPlugin extends PluginBase {
private boolean naggable = true;
private FileConfiguration newConfig = null;
private File configFile = null;
- private Logger logger = null; // Paper - PluginLogger -> Logger
+ Logger logger = null; // Paper - PluginLogger -> Logger, package-private
public JavaPlugin() {
final ClassLoader classLoader = this.getClass().getClassLoader();
@@ -276,8 +276,11 @@ public abstract class JavaPlugin extends PluginBase {
this.dataFolder = dataFolder;
this.classLoader = classLoader;
this.configFile = new File(dataFolder, "config.yml");
- // Paper - Handle plugin prefix in implementation
- this.logger = Logger.getLogger(description.getPrefix() != null ? description.getPrefix() : description.getName());
+ // Paper start
+ if (this.logger == null) {
+ this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(this.description);
+ }
+ // Paper end
}
/**
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 36f542a85e0f16e97c65c0ca64ec660ddf75d63e..3a02dbe9d183bc907dcce081d8338d5716ed5242 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -42,6 +42,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
private JavaPlugin pluginInit;
private IllegalStateException pluginState;
private final Set<String> seenIllegalAccess = Collections.newSetFromMap(new ConcurrentHashMap<>());
+ private java.util.logging.Logger logger; // Paper - add field
static {
ClassLoader.registerAsParallelCapable();
@@ -59,6 +60,8 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
this.manifest = jar.getManifest();
this.url = file.toURI().toURL();
+ this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description); // Paper - Register logger early
+
try {
Class<?> jarClass;
try {
@@ -203,6 +206,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
pluginState = new IllegalStateException("Initial initialization");
this.pluginInit = javaPlugin;
+ javaPlugin.logger = this.logger; // Paper - set logger
javaPlugin.init(loader, loader.server, description, dataFolder, file, this);
}
}
@@ -1,118 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Sep 2017 17:21:32 -0400
Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerJumpEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerJumpEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..289a0d784a3c74caf8a7231b4dd166096b1849a1
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerJumpEvent.java
@@ -0,0 +1,106 @@
+package com.destroystokyo.paper.event.player;
+
+import com.google.common.base.Preconditions;
+import org.bukkit.Location;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called when the server detects the player is jumping.
+ * <p>
+ * Added to avoid the overhead and special case logic that many plugins use
+ * when checking for jumps via PlayerMoveEvent, this event is fired whenever
+ * the server detects that the player is jumping.
+ */
+public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ private boolean cancel = false;
+ @NotNull private Location from;
+ @NotNull private Location to;
+
+ public PlayerJumpEvent(@NotNull final Player player, @NotNull final Location from, @NotNull final Location to) {
+ super(player);
+ this.from = from;
+ this.to = to;
+ }
+
+ /**
+ * Gets the cancellation state of this event. A cancelled event will not
+ * be executed in the server, but will still pass to other plugins
+ * <p>
+ * If a jump event is cancelled, the player will be moved or
+ * teleported back to the Location as defined by getFrom(). This will not
+ * fire an event
+ *
+ * @return true if this event is cancelled
+ */
+ public boolean isCancelled() {
+ return cancel;
+ }
+
+ /**
+ * Sets the cancellation state of this event. A cancelled event will not
+ * be executed in the server, but will still pass to other plugins
+ * <p>
+ * If a jump event is cancelled, the player will be moved or
+ * teleported back to the Location as defined by getFrom(). This will not
+ * fire an event
+ *
+ * @param cancel true if you wish to cancel this event
+ */
+ public void setCancelled(boolean cancel) {
+ this.cancel = cancel;
+ }
+
+ /**
+ * Gets the location this player jumped from
+ *
+ * @return Location the player jumped from
+ */
+ @NotNull
+ public Location getFrom() {
+ return from;
+ }
+
+ /**
+ * Sets the location to mark as where the player jumped from
+ *
+ * @param from New location to mark as the players previous location
+ */
+ public void setFrom(@NotNull Location from) {
+ validateLocation(from);
+ this.from = from;
+ }
+
+ /**
+ * Gets the location this player jumped to
+ *
+ * This information is based on what the client sends, it typically
+ * has little relation to the arc of the jump at any given point.
+ *
+ * @return Location the player jumped to
+ */
+ @NotNull
+ public Location getTo() {
+ return to;
+ }
+
+ private void validateLocation(Location loc) {
+ Preconditions.checkArgument(loc != null, "Cannot use null location!");
+ Preconditions.checkArgument(loc.getWorld() != null, "Cannot use location with null world!");
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,71 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 10 Oct 2017 18:44:42 +0200
Subject: [PATCH] Expose client protocol version and virtual host
Add a NetworkClient interface that provides access to:
- The socket address
- The protocol version
- The virtual host (the hostname/port the client used to connect
to the server)
diff --git a/src/main/java/com/destroystokyo/paper/network/NetworkClient.java b/src/main/java/com/destroystokyo/paper/network/NetworkClient.java
new file mode 100644
index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b851aa04f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/NetworkClient.java
@@ -0,0 +1,41 @@
+package com.destroystokyo.paper.network;
+
+import java.net.InetSocketAddress;
+
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Represents a client connected to the server.
+ */
+public interface NetworkClient {
+
+ /**
+ * Returns the socket address of the client.
+ *
+ * @return The client's socket address
+ */
+ @NotNull
+ InetSocketAddress getAddress();
+
+ /**
+ * Returns the protocol version of the client.
+ *
+ * @return The client's protocol version, or {@code -1} if unknown
+ * @see <a href="http://wiki.vg/Protocol_version_numbers">List of protocol
+ * version numbers</a>
+ */
+ int getProtocolVersion();
+
+ /**
+ * Returns the virtual host the client is connected to.
+ *
+ * <p>The virtual host refers to the hostname/port the client used to
+ * connect to the server.</p>
+ *
+ * @return The client's virtual host, or {@code null} if unknown
+ */
+ @Nullable
+ InetSocketAddress getVirtualHost();
+
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 9cf7adf244335ac7dccbdf11f605a8c6910f7414..04f1a6513711dde8576c9b5c2b04619c56b48d8a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
/**
* Represents a player, connected or not
*/
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, com.destroystokyo.paper.network.NetworkClient { // Paper
// Paper start
@Override
@@ -1,149 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: pkt77 <parkerkt77@gmail.com>
Date: Fri, 10 Nov 2017 23:45:59 -0500
Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a669d0a958b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java
@@ -0,0 +1,137 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.Material;
+import org.bukkit.entity.Player;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.bukkit.inventory.ItemStack;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import static org.bukkit.Material.*;
+
+/**
+ * Called when the player themselves change their armor items
+ * <p>
+ * Not currently called for environmental factors though it <strong>MAY BE IN THE FUTURE</strong>
+ */
+public class PlayerArmorChangeEvent extends PlayerEvent {
+ private static final HandlerList HANDLERS = new HandlerList();
+
+ @NotNull private final SlotType slotType;
+ @Nullable private final ItemStack oldItem;
+ @Nullable private final ItemStack newItem;
+
+ public PlayerArmorChangeEvent(@NotNull Player player, @NotNull SlotType slotType, @Nullable ItemStack oldItem, @Nullable ItemStack newItem) {
+ super(player);
+ this.slotType = slotType;
+ this.oldItem = oldItem;
+ this.newItem = newItem;
+ }
+
+ /**
+ * Gets the type of slot being altered.
+ *
+ * @return type of slot being altered
+ */
+ @NotNull
+ public SlotType getSlotType() {
+ return this.slotType;
+ }
+
+ /**
+ * Gets the existing item that's being replaced
+ *
+ * @return old item
+ */
+ @Nullable
+ public ItemStack getOldItem() {
+ return this.oldItem;
+ }
+
+ /**
+ * Gets the new item that's replacing the old
+ *
+ * @return new item
+ */
+ @Nullable
+ public ItemStack getNewItem() {
+ return this.newItem;
+ }
+
+ @Override
+ public String toString() {
+ return "ArmorChangeEvent{" + "player=" + player + ", slotType=" + slotType + ", oldItem=" + oldItem + ", newItem=" + newItem + '}';
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return HANDLERS;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return HANDLERS;
+ }
+
+ public enum SlotType {
+ HEAD(NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET),
+ CHEST(NETHERITE_CHESTPLATE, DIAMOND_CHESTPLATE, GOLDEN_CHESTPLATE, IRON_CHESTPLATE, CHAINMAIL_CHESTPLATE, LEATHER_CHESTPLATE, ELYTRA),
+ LEGS(NETHERITE_LEGGINGS, DIAMOND_LEGGINGS, GOLDEN_LEGGINGS, IRON_LEGGINGS, CHAINMAIL_LEGGINGS, LEATHER_LEGGINGS),
+ FEET(NETHERITE_BOOTS, DIAMOND_BOOTS, GOLDEN_BOOTS, IRON_BOOTS, CHAINMAIL_BOOTS, LEATHER_BOOTS);
+
+ private final Set<Material> mutableTypes = new HashSet<>();
+ private Set<Material> immutableTypes;
+
+ SlotType(Material... types) {
+ this.mutableTypes.addAll(Arrays.asList(types));
+ }
+
+ /**
+ * Gets an immutable set of all allowed material types that can be placed in an
+ * armor slot.
+ *
+ * @return immutable set of material types
+ */
+ @NotNull
+ public Set<Material> getTypes() {
+ if (immutableTypes == null) {
+ immutableTypes = Collections.unmodifiableSet(mutableTypes);
+ }
+
+ return immutableTypes;
+ }
+
+ /**
+ * Gets the type of slot via the specified material
+ *
+ * @param material material to get slot by
+ * @return slot type the material will go in, or null if it won't
+ */
+ @Nullable
+ public static SlotType getByMaterial(@NotNull Material material) {
+ for (SlotType slotType : values()) {
+ if (slotType.getTypes().contains(material)) {
+ return slotType;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets whether or not this material can be equipped to a slot
+ *
+ * @param material material to check
+ * @return whether or not this material can be equipped
+ */
+ public static boolean isEquipable(@NotNull Material material) {
+ return getByMaterial(material) != null;
+ }
+ }
+}
@@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 6 Nov 2017 21:10:01 -0500
Subject: [PATCH] API to get a BlockState without a snapshot
This allows you to get a BlockState without creating a snapshot, operating
on the real tile entity.
This is useful for where performance is needed
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 0cfad6f84eda6f7bfa1fae041341ccb1021b157d..e89c8079625525667f496c06207da655fe43d749 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -269,6 +269,16 @@ public interface Block extends Metadatable {
@NotNull
BlockState getState();
+ // Paper start
+ /**
+ * @see #getState() optionally disables use of snapshot, to operate on real block data
+ * @param useSnapshot if this block is a TE, should we create a fully copy of the TileEntity
+ * @return BlockState with the current state of this block
+ */
+ @NotNull
+ BlockState getState(boolean useSnapshot);
+ // Paper end
+
/**
* Returns the biome that this block resides in
*
@@ -1,266 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 26 Nov 2017 13:17:09 -0500
Subject: [PATCH] AsyncTabCompleteEvent
Let plugins be able to control tab completion of commands and chat async.
This will be useful for frameworks like ACF so we can define async safe completion handlers,
and avoid going to main for tab completions.
Especially useful if you need to query a database in order to obtain the results for tab
completion, such as offline players.
diff --git a/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java b/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728bac49d10d
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.event.server;
+
+import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang.Validate;
+import org.bukkit.Location;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Allows plugins to compute tab completion results asynchronously. If this event provides completions, then the standard synchronous process will not be fired to populate the results. However, the synchronous TabCompleteEvent will fire with the Async results.
+ *
+ * Only 1 process will be allowed to provide completions, the Async Event, or the standard process.
+ */
+public class AsyncTabCompleteEvent extends Event implements Cancellable {
+ @NotNull private final CommandSender sender;
+ @NotNull private final String buffer;
+ private final boolean isCommand;
+ @Nullable
+ private final Location loc;
+ @NotNull private List<String> completions;
+ private boolean cancelled;
+ private boolean handled = false;
+ private boolean fireSyncHandler = true;
+
+ public AsyncTabCompleteEvent(@NotNull CommandSender sender, @NotNull List<String> completions, @NotNull String buffer, boolean isCommand, @Nullable Location loc) {
+ super(true);
+ this.sender = sender;
+ this.completions = completions;
+ this.buffer = buffer;
+ this.isCommand = isCommand;
+ this.loc = loc;
+ }
+
+ /**
+ * Get the sender completing this command.
+ *
+ * @return the {@link CommandSender} instance
+ */
+ @NotNull
+ public CommandSender getSender() {
+ return sender;
+ }
+
+ /**
+ * The list of completions which will be offered to the sender, in order.
+ * This list is mutable and reflects what will be offered.
+ *
+ * If this collection is not empty after the event is fired, then
+ * the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
+ * or current player names will not be called.
+ *
+ * @return a list of offered completions
+ */
+ @NotNull
+ public List<String> getCompletions() {
+ return completions;
+ }
+
+ /**
+ * Set the completions offered, overriding any already set.
+ * If this collection is not empty after the event is fired, then
+ * the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
+ * or current player names will not be called.
+ *
+ * The passed collection will be cloned to a new List. You must call {{@link #getCompletions()}} to mutate from here
+ *
+ * @param completions the new completions
+ */
+ public void setCompletions(@NotNull List<String> completions) {
+ Validate.notNull(completions);
+ this.completions = new ArrayList<>(completions);
+ }
+
+ /**
+ * Return the entire buffer which formed the basis of this completion.
+ *
+ * @return command buffer, as entered
+ */
+ @NotNull
+ public String getBuffer() {
+ return buffer;
+ }
+
+ /**
+ * @return True if it is a command being tab completed, false if it is a chat message.
+ */
+ public boolean isCommand() {
+ return isCommand;
+ }
+
+ /**
+ * @return The position looked at by the sender, or null if none
+ */
+ @Nullable
+ public Location getLocation() {
+ return loc;
+ }
+
+ /**
+ * If true, the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
+ * or current player names will not be called.
+ *
+ * @return Is completions considered handled. Always true if completions is not empty.
+ */
+ public boolean isHandled() {
+ return !completions.isEmpty() || handled;
+ }
+
+ /**
+ * Sets whether or not to consider the completion request handled.
+ * If true, the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
+ * or current player names will not be called.
+ *
+ * @param handled if this completion should be marked as being handled
+ */
+ public void setHandled(boolean handled) {
+ this.handled = handled;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ /**
+ * Will provide no completions, and will not fire the synchronous process
+ * @param cancelled true if you wish to cancel this event
+ */
+ @Override
+ public void setCancelled(boolean cancelled) {
+ this.cancelled = cancelled;
+ }
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
index d1a9956a1573dab54c5ff2e5d67ca86cfe1dc01a..f96c4ba53ab41ea66d4f9a4d54eeabb63f992b58 100644
--- a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
+++ b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
@@ -1,5 +1,6 @@
package org.bukkit.event.server;
+import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.Validate;
import org.bukkit.command.CommandSender;
@@ -8,6 +9,7 @@ import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerCommandSendEvent;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
/**
* Called when a {@link CommandSender} of any description (ie: player or
@@ -29,6 +31,13 @@ public class TabCompleteEvent extends Event implements Cancellable {
private boolean cancelled;
public TabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions) {
+ // Paper start
+ this(sender, buffer, completions, sender instanceof org.bukkit.command.ConsoleCommandSender || buffer.startsWith("/"), null);
+ }
+ public TabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions, boolean isCommand, @Nullable org.bukkit.Location location) {
+ this.isCommand = isCommand;
+ this.loc = location;
+ // Paper end
Validate.notNull(sender, "sender");
Validate.notNull(buffer, "buffer");
Validate.notNull(completions, "completions");
@@ -69,14 +78,35 @@ public class TabCompleteEvent extends Event implements Cancellable {
return completions;
}
+ // Paper start
+ private final boolean isCommand;
+ private final org.bukkit.Location loc;
+ /**
+ * @return True if it is a command being tab completed, false if it is a chat message.
+ */
+ public boolean isCommand() {
+ return isCommand;
+ }
+
+ /**
+ * @return The position looked at by the sender, or null if none
+ */
+ @Nullable
+ public org.bukkit.Location getLocation() {
+ return loc;
+ }
+ // Paper end
+
/**
* Set the completions offered, overriding any already set.
*
+ * The passed collection will be cloned to a new List. You must call {{@link #getCompletions()}} to mutate from here
+ *
* @param completions the new completions
*/
public void setCompletions(@NotNull List<String> completions) {
Validate.notNull(completions);
- this.completions = completions;
+ this.completions = new ArrayList<>(completions); // Paper
}
@Override
@@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 9 Dec 2017 12:40:25 -0500
Subject: [PATCH] Display warning on deprecated recipe API
Any plugin still using this API will result in the server saving an inconsistent UUID to player data files,
which then triggers warnings such as "Tried to load unrecognized recipe: bukkit:9e5b92f5-e549-4f47-b0a8-9f89390ed77b removed now."
on the players login.
Plugin authors need to define a key to keep it consistent between server restarts.
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
index d74b3114f535e1e5e36ae007f1fe0522916a0362..d742c4058ba9aed4fbe1591fd755a06608b06e98 100644
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
@@ -25,6 +25,7 @@ public class ShapedRecipe implements Recipe, Keyed {
public ShapedRecipe(@NotNull ItemStack result) {
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
this.key = NamespacedKey.randomKey();
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
this.output = new ItemStack(result);
}
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
index 68447fb8c12356e779b96ec98c54119045046751..84062dd719cb8a6142dc8c806777cb208c6b42b2 100644
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
@@ -26,6 +26,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
public ShapelessRecipe(@NotNull ItemStack result) {
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
this.key = NamespacedKey.randomKey();
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
this.output = new ItemStack(result);
}
@@ -1,93 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:00:41 -0500
Subject: [PATCH] PlayerPickupExperienceEvent
Allows plugins to cancel a player picking up an experience orb
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerPickupExperienceEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerPickupExperienceEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..f7beb22d5105157940b39efe594ace9d4cb153f5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerPickupExperienceEvent.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.entity.ExperienceOrb;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when a player is attempting to pick up an experience orb
+ */
+public class PlayerPickupExperienceEvent extends PlayerEvent implements Cancellable {
+ @NotNull private final ExperienceOrb experienceOrb;
+
+ public PlayerPickupExperienceEvent(@NotNull Player player, @NotNull ExperienceOrb experienceOrb) {
+ super(player);
+ this.experienceOrb = experienceOrb;
+ }
+
+ /**
+ * @return Returns the Orb that the player is picking up
+ */
+ @NotNull
+ public ExperienceOrb getExperienceOrb() {
+ return experienceOrb;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ /**
+ * If true, Cancels picking up the experience orb, leaving it in the world
+ * @param cancel true if you wish to cancel this event
+ */
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+}
@@ -1,102 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 22:56:24 -0500
Subject: [PATCH] ExperienceOrbMergeEvent
Fired when the server is about to merge 2 experience orbs
Plugins can cancel this if they want to ensure experience orbs do not lose important
metadata such as spawn reason, or conditionally move data from source to target.
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..0ce3e397716c28c30ed05e153babd0bfb9dd354a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/ExperienceOrbMergeEvent.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.ExperienceOrb;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.EntityEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired anytime the server is about to merge 2 experience orbs into one
+ */
+public class ExperienceOrbMergeEvent extends EntityEvent implements Cancellable {
+ @NotNull private final ExperienceOrb mergeTarget;
+ @NotNull private final ExperienceOrb mergeSource;
+
+ public ExperienceOrbMergeEvent(@NotNull ExperienceOrb mergeTarget, @NotNull ExperienceOrb mergeSource) {
+ super(mergeTarget);
+ this.mergeTarget = mergeTarget;
+ this.mergeSource = mergeSource;
+ }
+
+ /**
+ * @return The orb that will absorb the other experience orb
+ */
+ @NotNull
+ public ExperienceOrb getMergeTarget() {
+ return mergeTarget;
+ }
+
+ /**
+ * @return The orb that is subject to being removed and merged into the target orb
+ */
+ @NotNull
+ public ExperienceOrb getMergeSource() {
+ return mergeSource;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ /**
+ * @param cancel true if you wish to cancel this event, and prevent the orbs from merging
+ */
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+}
@@ -1,50 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 20 Dec 2017 17:38:07 -0500
Subject: [PATCH] Ability to apply mending to XP API
This allows plugins that give players the ability to apply the experience
points to the Item Mending formula, which will repair an item instead
of giving the player experience points.
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 21bed0d8075335538374fadfdf1cb868e4eebe80..9d1ad67b7d220ab425ac9bf6b1c8d8fb8d5f416c 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -892,12 +892,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void resetPlayerWeather();
+ // Paper start
+ /**
+ * Gives the player the amount of experience specified.
+ *
+ * @param amount Exp amount to give
+ */
+ public default void giveExp(int amount) {
+ giveExp(amount, false);
+ }
/**
* Gives the player the amount of experience specified.
*
* @param amount Exp amount to give
+ * @param applyMending Mend players items with mending, with same behavior as picking up orbs. calls {@link #applyMending(int)}
*/
- public void giveExp(int amount);
+ public void giveExp(int amount, boolean applyMending);
+
+ /**
+ * Applies the mending effect to any items just as picking up an orb would.
+ *
+ * Can also be called with {@link #giveExp(int, boolean)} by passing true to applyMending
+ *
+ * @param amount Exp to apply
+ * @return the remaining experience
+ */
+ public int applyMending(int amount);
+ // Paper end
/**
* Gives the player the amount of experience levels specified. Levels can
@@ -1,127 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 16:59:43 -0500
Subject: [PATCH] PreCreatureSpawnEvent
Adds an event to fire before an Entity is created, so that plugins that need to cancel
CreatureSpawnEvent can do so from this event instead.
Cancelling CreatureSpawnEvent rapidly causes a lot of garbage collection and CPU waste
as it's done after the Entity object has been fully created.
Mob Limiting plugins and blanket "ban this type of monster" plugins should use this event
instead and save a lot of server resources.
See: https://github.com/PaperMC/Paper/issues/917
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..3ad231aa3206c8cfd5ec995249584cebab5d11f3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java
@@ -0,0 +1,105 @@
+package com.destroystokyo.paper.event.entity;
+
+import com.google.common.base.Preconditions;
+import org.bukkit.Location;
+import org.bukkit.entity.EntityType;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.entity.CreatureSpawnEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * WARNING: This event only fires for a limited number of cases, and not for every case that CreatureSpawnEvent does.
+ *
+ * You should still listen to CreatureSpawnEvent as a backup, and only use this event as an "enhancement".
+ * The intent of this event is to improve server performance, so it fires even if the spawning might fail later, for
+ * example when the entity would be unable to spawn due to limited space or lighting.
+ *
+ * Currently: NATURAL and SPAWNER based reasons. Please submit a Pull Request for future additions.
+ * Also, Plugins that replace Entity Registrations with their own custom entities might not fire this event.
+ */
+public class PreCreatureSpawnEvent extends Event implements Cancellable {
+ @NotNull private final Location location;
+ @NotNull private final EntityType type;
+ @NotNull private final CreatureSpawnEvent.SpawnReason reason;
+ private boolean shouldAbortSpawn;
+
+ public PreCreatureSpawnEvent(@NotNull Location location, @NotNull EntityType type, @NotNull CreatureSpawnEvent.SpawnReason reason) {
+ this.location = Preconditions.checkNotNull(location, "Location may not be null").clone();
+ this.type = Preconditions.checkNotNull(type, "Type may not be null");
+ this.reason = Preconditions.checkNotNull(reason, "Reason may not be null");
+ }
+
+ /**
+ * @return The location this creature is being spawned at
+ */
+ @NotNull
+ public Location getSpawnLocation() {
+ return location;
+ }
+
+ /**
+ * @return The type of creature being spawned
+ */
+ @NotNull
+ public EntityType getType() {
+ return type;
+ }
+
+ /**
+ * @return Reason this creature is spawning (ie, NATURAL vs SPAWNER)
+ */
+ @NotNull
+ public CreatureSpawnEvent.SpawnReason getReason() {
+ return reason;
+ }
+
+ /**
+ * @return If the spawn process should be aborted vs trying more attempts
+ */
+ public boolean shouldAbortSpawn() {
+ return shouldAbortSpawn;
+ }
+
+ /**
+ * Set this if you are more blanket blocking all types of these spawns, and wish to abort the spawn process from
+ * trying more attempts after this cancellation.
+ *
+ * @param shouldAbortSpawn Set if the spawn process should be aborted vs trying more attempts
+ */
+ public void setShouldAbortSpawn(boolean shouldAbortSpawn) {
+ this.shouldAbortSpawn = shouldAbortSpawn;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ /**
+ * @return If the spawn of this creature is cancelled or not
+ */
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ /**
+ * Cancelling this event is more effecient than cancelling CreatureSpawnEvent
+ * @param cancel true if you wish to cancel this event, and abort the spawn of this creature
+ */
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+}
@@ -1,80 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 17:31:37 -0500
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
This event can be used for when you want to exclude a certain player
from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PlayerNaturallySpawnCreaturesEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PlayerNaturallySpawnCreaturesEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..112a0dbf522b8e74ce882678434923814e6b187f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PlayerNaturallySpawnCreaturesEvent.java
@@ -0,0 +1,64 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when the server is calculating what chunks to try to spawn monsters in every Monster Spawn Tick event
+ */
+public class PlayerNaturallySpawnCreaturesEvent extends PlayerEvent implements Cancellable {
+ private byte radius;
+
+ public PlayerNaturallySpawnCreaturesEvent(@NotNull Player player, byte radius) {
+ super(player);
+ this.radius = radius;
+ }
+
+ /**
+ * @return The radius of chunks around this player to be included in natural spawn selection
+ */
+ public byte getSpawnRadius() {
+ return radius;
+ }
+
+ /**
+ * @param radius The radius of chunks around this player to be included in natural spawn selection
+ */
+ public void setSpawnRadius(byte radius) {
+ this.radius = radius;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+
+ private boolean cancelled = false;
+
+ /**
+ * @return If this players chunks will be excluded from natural spawns
+ */
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ /**
+ * @param cancel true if you wish to cancel this event, and not include this players chunks for natural spawning
+ */
+ @Override
+ public void setCancelled(boolean cancel) {
+ cancelled = cancel;
+ }
+}
@@ -1,78 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 19 Jan 2018 00:29:28 -0500
Subject: [PATCH] Add setPlayerProfile API for Skulls
This allows you to create already filled textures on Skulls to avoid texture lookups
which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
index 943d751fb3e48212fbe258845beba03c25fa22d9..a6914f01e01e9103702185f92b0209b3c84c152a 100644
--- a/src/main/java/org/bukkit/block/Skull.java
+++ b/src/main/java/org/bukkit/block/Skull.java
@@ -7,6 +7,7 @@ import org.bukkit.block.data.BlockData;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import com.destroystokyo.paper.profile.PlayerProfile; // Paper
/**
* Represents a captured state of a skull block.
@@ -61,6 +62,20 @@ public interface Skull extends TileState {
*/
public void setOwningPlayer(@NotNull OfflinePlayer player);
+ // Paper start
+ /**
+ * Sets this skull to use the supplied Player Profile, which can include textures already prefilled.
+ * @param profile The profile to set this Skull to use, may not be null
+ */
+ void setPlayerProfile(@NotNull PlayerProfile profile);
+
+ /**
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link PlayerProfile}
+ * @return The profile of the owner, if set
+ */
+ @Nullable PlayerProfile getPlayerProfile();
+ // Paper end
+
/**
* Gets the rotation of the skull in the world (or facing direction if this
* is a wall mounted skull).
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
index 496254f959345d74167a9b44d160ea1bb428c5a1..88d1c889c09adb91abb09a8e43a30c871b217da2 100644
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
@@ -1,9 +1,11 @@
package org.bukkit.inventory.meta;
+import com.destroystokyo.paper.profile.PlayerProfile;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+
/**
* Represents a skull that can have an owner.
*/
@@ -36,6 +38,20 @@ public interface SkullMeta extends ItemMeta {
@Deprecated
boolean setOwner(@Nullable String owner);
+ // Paper start
+ /**
+ * Sets this skull to use the supplied Player Profile, which can include textures already prefilled.
+ * @param profile The profile to set this Skull to use, or null to clear owner
+ */
+ void setPlayerProfile(@Nullable PlayerProfile profile);
+
+ /**
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link PlayerProfile}
+ * @return The profile of the owner, if set
+ */
+ @Nullable PlayerProfile getPlayerProfile();
+ // Paper end
+
/**
* Gets the owner of the skull.
*
@@ -1,176 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 2 Jan 2018 00:31:08 -0500
Subject: [PATCH] Fill Profile Property Events
Allows plugins to populate profile properties from local sources to avoid calls out to Mojang API
to fill in textures for example.
If Mojang API does need to be hit, event fire so you can get the results.
This is useful for implementing a ProfileCache for Player Skulls
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..71f36e9cae209ec6861835a5e76e018de959040a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.event.profile;
+
+import com.destroystokyo.paper.profile.PlayerProfile;
+import com.destroystokyo.paper.profile.ProfileProperty;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import java.util.Set;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired once a profiles additional properties (such as textures) has been filled
+ */
+public class FillProfileEvent extends Event {
+ @NotNull private final PlayerProfile profile;
+
+ public FillProfileEvent(@NotNull PlayerProfile profile) {
+ super(!org.bukkit.Bukkit.isPrimaryThread());
+ this.profile = profile;
+ }
+
+ /**
+ * @return The Profile that had properties filled
+ */
+ @NotNull
+ public PlayerProfile getPlayerProfile() {
+ return profile;
+ }
+
+ /**
+ * Same as .getPlayerProfile().getProperties()
+ *
+ * @see PlayerProfile#getProperties()
+ * @return The new properties on the profile.
+ */
+ @NotNull
+ public Set<ProfileProperty> getProperties() {
+ return profile.getProperties();
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..021bc86310a06f84b39459e0eb8927802726399c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+package com.destroystokyo.paper.event.profile;
+
+import com.destroystokyo.paper.profile.PlayerProfile;
+import com.destroystokyo.paper.profile.ProfileProperty;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+import java.util.Collection;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Fired when the server is requesting to fill in properties of an incomplete profile, such as textures.
+ *
+ * Allows plugins to pre populate cached properties and avoid a call to the Mojang API
+ */
+public class PreFillProfileEvent extends Event {
+ @NotNull private final PlayerProfile profile;
+
+ public PreFillProfileEvent(@NotNull PlayerProfile profile) {
+ super(!org.bukkit.Bukkit.isPrimaryThread());
+ this.profile = profile;
+ }
+
+ /**
+ * @return The profile that needs its properties filled
+ */
+ @NotNull
+ public PlayerProfile getPlayerProfile() {
+ return profile;
+ }
+
+ /**
+ * Sets the properties on the profile, avoiding the call to the Mojang API
+ * Same as .getPlayerProfile().setProperties(properties);
+ *
+ * @see PlayerProfile#setProperties(Collection)
+ * @param properties The properties to set/append
+ */
+ public void setProperties(@NotNull Collection<ProfileProperty> properties) {
+ profile.setProperties(properties);
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ @NotNull
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,75 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 19 Jan 2018 08:15:14 -0600
Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerAdvancementCriterionGrantEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerAdvancementCriterionGrantEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..bb8d7c959cdea4b66455a49e74804ea4b126620d
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerAdvancementCriterionGrantEvent.java
@@ -0,0 +1,63 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.advancement.Advancement;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * Called when a player is granted a criteria in an advancement.
+ */
+public class PlayerAdvancementCriterionGrantEvent extends PlayerEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList();
+ @NotNull private final Advancement advancement;
+ @NotNull private final String criterion;
+ private boolean cancel = false;
+
+ public PlayerAdvancementCriterionGrantEvent(@NotNull Player who, @NotNull Advancement advancement, @NotNull String criterion) {
+ super(who);
+ this.advancement = advancement;
+ this.criterion = criterion;
+ }
+
+ /**
+ * Get the advancement which has been affected.
+ *
+ * @return affected advancement
+ */
+ @NotNull
+ public Advancement getAdvancement() {
+ return advancement;
+ }
+
+ /**
+ * Get the criterion which has been granted.
+ *
+ * @return granted criterion
+ */
+ @NotNull
+ public String getCriterion() {
+ return criterion;
+ }
+
+ public boolean isCancelled() {
+ return cancel;
+ }
+
+ public void setCancelled(boolean cancel) {
+ this.cancel = cancel;
+ }
+
+ @NotNull
+ @Override
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ @NotNull
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
@@ -1,96 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:06:24 -0500
Subject: [PATCH] Add ArmorStand Item Meta
This is adds basic item meta for armor stands. It does not add all
possible metadata however.
There are armor, hand, and equipment types, as well as position data
that can also be added here. This initial addition should serve a
starting point for future additions in this area.
diff --git a/src/main/java/com/destroystokyo/paper/inventory/meta/ArmorStandMeta.java b/src/main/java/com/destroystokyo/paper/inventory/meta/ArmorStandMeta.java
new file mode 100644
index 0000000000000000000000000000000000000000..7e4acfff16db80a75e1ff2fee1972b16955b0918
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/inventory/meta/ArmorStandMeta.java
@@ -0,0 +1,78 @@
+package com.destroystokyo.paper.inventory.meta;
+
+import org.bukkit.inventory.meta.ItemMeta;
+
+public interface ArmorStandMeta extends ItemMeta {
+
+ /**
+ * Gets whether the ArmorStand should be invisible when spawned
+ *
+ * @return true if this should be invisible
+ */
+ boolean isInvisible();
+
+ /**
+ * Gets whether this ArmorStand should have no base plate when spawned
+ *
+ * @return true if it will not have a base plate
+ */
+ boolean hasNoBasePlate();
+
+ /**
+ * Gets whether this ArmorStand should show arms when spawned
+ *
+ * @return true if it will show arms
+ */
+ boolean shouldShowArms();
+
+ /**
+ * Gets whether this ArmorStand will be small when spawned
+ *
+ * @return true if it will be small
+ */
+ boolean isSmall();
+
+ /**
+ * Gets whether this ArmorStand will be a marker when spawned
+ * The exact details of this flag are an implementation detail
+ *
+ * @return true if it will be a marker
+ */
+ boolean isMarker();
+
+ /**
+ * Sets that this ArmorStand should be invisible when spawned
+ *
+ * @param invisible true if set invisible
+ */
+ void setInvisible(boolean invisible);
+
+ /**
+ * Sets that this ArmorStand should have no base plate when spawned
+ *
+ * @param noBasePlate true if no base plate
+ */
+ void setNoBasePlate(boolean noBasePlate);
+
+ /**
+ * Sets that this ArmorStand should show arms when spawned
+ *
+ * @param showArms true if show arms
+ */
+ void setShowArms(boolean showArms);
+
+ /**
+ * Sets that this ArmorStand should be small when spawned
+ *
+ * @param small true if small
+ */
+ void setSmall(boolean small);
+
+ /**
+ * Sets that this ArmorStand should be a marker when spawned
+ * The exact details of this flag are an implementation detail
+ *
+ * @param marker true if a marker
+ */
+ void setMarker(boolean marker);
+}
Loaded 100 of 2685 files, more files were not shown because too many files have changed in this diff. Show more