Commit Graph

460 Commits

Author SHA1 Message Date
Shane Freeder
94d60e15b3 Copy thrown pearls list for removal (#12840) 2025-07-14 23:04:02 +02:00
Jake Potrebic
533d93c758 Don't consume anchor charge if loc changes (#12835) 2025-07-12 19:03:48 +00:00
Nassim Jahnke
cb47e01823 Remove more dead code, fix pre-existing desync when cancelling and closing container 2025-07-11 22:24:20 +02:00
Nassim Jahnke
a939945148 Fixup sendAllDataToRemote calls
Reduces unnecessary item copies by a lot
2025-07-11 17:43:05 +02:00
Jake Potrebic
b4466ec981 Dialog API (#12671) 2025-07-06 20:49:43 +02:00
Owen
0cadaefc09 Fix quitmessage nullability issues (#12783) 2025-07-01 18:44:17 -04:00
Nassim Jahnke
3fec37a9c1 Move the double call into the dispatch method
At some point later,
2025-07-01 21:44:24 +02:00
Nassim Jahnke
c3be00f0ec Always call plugin message dispatch on PlayerConnection 2025-07-01 21:09:44 +02:00
Owen
6ea679eb07 Allow listening to plugin messages during configuration phase (#12775) 2025-07-01 15:40:50 +02:00
Owen1212055
a9f74cbf6e Readd dropped diff during 1.21.6 2025-06-30 11:49:21 +02:00
Owen
7f60924390 Configuration API (#12301)
This implements a solution that preemptively exits the tick loop if we have already marked the connection as disconnecting. This avoids changing the result of Connection#isConnected in order to avoid other possibly unintentional changes. Fundamentally it should be investigated if closing the connection async is really still needed.

This also additionally removes the login disconnecting logic for server stopping, as this was also a possible issue in the config stage but also shouldn't be an issue as connections are closed on server stop very early.

Additionally, do not check for isConnecting() on VERIFYING, as that seemed to be an old diff originally trying to resolve this code, however isConnected is not updated at this point so it pretty much was useless.
2025-06-30 11:49:15 +02:00
Shane Freeder
35b2c6ece4 Use dropped item for stats info (#12747)
We are already using the dropped stack to determine the type, we
might as well also use it for the count, given that plugins can already
mutate the type, might as well let them mess with the amount.
2025-06-26 19:44:29 +01:00
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