730 Commits

Author SHA1 Message Date
Muqsit Rayyan
11f35d28c2 Call PlayerInteractEventm when receiving ItemFrameDropItemPacket to allow plugins to prevent item frame item removal (#887) 2017-05-05 11:18:58 +01:00
Dylan K. Taylor
eaef2bd169 Fixed some inspections 2017-05-04 12:19:50 +01:00
TheDiamondYT1
653b6b55a9 Added title command and API for resetting title duration 2017-04-27 16:38:51 +01:00
Dylan K. Taylor
84ec944b6b Use short class names for unhandled packet logging, added some documentation 2017-04-27 12:16:24 +01:00
Dylan K. Taylor
d682fdfdf0 Food and exhaustion should not apply in creative, close #860 2017-04-24 13:31:05 +01:00
Dylan K. Taylor
0e7f364a41 Fixed chunk object memory leak when chunks are changed, close #419
If a player quit the server in the 1-second between a chunk changing and a fresh chunk-order requesting a resend of that chunk, the player wouldn't know they were using that chunk and did not unregister themselves, causing the subject chunks to always remain loaded.
2017-04-24 11:55:33 +01:00
Dylan K. Taylor
6ece57e23e Merge changes from master 2017-04-21 22:48:18 +01:00
Dylan K. Taylor
2204942338 Fixed the half-done hunger implementation, fixed lots of bugs related to hunger
- Fixed starvation doesn't deal any damage at all (Human->getFood() returns a float, not an int, === 0 won't work so great)
- Added exhaustion for sprinting, walking, jumping and sprint-jumping as per MCPE (these use MCPE values, and yes MCPE does walking exhaustion!)
- Fixed attributes don't get reset after player death
- Added food and hunger regeneration in peaceful difficulty
- Added API methods Living->jump() (motion isn't updated yet, so this won't actually do much if plugins try to use it) and Living->getJumpVelocity()

