Dylan K. Taylor
d8d236842f
Fixed merge error
2023-01-03 19:54:41 +00:00
Dylan K. Taylor
f51717323b
Merge branch 'stable' into item-stack-request
2023-01-03 19:53:25 +00:00
Dylan K. Taylor
0e4b79ea77
InGamePacketHandler: fixed client-side predictions not getting rolled back for block placementÂ
2023-01-03 19:43:21 +00:00
Dylan K. Taylor
b312e93176
Limit list max size in transactions
...
this duct tape is to limit the impact of a security vulnerability being actively exploited.
2023-01-02 22:59:48 +00:00
BrandPVP
42db3abf5e
QueryInfo->setPlayerList() now accepts string[] instead of Player[] ( #5476 )
2022-12-31 13:04:22 +00:00
Dylan K. Taylor
61933624d2
NetworkSession: Lift batch limit to 1300 to allow shift-click crafting to work correctly
...
the theoretical limit for transactions in this case is 64x9 (inputs) + 64x9 (output on crafting grid) + 64 (outputs to main slot) + 64 CraftingEventPackets = 1280.
This is an extreme case which assumes that a recipe could generate up to 64x10 (640) output items per iteration, filling every slot of the output grid, which should never occur in any reasonable circumstances.
2022-12-30 22:11:35 +00:00
Alexey
0d31b25fba
Use str_starts_with and str_contains instead of strpos ( #5482 )
2022-12-30 21:41:30 +00:00
Dylan K. Taylor
59be901efe
Fixed unauthenticated sessions taking up player slots
2022-12-28 20:42:33 +00:00
Dylan K. Taylor
c79806eaf0
NetworkSession: localize session open, close, and player name discovery messages
2022-12-27 20:11:46 +00:00
Dylan K. Taylor
7ac6bd79a9
Localized remaining disconnection screens (except one or two that should never actually happen)
2022-12-27 20:05:59 +00:00
Dylan K. Taylor
f173b91ca1
Introduce support for Translatable disconnection messages
...
this allows localizing disconnection screens (at least, once #4512 has been addressed) and the disconnect reasons shown on the console.
We already had disconnect messages implicitly localized in a few places, so this is just formalizing it.
This does break BC with any code that previously passed translation keys as the disconnect screen message, because they'll no longer be translated (only Translatables will be translatated now).
2022-12-27 18:36:07 +00:00
Dylan K. Taylor
9796dfd4d9
Fix build
2022-12-27 18:32:22 +00:00
Dylan K. Taylor
c1ba735c9e
Move common protocol disconnection logic to NetworkSession
2022-12-27 18:05:50 +00:00
Dylan K. Taylor
c89df7eb1c
Merge remote-tracking branch 'origin/next-minor' into next-major
2022-12-25 18:22:13 +00:00
Dylan K. Taylor
0d169b4e80
Filesystem: added fileGetContents to reduce ErrorToExceptionHandler boilerplate code
2022-12-25 17:13:51 +00:00
Dylan K. Taylor
b1c0eae1f6
NetworkSession: tidy up common disconnection logic
2022-12-24 20:36:18 +00:00
Dylan K. Taylor
80832ff763
NetworkSession: do not send packets to disconnected sessions
...
this is mostly harmless, since the packets land in a buffer that gets discarded, but we also need to avoid calling DataPacketSendEvent.
2022-12-24 20:12:50 +00:00
Dylan K. Taylor
f7d0d16eb3
NetworkSession: defer destructive cleanup until the next session tick() call
...
this fixes crashes when kicking players during PlayerJoinEvent and various other events.
2022-12-24 20:06:00 +00:00
Dylan K. Taylor
d37841c214
Merge branch 'next-minor' into next-major
2022-12-24 17:34:37 +00:00
Dylan T
567bd8abb5
Add .self
and .other
permissions for gameplay-altering commands ( #5470 )
...
I'm not quite sure this is the best way to enable such functionality, but it's already used for some other stuff, so I'm not too worried for now.
This allows the following commands to have their usage limited to self or others:
- /effect
- /enchant
- /gamemode
- /give
- /spawnpoint
- /teleport
- /title
I envision this being useful for creative mode servers, and test servers such as test.pmmp.io.
2022-12-24 17:22:18 +00:00
Dylan K. Taylor
f8cc015c51
Merge branch 'next-minor' into next-major
2022-12-23 16:58:59 +00:00
Dylan K. Taylor
b03733442b
Move translation flattening logic from Player to NetworkSession
...
this is network-specific stuff, so it doesn't belong in Player.
2022-12-22 16:51:09 +00:00
IvanCraft623
a9e5f92958
Show death message on death screen ( #5386 )
2022-12-22 15:36:31 +00:00
Dylan K. Taylor
6e2685cbbb
Merge branch 'next-minor' into next-major
2022-12-18 22:25:32 +00:00
Dylan K. Taylor
bf44edd179
Constify a bunch of NBT keys, pass 1
2022-12-18 22:12:15 +00:00
Dylan K. Taylor
4d79aced07
Merge branch 'next-minor' into next-major
2022-12-15 19:50:27 +00:00
Rush2929
31465525e3
Fixed PHP-CS-Fixer not import global constants. ( #5449 )
2022-12-12 17:12:33 +00:00
Dylan K. Taylor
1cefe24414
InGamePacketHandler: fixed transaction predictions not getting rolled back for failed use/release/interact transactions
...
this was caused by b5cfab497dc75ff884b5d91831d5a2f7a5016d99.
2022-12-10 21:16:08 +00:00
Dylan K. Taylor
99996b62d6
Align PhpDoc @param tags according to PHP-CS-Fixer
2022-12-06 13:21:20 +00:00
Dylan K. Taylor
142ccc7e87
Merge branch 'next-minor' into next-major
2022-12-05 14:14:39 +00:00
Dylan K. Taylor
b5cfab497d
Clean up inventory content syncing, fixes #5441
...
these remnants should have been cleaned up in 4.11, but I somehow managed to skip over them.
2022-12-04 23:05:30 +00:00
Dylan K. Taylor
ca3b5c38b7
Added internal support for tag recipe ingredients
2022-12-02 14:03:58 +00:00
Dylan K. Taylor
b6982a84ef
Merge branch 'next-minor' into next-major
2022-11-25 14:52:56 +00:00
Dylan K. Taylor
d79e6354a0
Merge branch 'stable' into next-minor
2022-11-25 14:41:05 +00:00
Alexey Burevestnikov
dda8ff18b1
Missing space ( #5419 )
2022-11-21 10:25:17 +00:00
Dylan K. Taylor
01bad344a0
Merge branch 'next-minor' into next-major
2022-11-04 20:47:26 +00:00
Dylan K. Taylor
cdbdcb5d67
Merge branch 'stable' into next-minor
2022-11-04 20:44:28 +00:00
Dylan K. Taylor
2fdc46c165
PHPStan 1.9 features
2022-11-04 20:23:34 +00:00
Dylan K. Taylor
fba4895a17
Merge branch 'next-minor' into next-major
2022-10-31 19:11:39 +00:00
Dylan K. Taylor
b6f6671a81
Merge branch 'stable' into next-minor
2022-10-31 15:34:24 +00:00
jasonw_4331
44af519cd6
SpawnResponsePacketHandler: silence PlayerAuthInputPacket debug spam ( #5368 )
2022-10-30 19:24:26 +00:00
Dylan K. Taylor
a9361b3f8b
Changes for 1.19.40
2022-10-25 23:11:41 +01:00
Dylan K. Taylor
d74824c8d5
Correctly use Command->getLabel() instead of Command->getName()
...
getName() essentially serves as an ID for the command for CommandExecutors. It has no other sane use case.
Since it's not unique (multiple commands with the same name may be registered, and the fallback alias will be used on conflict), it cannot be used for array indexing. It's also not correct to use it for any display purpose, since the command may not be able to be invoked by its 'name' if there was a conflict.
There is an open debate about what to do with getName() and the wider CommandExecutor ecosystem, but that's a topic for another discussion.
closes #5344
2022-10-18 19:34:12 +01:00
Dylan K. Taylor
0039af984d
Merge branch 'next-minor' into item-stack-request
2022-10-16 16:56:26 +01:00
Dylan K. Taylor
7bcc663b60
Migrate core code to using symfony/filesystem
...
webmozart/path-util is retained for plugin compatibility, but is dropped in 5.0
2022-10-14 21:51:29 +01:00
Dylan K. Taylor
92783a6db9
Merge branch 'next-minor' into next-major
2022-10-13 21:06:39 +01:00
Dylan K. Taylor
57deb60355
Merge branch 'stable' into next-minor
2022-10-13 21:03:50 +01:00
Dylan K. Taylor
b84c110819
Fix CS according to newest php-cs-fixer
2022-10-13 21:00:57 +01:00
Dylan K. Taylor
774df0fa4c
DataPacketSendEvent: added setPackets()
...
this is an implicit BC break, since plugins may assume that the packets in this array aren't going to change.
However, in practice, it's not likely to cause any real issues.
2022-10-13 17:06:09 +01:00
Dylan K. Taylor
f88ae93897
BC break: Replaced webmozart/path-util with symfony/filesystem, closes #5332
2022-10-13 16:43:36 +01:00