Commit Graph

12173 Commits

Author SHA1 Message Date
a71b111b50 TaskScheduler: get rid of cancelTask()
developers should be using TaskHandler->cancel() instead.
2020-07-08 11:49:43 +01:00
da798817b5 Merge branch 'stable'
# Conflicts:
#	changelogs/3.14.md
#	resources/vanilla
#	src/VersionInfo.php
#	src/entity/Attribute.php
2020-07-08 11:46:02 +01:00
b2249f93c0 TaskHandler: bail if given a task that already has a handler
This fixes undefined behaviour when scheduling the same task twice. This is usually accidental and almost never desirable.
Note that this still allows a task to be scheduled again after it has
been cancelled; it only disallows scheduling a task multiple times
concurrently.

This commit will probably break MyPlot and other plugins that have
self-scheduling tasks, but as far as I can tell those use-cases should
be replaced with self-cancelling repeating tasks anyway.
2020-07-08 11:02:33 +01:00
303344783a CheckTestCompletionTask: use TaskHandler->cancel() 2020-07-08 10:57:20 +01:00
75e0844ff5 MainLogger: log stack traces with CRITICAL level
maybe this will get people to send the whole thing instead of just the error message? ...
2020-07-08 10:45:15 +01:00
18fabf5466 3.14.2 is next 2020-07-08 10:32:07 +01:00
2751c59979 Release 3.14.1 3.14.1 2020-07-08 10:32:07 +01:00
d99ffbd66c Attribute: register lava_movement attribute
this is purely to fix crashes when decoding net packets
2020-07-08 10:21:20 +01:00
b79aa04530 remove unused FileWriteTask 2020-07-07 21:21:13 +01:00
7106ff575c End abuse of PluginCommand by making it final
PluginCommand should be better-named CommandExecutorCommand or perhaps CallbackCommand. It's not supposed to be extended by plugins.
2020-07-07 19:42:47 +01:00
909f3f39de Block: get rid of getRuntimeId()
the runtime ID mapping should be non-global in case of multiple protocols.
2020-07-06 11:18:29 +01:00
ad99dc5884 ChunkSerializer micro optimisation: reduce indirections when writing runtime IDs 2020-07-05 22:00:42 +01:00
0188323d74 fixed a bunch of NBT-related phpstan level 8 errors 2020-07-05 21:01:13 +01:00
68c408268c Separate dye colour ID management from DyeColor enum 2020-07-05 19:04:22 +01:00
bf5da596f7 Get rid of WALL metadata mapping 2020-07-05 18:27:10 +01:00
79d8bf898a Moved glazed-terracotta ID-mapping table to BlockLegacyIdHelper 2020-07-05 18:20:41 +01:00
eddb2b7fdd Moved some legacyID mapping code to a separate BlockLegacyIdHelper
this makes the code more reusable and will facilitate getting rid of legacy IDs from within the core code.
2020-07-05 16:52:42 +01:00
2219f61ea0 BlockLegacyMetadata: added constants for chemistry table variants 2020-07-05 11:13:29 +01:00
ae179e5039 fix interacting with anvil & enchanting table inventories 2020-07-04 23:46:26 +01:00
d840e8c4d4 Merge commit 'a34f3261c'
# Conflicts:
#	resources/vanilla
#	src/event/entity/EntityExplodeEvent.php
#	src/pocketmine/event/block/SignChangeEvent.php
#	src/utils/Utils.php
2020-07-04 22:39:40 +01:00
c35a596079 Merge commit '8ce0022de'
# Conflicts:
#	resources/vanilla
#	src/network/mcpe/protocol/types/inventory/NetworkInventoryAction.php
2020-07-04 22:34:01 +01:00
991abe8864 Merge commit 'fb6491dde'
# Conflicts:
#	resources/vanilla
2020-07-04 22:25:56 +01:00
5cf74fc16b Merge commit '3b961d0e5'
# Conflicts:
#	resources/vanilla
2020-07-04 22:25:23 +01:00
76cf3b7aa5 Merge commit 'a60fc4cc2'
# Conflicts:
#	resources/vanilla
2020-07-04 22:24:33 +01:00
373783d99b Merge commit 'b747899fd'
# Conflicts:
#	resources/vanilla
2020-07-04 22:23:26 +01:00
740ed2013f Merge commit '57b6451e1'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/block/Ladder.php
2020-07-04 22:22:22 +01:00
172830fc44 Merge commit '8cf025a2d'
# Conflicts:
#	resources/vanilla
2020-07-04 22:20:42 +01:00
e9eadd3a26 Merge commit '8480ee82e'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
#	src/pocketmine/block/CraftingTable.php
2020-07-04 22:19:43 +01:00
a34f3261cb event: harden APIs that accept arrays
plugin devs can't be relied on to pass the proper types to these APIs, and when the wrong types get passed it makes type errors appear from inside the internals.
2020-07-04 21:55:23 +01:00
8ce0022de6 protocol: added UUInventorySlotOffset constants 2020-07-04 21:37:37 +01:00
1d18662d9b InventoryAction: replace isValid() with validate() which throws TransactionValidationException 2020-07-04 19:38:34 +01:00
fb6491ddeb BanListCommand: sort output into lexical order 2020-07-03 11:23:00 +01:00
3b961d0e5f WhitelistCommand: sort output of /whitelist list into lexical order 2020-07-03 11:19:23 +01:00
a60fc4cc28 ListCommand: sort output into lexical order 2020-07-03 11:15:31 +01:00
b747899fdd PluginsCommand: sort plugins list into lexical order 2020-07-03 11:13:32 +01:00
cf5e31c619 InventoryTransaction::execute() now throws exceptions instead of returning true/false 2020-07-01 14:08:28 +01:00
30591d047c PacketBatch: added a getPackets() method which encapsulates some logic 2020-07-01 13:38:06 +01:00
29612cded3 CraftingTransaction: make CraftingManager injectable
this becomes a bit easier to unit-test.
2020-07-01 13:38:06 +01:00
96541763f1 ConsoleCommandSender: inject Language via constructor 2020-07-01 13:38:05 +01:00
7f81507ea1 Add Releasable interface (#3664)
closes #3301
2020-06-30 21:09:10 +01:00
74a919353f Food: remove unused import 2020-06-29 22:52:04 +01:00
8b87cf73b9 Player->setSpawn() now accepts NULL (fallback to world spawn) 2020-06-29 22:51:02 +01:00
c0af05fcad phpstan: clean some errors from level 8 baseline 2020-06-29 22:42:46 +01:00
fc60abe5e5 Player: fixed a few phpstan level 8 warnings 2020-06-29 22:41:17 +01:00
2cd67aed72 Block: fixed crash on block factory clone 2020-06-29 22:40:35 +01:00
69fb2786c6 Player: fixed spawn position sticking to old world spawn when new world spawn is set
this will still take effect for preexisting data because the server will still see previously set spawns as custom, but for new players, their spawns will follow the world spawn unless they sleep in a bed.
2020-06-29 22:32:00 +01:00
da3f0752a6 Block: make getAllSides() and getHorizontalSides() use underlying Vector3 generators 2020-06-29 22:13:07 +01:00
8673a4872e InventoryEvent: fix wrong return type on getViewers() 2020-06-29 21:55:21 +01:00
670ad9eb9d Position: rename getWorldNonNull() to getWorld(), remove original getWorld() 2020-06-29 21:19:46 +01:00
fc22fd80d8 Eradicate remaining usages of Position->getWorld() 2020-06-29 21:03:55 +01:00