TODO: implement exhaustion for swimming
2017-04-21 19:48:25 +01:00
Dylan K. Taylor
00a226921c Fixed server crash when taking damage after being killed when having Health Boost effect 2017-04-21 18:52:04 +01:00
Dylan K. Taylor
86de0bddd9 World should only be completely immutable if we're in spectator mode
Fixes being unable to break any blocks at all in adventure mode
2017-04-18 20:01:51 +01:00
Dylan K. Taylor
4ab8233fe0 Fixed shooting bow while sprinting, close #827 2017-04-14 15:27:32 +01:00
Muqsit Rayyan
319763dd93 Fix #823
Thanks to @SuperMaXAleX
2017-04-13 22:32:53 +03:00
Sandertv
1c7773c5f1 Visibility keyword before final or abstract keyword. (#814) 2017-04-13 20:58:53 +08:00
Dylan K. Taylor
cb7264e0e5 Hexdump unhandled packets 2017-04-12 11:20:58 +01:00
Dylan K. Taylor
f7e1939ae8 Changed some handling of unknown packet content 2017-04-12 11:16:50 +01:00
Dylan K. Taylor
e312c697fd Merge master into api3/network 2017-04-10 21:21:29 +01:00
Luke | 14
80292c6c7a Actually use iusername instead of repeatedly lowercasing player names (#811)
#blameshoghi
2017-04-10 21:15:38 +01:00
Dylan K. Taylor
874afc2fd2 fixed players need to move to pick up dropped items, close #498 2017-04-01 19:33:16 +01:00
Dylan K. Taylor
b24d516eda Send TransferPacket with immediate priority, should fix #497 2017-04-01 10:40:05 +01:00
Dylan K. Taylor
7f838a8c36 Fixed crashes due to adding players 'online' far too early, fixed some Player save logic 2017-03-31 13:45:28 +01:00
Dylan K. Taylor
69ac80518c some improvements to the horrendous mess that is the handling of joining and quitting, fixed some crashes, probably caused some other crashes
I can't fix this completely because it's just too much of a fucking mess. NEED to separate network stuff from Player.
2017-03-30 19:33:47 +01:00
Dylan K. Taylor
45e5b6b04c Do not subscribe to broadcast permissions until the player spawns
This is unnecessary since the player won't see any messages sent before they spawn anyway. This was also causing an occasional client-sided crash due to TextPackets being sent to players at bad times during the login sequence.
2017-03-30 16:29:18 +01:00
Dylan K. Taylor
cb059ea713 fix some PhpStorm inspections 2017-03-30 12:10:59 +01:00
Dylan K. Taylor
6b747f9272 Added basic API for working with titles 2017-03-29 20:02:16 +01:00
madecode15
c84ec90398 Set forceMovement to null when player is closed (#472)
Cater for the very very very slim chance that a player could quit while teleporting, be leaked and then have their level unloaded and leak their level.
2017-03-29 09:20:31 +01:00
Dylan K. Taylor
3e76c3a6dd Added handling for tile picking, added API for setting item lore
worked almost out of the box (some W10 equipment bugs though)
2017-03-28 18:47:51 +01:00
Dylan K. Taylor
52f2596dc5 Merge branch 'master' into api3/network 2017-03-28 12:27:40 +01:00
Dylan K. Taylor
2079e2fd88 Fixed entity visibility Player object memory leak, close #416 2017-03-28 12:26:02 +01:00
Dylan K. Taylor
07f32765ba Merge branch 'api3/network_mcpe-1.0.5' into api3/network 2017-03-26 18:52:30 +01:00
Dylan K. Taylor
788bd6fc20 Fixed resource packs/login sequence fail, added basic safety restrictions for packet sending before clients are logged in
close #452
2017-03-26 14:42:23 +01:00
Dylan K. Taylor
01440fb659 Fixed players receiving double SetEntityMotionPackets for themselves 2017-03-26 13:40:39 +01:00
Dylan K. Taylor
dda8c6cc8f Removed a condition that's been useless almost since the beginning of PocketMine
This condition has been useless since before NBT was introduced to PocketMine.
If there was a use for it, it should have been placed BEFORE anything attempted to read from the NBT.

However, Server now handles bad data automatically now, so Server->getOfflinePlayerData() will never _not_ return a CompoundTag. Hence I've added a CompoundTag type-hint.
2017-03-26 13:20:46 +01:00
Dylan K. Taylor
bb79684480 Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-25 21:31:48 +00:00
Dylan K. Taylor
4245274aec Merge branch 'master' into api3/network 2017-03-25 21:26:46 +00:00
Dylan K. Taylor
a5a51fb9c5 Merge branch 'master' into api3/network_mcpe-1.0.5 2017-03-21 10:47:41 +00:00
Irish
06f2a9c674 Fix client-side death bug (#438) 2017-03-20 12:21:58 +00:00
Dylan K. Taylor
0e64d4bbc2 Given Player->iusername a use, added Player->getLowerCaseName()
Micro optimizations by not repeatedly lowercasing names when searching
2017-03-20 12:21:02 +00:00
Dylan K. Taylor
284c18d401 Added debug for mismatched item equipment
tool damage packets sent in the wrong order?
This could be bad for performance since the entire inventory is resent every time this issue crops up.
2017-03-20 10:58:43 +00:00
Dylan K. Taylor
6ba4a8fe5c Moved batch packet handling into BatchPacket->handle(), fixed data packet receive timings to include MCPE packet decode time 2017-03-20 10:26:53 +00:00
Dylan K. Taylor
4638ccbb68 Remove this workaround (client bug fixed in 1.0.5 beta) 2017-03-19 21:58:12 +00:00
Dylan K. Taylor
36cda5de61 Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-19 21:54:14 +00:00
Dylan K. Taylor
9c350dbe47 Fixed DataPacketReceiveEvent, fixed packet receive timings, gave Player->handleDataPacket() a new use 2017-03-19 21:50:09 +00:00
Dylan K. Taylor
be449b6106 Removed useless condition from RemoveBlockPacket handler 2017-03-19 10:32:54 +00:00
Dylan K. Taylor
ab1150382a Merge branch 'api3/network' into api3/network_mcpe-1.0.5 2017-03-18 16:30:06 +00:00
Dylan K. Taylor
8114ceaf68 Merge branch 'master' into api3/network 2017-03-18 16:29:38 +00:00
Dylan K. Taylor
b7b73aab23 Fixed username regex failing, close #427 2017-03-15 19:22:43 +00:00
Dylan K. Taylor
d26713ab59 Use assoc instead of object for command data, fix data modifications affecting all commands
how did I do manage to do somthing this stupid -_- smh what an idiot
Lucky permission is a root node, or the whole commands system would've been compromised. Epic fail.
2017-03-14 11:39:59 +00:00
Dylan K. Taylor
3c709b1d3e Return false on unhandled/unknown resource pack client response status 2017-03-13 15:52:00 +00:00
Dylan K. Taylor
bb85308b01 Fix undefined variable 2017-03-13 09:46:39 +00:00
Dylan K. Taylor
565335f29e Revert "TODO: REVERT - Added a workaround for client text duplication"
This reverts commit 52748fcf64830453967fab4b43d6e823aeb37ecf.
2017-03-12 16:18:30 -04:00