Commit Graph

732 Commits

Author SHA1 Message Date
b329cac3d2 Move pocketmine\tile\* to pocketmine\block\tile\* 2019-05-25 19:23:43 +01:00
3ea8da2dd3 Use EnumTrait->equals() instead of direct comparison
It's not guaranteed that objects provided are the same as those in the enum registry, so they can't be directly compared.

Implementing comparison with === would require some kind of __equals() implementation or an extension to hook into such functionality.
2019-05-24 17:21:44 +01:00
9ea684581f Merge remote-tracking branch 'origin/stable' 2019-05-13 18:17:42 +01:00
5a351d3caf Fix for Server::hasOfflinePlayerData (#2919) 2019-05-12 12:06:05 +01:00
cb3a225d45 Merge remote-tracking branch 'origin/stable' 2019-05-07 17:28:07 +01:00
3cd6e12e71 Renaming "Level" -> "World" (#2907)
This has been a pain point for a long time due to the misleading nature of the name "level". It's also confusing when trying to do things like getting the XP level of the player or such, and also does not translate well to other languages.

This transition was already executed on the UI some time ago (language strings) and now it's time for the same change to occur on the API.

This will burn a lot of plugins, but they'll acclimatize. Despite the scary size of this PR, there isn't actually so many changes to make. Most of this came from renaming `Position->getLevel()` to `Position->getWorld()`, or cosmetic changes like changing variable names or doc comments.
2019-05-07 14:47:28 +01:00
427e334426 rename PacketStream to PacketBatch 2019-05-06 19:58:02 +01:00
ce61c6e0fd PacketStream: added fromPackets() sugar 2019-05-06 19:54:42 +01:00
6d64ef8d74 Server: fixed crash reporting bug introduced by a6e5b6e158 2019-05-05 20:52:52 +01:00
13ea984b12 Server: setup world things at a more appropriate time
closes #2859

this also fixes reported headaches attempting to override generators before world load.
2019-05-02 15:02:10 +01:00
293311569d Merge branch 'next-minor' 2019-05-01 18:55:49 +01:00
932c489de1 Rename addTitle/addSubTitle/addActionBarMessage prefixes to "send", deprecated old variants
closes #2896

these deprecated methods will be removed in 4.0.
2019-05-01 18:54:20 +01:00
8a1c362db7 Server: remove dead function getDefaultGamemode()
this was functionally identical to getGamemode() and is now just a red herring.
2019-04-13 14:31:58 +01:00
612e9e162c Fixed worlds with unknown generators silently getting wrong generator, closes #2860 2019-04-06 15:17:36 +01:00
42a263a9df GameMode is now an enum 2019-03-31 16:19:36 +01:00
f638845ef6 Merge branch '3.7' 2019-03-29 15:16:27 +00:00
8e9f787d33 Implement runtimeID table randomization, closes #2841 2019-03-29 14:35:06 +00:00
de193d41a0 Server: fixed console not receiving user broadcast channel messages
I'm not entirely clear how this managed to work to begin with really, but it's now fixed properly.
2019-03-27 23:53:39 +00:00
0e806854b9 Server: clean up startup order a little 2019-03-27 19:16:39 +00:00
3de08bf452 Convert PluginLoadOrder into enum 2019-03-27 18:28:40 +00:00
7333e7118e Server: remove useless function 2019-03-26 15:52:34 +00:00
01e048c4d1 Move networkStart message to where we actually start network
i.e. the point at which a normal user can reasonably expect to be able to connect to the server ...
2019-03-26 14:07:32 +00:00
999174b0a7 Server: Delay RakLib start until after world loading
fixes #2816
2019-03-25 14:49:12 +00:00
23071d257e Extract process-related functions from Utils into a separate Process class 2019-03-24 18:57:32 +00:00
6990d6239e Network: Added RawPacketHandler interface, query handler is now a component 2019-03-24 18:02:19 +00:00
a753c1342d Clean up Query cache handling, remove useless timeouts
the timeout was entirely useless, because:
- when shorter than 25.6 seconds (512 ticks) it would cause caches to be needlessly destroyed and regenerated
- when longer than 25.6 seconds, just made outdated caches persist for longer, even after the query info was regenerated.

This now uses a mark-dirty model to deal with caches, which means that plugin modifications to the query data will be reflected immediately, regardless of when they are made. Previously, modifying the result of Server->getQueryInformation() would have inconsistent results.
2019-03-24 17:43:02 +00:00
9c76fb7d96 Implemented plugin loading whitelist/blacklist by config file (#2783) 2019-03-24 16:18:13 +00:00
433dab078b DataPacket events now use network sessions instead of players 2019-03-23 09:52:03 +00:00
afbd016611 Server: remove useless function 2019-03-22 19:38:33 +00:00
712e077bc1 Server: remove useless debug message
leveldb is now mandatory, so this message will always be emitted.
2019-03-22 19:31:10 +00:00
d03f0aab37 Remove /reload (#2823)
For many years, this has been the cause of many users (particularly plugin devs) confusion. The reality is that /reload has little to no practical value. It does not reload plugin source code (contrary to popular belief).
2019-03-22 15:01:11 +00:00
8c536c248d Updating for latest PocketMine-NBT changes 2019-03-21 15:58:22 +00:00
c3d80d711d Fixed autosave time report measurement not using correct unit (as per master) 2019-03-20 19:01:10 +00:00
a1ffaffa7f Don't record player on stats until they actually exist 2019-03-14 14:46:19 +00:00
26a5d97499 Some cleanup to player net session handling for connect/disconnect 2019-03-14 14:32:43 +00:00
a0a8026cba Implemented automatic world format conversion 2019-03-10 19:53:23 +00:00
562179bdd6 Backport 58cafc853f: s/level/world (strings only)
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
2019-03-10 11:35:46 +00:00
a1d50de12e OOF 2019-03-09 19:31:13 +00:00
0659d2fbef Backport 6bd43a8215: Firehose auto-tick-rate anti-feature, closes #2665 2019-03-09 19:20:53 +00:00
10612acace Partial backport of 2bffd5cc1c to 3.6 2019-03-09 19:10:09 +00:00
1d810f8aeb Backport c3e66e0adc to 3.6 2019-03-09 19:09:05 +00:00
f87dac7bb2 Merge branch '3.6' 2019-03-04 12:02:36 +00:00
20a25a69df Force emission of output buffer contents on crash 2019-03-04 12:01:30 +00:00
6c8fa8ae28 More nullable and void typehints 2019-03-02 10:29:11 +00:00
c26544475e More PHP 7.1 nullables 2019-02-22 12:55:34 +00:00
58cafc853f s/level/world (strings only)
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
2019-02-20 15:33:46 +00:00
18440f612f Merge branch '3.6' 2019-02-10 17:40:09 +00:00
9ba4144a71 Server: remove useless gc_collect_cycles()
the server is shutting down at this point so who cares if there are cycles...
2019-02-10 17:15:41 +00:00
b6bcb47deb Network->unregisterInterface() is now less useless
Interfaces are now automatically shut down when unregistered.
2019-02-10 17:07:58 +00:00
ad6ae20d6b Server: fixed getOfflinePlayerData() trying to load terrain (?!?!?!?), closes #2725
getOfflinePlayerData() will now return NULL if there is no stored data for a given player. The responsibility of checking the spawn point is now delegated to the Player, after it registers a chunk loader on its spawn chunk.
2019-02-04 19:51:11 +00:00