Commit Graph

448 Commits

Author SHA1 Message Date
Pedro aa6cd74c03 Remove unnecesary item check for ServerboundPlayerActionPacket RELEASE_USE_ITEM (#12668) 2025-06-25 22:09:11 +02:00
Kezz bee287927c Adventure 4.23.0 (#12690) 2025-06-25 21:16:18 +02:00
Spottedleaf 2f083acbed Ensure player entity schedulers are ticked when they are dead
If the player dies, then they are removed from the world and
as a result are not present in the world entity map.

To guarantee that the player entity scheduler is ticked, we can
tick all schedulers for players in the server player list, and
then skip all players we find in the world entity map.

This problem is not present on Folia since Folia must guarantee
that the player remains in the world.
2025-06-24 05:12:58 -07:00
Spottedleaf 38c1ddb52a Add and use FeatureHooks.getAllEntities
The ServerLevel#getAllEntities function only returns entities which
are accessible. FeatureHooks#getAllEntities will return all
entities, whether or not they are accessible.

Use the new hook in the EntityCommand, which allows server admins
to inspect entities in unloaded chunks.

Use the hook as well for ticking the EntityScheduler. This fixes
an issue whether unloaded entities did not have their scheduler ticked.
2025-06-24 04:55:58 -07:00
Spottedleaf 46b4b0b8d5 Improve keepalive ping system
Send more keepalives, record all transactions within the last minute.
We send more keepalives so that the latency calculation is more
accurate. Since we send more keepalives, we track all pending
keepalives in case multiple end up in flight.

Additionally, replace the latency calculation with a true
average over the last 5 seconds of keepalive transactions.
2025-06-24 04:23:08 -07:00
Spottedleaf d0e808f44c Move player to correct position in vehicle move packet handler
We add the change to guarantee that the player position moves
in-sync with the vehicle's. As a result, it should be teleporting
the player using the new position of the vehicle rather than the
old.
2025-06-24 02:09:39 -07:00
Owen 5edcf6ddf6 Cleanup/command dispatching (#12713) 2025-06-21 21:44:07 -04:00
Strokkur24 186e9e331b Relocate CommandMap#registerServerAliases() call to after lifecycle events have been run (#12601) 2025-06-21 14:44:07 -04:00
Bjarne Koll 023e6c2953 Ensure waypoints are per world 2025-06-17 23:43:05 +02:00
Bjarne Koll a24f9b204c 1.21.6 dev
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
2025-06-17 15:45:25 +02:00
David Polt 03efecf0d3 Do not fire PlayerDropItemEvent for /give command 2025-06-07 12:22:48 +02:00
Bjarne Koll ee3b405316 Replace spigot check with generation check 2025-05-24 22:43:48 +02:00
Bjarne Koll b8fe22c9cd Do not call EntityRemoveEvent during worldgen (#12588)
Ports the follow commits from spigot to paper.
All credits to go the respective commit authors listed below.

CraftBukkit: 3b4fd5b321f4440a2b3a67f3945739b45e6e687f

By: md_5 <git@md-5.net>
2025-05-24 22:17:42 +02:00
Md5Lukas 3efaf477c4 Add API for client-side signs (#11903) 2025-05-24 21:16:23 +02:00
Nassim Jahnke 358e72ec0d Remove simplify remote item matching stuff for now
Twas broken for some time and I haven't had time to address it, this may be revisited later in a different way
2025-05-09 14:47:24 +02:00
Jakub Zacek ab0253fecd Expand PlayerDeathEvent API (#12221) 2025-05-06 20:14:58 -04:00
Owen 42a2a6c2b5 Supports the ability for commands to be registered internally (#12520) 2025-05-06 16:05:00 -04:00
David 825685f82f Add PlayerPickBlockEvent and PlayerPickEntityEvent (#12425)
Extensions of the existing PlayerPickItemEvent that allow more fine grained access to relevant context, like the picked block or the entity.
2025-05-02 22:14:27 +02:00
Lulu13022002 567f63ae34 Parity for respawn events (#11792) 2025-04-30 20:04:24 +02:00
Warrior 1e930763d2 Fix ipv6 loopback addresses being able to get connection throttled (#12155) 2025-04-30 11:50:18 -04:00
Gero 3e3b42cdf5 Update player chat session sync (#12382) 2025-04-26 23:26:20 +02:00
SpigotRCE a211ac2ec5 Remove unused warning (#12478) 2025-04-25 10:46:06 +02:00
Nassim Jahnke 1410a22bb2 Fix passengers sending when riding players
Fixes #12468
2025-04-24 13:59:28 +02:00
Pedro Aguiar df429932ca Fix floating warning log when the kick event is canceled (#12374) 2025-04-22 11:44:55 +02:00
Bjarne Koll 6c2b0378fe Use correct saved data key for maps 2025-04-16 20:26:53 +02:00
David 6b4ad08259 Add PlayerRespawnEvent#isMissingRespawnBlock (#12422) 2025-04-14 19:43:19 +02:00
Emily 723b511fe1 Clone exit location passed to teleport event (#12354)
The exit location passed to PlayerTeleportEvent/PlayerTeleportEndGatewayEvent in ServerPlayer#teleport(TeleportTransition) needs to be cloned, as it is later compared in case it was changed. Not cloning it results in the ability for plugins to mutate it but such changes will be ignored, as the instance of the Location being the same results in a successful equality check.

It is not necessary to clone the location in other instantiations of the event (or subclasses) as those are not compared afterwards to change the outcome.
2025-04-14 17:28:29 +02:00
Nassim Jahnke f00727c57e 1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
2025-04-12 17:27:00 +02:00
Nassim Jahnke 9b1798d643 Simplify custom payload handling (#12347) 2025-03-27 14:22:38 +01:00
Shane Bee 5a6ab97be6 Add config to remove player as vehicle restriction in /ride (#12327) 2025-03-24 00:55:15 +01:00
Tamion 515e12ca2d Check if BUNDLE_CONTENTS is present in InventoryClickEvent (#12321) 2025-03-24 00:38:25 +01:00
Shane Freeder 2aad131e74 Add config option for command spam whitelist 2025-03-23 18:31:39 +00:00
Matthew Peters 894631f0d0 Make advancement ordering predictable (#12292) 2025-03-21 17:52:42 +01:00
Tamion 6ea42025a4 Send all attributes on respawn (#12274) 2025-03-13 12:41:03 +01:00
Nassim Jahnke 310f52293b Add unsupported config option and internal API to simplify remote item matching
This is important for 1.21.5 servers/clients and non-Vanilla clients that may not be able to match 1.21.5 data hashes anymore
2025-03-13 12:32:50 +01:00
Tamion 102c8bbc54 Add config for updating equipment on player actions (#12275) 2025-03-12 11:09:27 +01:00
Spottedleaf 1a7288aa05 Adjust unloaded chunk check for block digging 2025-03-09 11:11:02 -07:00
0x22 743346a5da Force update attributes
See https://github.com/PaperMC/Paper/pull/12241/
2025-03-09 11:11:02 -07:00
Bjarne Koll e5d988df85 Revert "Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)"
This reverts commit a2b0ff0644.
2025-03-09 18:39:08 +01:00
Warrior 7afae7f465 Add client tick end event (#12199) 2025-03-09 13:14:44 -04:00
Shane Bee 34c794dc51 ServerTickManager#requestGameToSprint - Silence command like feedback (#12220)
* CraftServerTickManager - silence feedback when sprinting

* CraftServerTickManager - forgot secondary note

* ServerTickRateManager - only set to silent if not already sprinting
2025-03-08 17:09:40 -05:00
Noah van der Aa a2b0ff0644 Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)
---------

Co-authored-by: Warrior <50800980+warriorrrr@users.noreply.github.com>
2025-03-08 16:52:10 -05:00
Spottedleaf 4519857817 Set old position / rotation for newly created entities
Set the old pos/rot to be the same as the current pos/rot for new
entities as the default value for the old pos/rot is zero.

Fixes https://github.com/PaperMC/Folia/issues/302
2025-03-08 06:33:29 -08:00
Warrior ca2610904b Don't process empty rcon commands (#12188) 2025-02-25 22:03:14 +01:00
bonan e5a8ee849f Hide soul speed particles for vanished players (#12152)
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
2025-02-21 12:02:32 +01:00
Bjarne Koll 142695eb00 Default minecraft alias to redirect (#12146)
While the running server will still be using the recently introduced
copy-mechanic for vanilla command namespacing, the data converter logic
relies on the fact that namespaced aliases were redirects as well.

To not break the converted, the commands type now takes a modern flag
only set by the running server.
2025-02-18 00:09:54 +01:00
Creeam a3781ff3be Separate tick count to ensure vanilla parity (#12077) 2025-02-16 20:46:37 +01:00
Lulu13022002 7bee99714a Cleanup damage source a bit (#12106) 2025-02-16 20:14:00 +01:00
Pedro cb25c0cf31 [ci skip] Fix annotation fields used in NMS getBukkitEntity (#12120) 2025-02-16 19:17:26 +01:00
Lulu13022002 d4a957849c Experimental annotation changes (#12028) 2025-01-30 20:02:14 +01:00