8941 Commits

Author SHA1 Message Date
Ali
a45a4a91ae
Call InventoryCloseEvent in Player::removeWindow() (#4142)
closes #4130
2021-04-04 01:07:58 +01:00
Dylan K. Taylor
125837324f
Player: don't dump cursor contents on mouseover interaction
this can fire while the player has the inventory window open, because it also gets sent when the player swaps their held itemstack for something new.

We already had a special-case for mouseover with entity ID 0, but since
this isn't just a zero problem, a more general fix suits better
(particularly since we might need to handle the 0 case anyway).

closes #4140
closes #4141
2021-04-02 21:35:38 +01:00
Ali
609dff1aae
Player: Revert invalid attempts to toggle flight, instead of kicking (#4139)
If allowFlight was toggled by the server (e.g. due to gamemode change), a race could occur due to network latency where the client could try to enable flight, and then get kicked for cheating.

Since this can happen in legitimate, non-cheating cases, we can't make any assumptions about whether a player is cheating, so instead we just revert it, like we do with every other bad input.
2021-04-01 17:57:26 +01:00
Dylan K. Taylor
b03212053c
3.18.2 is next 2021-03-28 21:24:07 +01:00
Dylan K. Taylor
fd4ac885bb
Release 3.18.1 2021-03-28 21:24:03 +01:00
Dylan K. Taylor
34c2b62ffe
Remove unused import 2021-03-28 19:12:18 +01:00
Dylan K. Taylor
e42a691da9
Strip trailing whitespace 2021-03-28 19:02:51 +01:00
Ali
3b3fb5e662
fix ItemFrames (#4101)
removing items from item frames was broken due to behavioural changes in 1.16.210.
2021-03-28 18:53:46 +01:00
Dylan K. Taylor
4abf4aecad
MainLogger: fixed potential deadlock during syncFlushBuffer()
the notify() to flush the buffer might arrive in between the writeLogStream() and synchronized() calls in the thread body, resulting in a deadlock if the logger thread managed to call wait() before the main thread did.
2021-03-28 18:10:23 +01:00
Dylan K. Taylor
4bc57f00b8
Updated LevelSoundEventPacket constants 2021-03-23 23:36:48 +00:00
Dylan K. Taylor
ff61e1e018
ClientCacheBlobStatusPacket: fixed field order
miss comes first, not hit.
2021-03-23 19:52:25 +00:00
Dylan K. Taylor
fb20bb3832
Don't handle NAN/INF in movements 2021-03-23 14:54:39 +00:00
Dylan K. Taylor
c7cdaeae85
Revert "Backport InventoryTransactionPacket impl from PM4"
This reverts commit cb06be615aa3780d4c83a947520fa55c0d908618.

we can't push this to stable because it would break plugins without any
way to know (no protocol or API change).

At most, this should have been wrapped into a protocol change.
2021-03-22 21:21:11 +00:00
Dylan K. Taylor
cb06be615a
Backport InventoryTransactionPacket impl from PM4
this version is far better, and we're going to need it to deal with the PlayerAuthInputPacket bullshit.
2021-03-19 22:16:30 +00:00
Dylan K. Taylor
3667e95ff6
Added PlayerAuthInputFlags 2021-03-19 21:41:22 +00:00
Dylan K. Taylor
0e2dc51ec8
added some missing things to the protocol 2021-03-19 21:09:53 +00:00
Dylan K. Taylor
1bb2d162ab
Simplify CommandReader
while stream_select() doesn't work on pipes, if it ever starts working properly in the future, we'll need this code. In the meantime, it's harmless (it just immediately returns 1 anyway).
2021-03-16 21:42:35 +00:00
Nick
ee868bcccc
update argument type constants (#4082) 2021-03-15 18:22:01 +00:00
Yosshi999
cbc8576d4a
Implement UPnP support without dotNET (#3378)
UPnP forwarding is now available on all supported platforms.
com_dotnet is no longer required for UPnP forwarding to work.

Closes #3216 .
2021-03-14 22:50:33 +00:00
Dylan K. Taylor
edcf296086
RakLibInterface: fixed server being unjoinable if gamemode is Spectator
closes #4069
this happens because the client bans any server that has an invalid pong, which is very stupid in this case because the gamemode isn't even shown on the UI anyway ...
2021-03-14 20:35:17 +00:00
Dylan K. Taylor
a0368a843e
3.18.1 is next 2021-03-12 22:07:01 +00:00
Dylan K. Taylor
3f64906263
Release 3.18.0 2021-03-12 22:07:01 +00:00
Dylan K. Taylor
4816a66fb8
Baseline protocol changes for 1.16.210
this is not a complete changeset, but it's sufficient to get servers back online.
There are additional changes to PlayerAuthInputPacket which need to be reversed.
2021-03-12 21:41:48 +00:00
Dylan K. Taylor
5b8166c1f0
3.17.8 is next 2021-03-11 00:22:17 +00:00
Dylan K. Taylor
30c5cad5b3
Release 3.17.7 2021-03-11 00:22:17 +00:00
Dylan K. Taylor
f95fcecb5b
3.17.7 is next 2021-03-10 20:49:10 +00:00
Dylan K. Taylor
61391b6e23
Release 3.17.6 2021-03-10 20:48:57 +00:00
Dylan K. Taylor
fbb6f1f81c
Workaround for cursor sync in 1.13+, closes #4059 2021-03-07 21:17:52 +00:00
Dylan K. Taylor
ed84252942
Player: Improved XUID verification
we check if an existing player is online with a matching XUID first; if there isn't, we don't bother loading the playerdata, since that other player couldn't have joined unless they had a match or were allowed to bypass.
2021-03-07 19:53:19 +00:00
Dylan K. Taylor
e755e1dc23
ResourcePackClientResponsePacket: fixed non-deterministic decoding 2021-02-27 01:08:18 +00:00
Dylan K. Taylor
78f9985377
Player: fixed PlayerMoveEvent->getFrom() returning unexpected results on movement reversion
fixes #4043
2021-02-26 00:30:42 +00:00
Dylan K. Taylor
fac2bd3379
Liquid: mark getSmallestFlowDecay() as impure
this fixes two bogus PHPStan warnings.
2021-02-25 22:41:07 +00:00
Dylan K. Taylor
fcfd51dfc7
CrashDump: do not put FALSE into crashdumps in case file_get_contents() failed 2021-02-23 19:39:21 +00:00
Dylan K. Taylor
ccc76cf338
Make less noise about XBL being enabled
this has been in force for years now, it's expected by now.
2021-02-23 19:25:22 +00:00
Dylan K. Taylor
edbc73a72c
3.17.6 is next 2021-02-16 22:13:05 +00:00
Dylan K. Taylor
3a0c8dd594
Release 3.17.5 2021-02-16 22:13:05 +00:00
Dylan K. Taylor
16fa26405a
Remove remaining usages of LevelDB::close()
this is handled by the object destructor.

closes #4035
2021-02-15 20:10:11 +00:00
Dylan K. Taylor
094102fe92
fopen() might return FALSE if permission was denied to read/write the file 2021-02-12 16:16:36 +00:00
Dylan K. Taylor
2aef83e7d7
MainLogger: fix type ambiguity 2021-02-12 15:05:24 +00:00
Dylan K. Taylor
18666e5a60
Be compatible with newest versions of php-leveldb 2021-02-11 22:33:29 +00:00
Dylan K. Taylor
2a51269305
Merge branch 'stable' of https://github.com/pmmp/pocketmine-mp into stable 2021-02-11 16:05:24 +00:00
Dylan T
007f4f9350
CraftingDataPacket: Remove useless @var comment 2021-02-08 11:53:50 +00:00
Dylan K. Taylor
46e9f0cec6
Player: fixed verify-xuid not kicking in by default on old configs 2021-02-07 21:10:23 +00:00
Dylan K. Taylor
78a62a8b27
Remember and verify player XUIDs (controlled by player.verify-xuid in pocketmine.yml) 2021-02-05 14:42:57 +00:00
Dylan K. Taylor
7e3e63f342
Fixed race condition in MainLogger shutdown
this resulted in a deadlock in https://github.com/pmmp/PocketMine-MP/runs/1831812620?check_suite_focus=true because the notify() arrived while writeLogStream() was executing.
This ensures that either:
- the notification will occur before the sleep, and therefore no sleeping will occur (this->shutdown = true before the wait)
- the notification will arrive during the sleep.
2021-02-04 16:40:10 +00:00
Dylan K. Taylor
8ef1e54e20
MainLogger: fixing CPU waste on logger thread
this doesn't need to keep spinning every 25ms; it can just wake up when there's actually log messages to write into the buffer.
2021-02-04 15:07:40 +00:00
Dylan K. Taylor
eaf3a86981
MainLogger: fixed UB in writeLogStream()
notify() has to be used inside a synchronized block.
2021-02-04 15:03:14 +00:00
Dylan K. Taylor
317a48d9b0
ItemStackRequest: expose filterStrings 2021-02-03 23:40:34 +00:00
Dylan K. Taylor
bc14660e55
Added missing ItemStackRequest protocol changes 2021-02-03 23:37:41 +00:00
Dylan K. Taylor
4771e3dc28
3.17.5 is next 2021-02-02 14:04:51 +00:00