Commit Graph

14027 Commits

Author SHA1 Message Date
7d9f8ff4ed World: do not use static:: for private property access 2021-08-21 15:46:19 +01:00
5f3c9e6f19 Timezone: fix some implicit boolean type conversions 2021-08-21 15:43:30 +01:00
686bf398d5 BlockFactory: simplify get() code 2021-08-21 15:41:00 +01:00
4023a024ce [ci skip] update changelog 2021-08-21 00:15:38 +01:00
14577daae3 fixed build 2021-08-20 23:52:34 +01:00
668df85e3f Merge branch 'stable' 2021-08-20 23:08:17 +01:00
f5a4baf3cf AsyncTask: regroup some methods into more sensible places
how the fuck is anyone supposed to find anything??
2021-08-20 23:00:39 +01:00
eb9188c309 Replace InventoryPickup*Event with EntityItemPickupEvent (#4384)
The rationale here is that inventories don't actually pick items up - their holders do.
It's especially misleading to say that an inventory is picking up an item in creative mode when the picked-up item can't actually be added to the target inventory in the first place.

This change allows a range of new functionality, such as:
- Allowing survival players to pick items up even when their inventories are full, similarly to creative players
- Changing the destination inventory of collected items (e.g. items could be redirected to the offhand or ender chest inventory, while still allowing other plugins to understand what's happening)

As an added bonus, this obsoletes one more use case for Inventory->getHolder(), bringing us one step closer to removing the cyclic reference nightmare from inventories.

The choice of naming (EntityItemPickup, instead of EntityPickupItem) is to be consistent with other events, where the word order is SubjectObjectActionEvent.
2021-08-20 22:59:35 +01:00
34a7405820 Player: fixed player can fly after respawn (#4388) 2021-08-20 22:51:36 +01:00
ff4aa148ef phpstan 0.12.95 2021-08-20 22:47:29 +01:00
e43d39c0bc UpdateChecker: improve type handling 2021-08-20 20:06:09 +01:00
e113981750 UpdateChecker: be less wordy 2021-08-20 19:59:55 +01:00
950dadab0c UpdateChecker: be less noisy
we already have a log prefix, so there's no need for this spam as well.
2021-08-20 19:56:55 +01:00
d488c25a1a Rename AutoUpdater -> UpdateChecker 2021-08-20 19:54:08 +01:00
63e86fe806 Config: fixed incorrect fluent @return annotations 2021-08-20 14:44:59 +01:00
ab05bc7379 Replace some references to Pocket Edition with Bedrock Edition
closes #4387
2021-08-20 14:23:11 +01:00
17c7e25346 resourcepacks: use typed properties in JSON models 2021-08-19 16:12:04 +01:00
5478b7cb63 UpdateInfo: use typed properties 2021-08-19 16:07:11 +01:00
7ba34927c9 Update UpdateInfo JSON model to be compatible with new updater API 2021-08-19 15:57:53 +01:00
bf8b5905e4 Player: Play ItemBreakSounds when items break due to usage
closes #4381
2021-08-19 15:56:40 +01:00
a5b85e095a Fixed some missing function imports
these weren't getting corrected since php-cs-fixer 3.0 due to a change in the default configuration for native_function_invocation. Since the builds are randomly choosing to use php-cs-fixer 2.19 at the moment, the consistency is a problem.
2021-08-19 15:40:43 +01:00
b4b3c21d30 Merge branch 'stable' 2021-08-19 15:39:16 +01:00
1a395a51c9 Fixing function import inconsistencies since php-cs-fixer 3.0 migration 2021-08-19 15:26:45 +01:00
142c8f067b fix CS in php-cs-fixer config
unfortunately i can't seem to make it fix itself
2021-08-19 15:25:20 +01:00
cd3c96aad2 shivammathur/setup-php 2.12.0 2021-08-19 02:31:18 +01:00
19c47fa71f 3.22.3 is next 2021-08-18 14:14:58 +01:00
d670bc8bf8 Release 3.22.2 3.22.2 2021-08-18 14:14:54 +01:00
7bd8d09023 GitHub Actions: automatically build and upload release artifacts, and auto-update update.pmmp.io (#4376) 2021-08-18 14:02:52 +01:00
83805a3406 Entity: use match in checkObstruction() 2021-08-17 20:44:49 +01:00
5a970541f9 actions: use newer pthreads version 2021-08-16 23:15:47 +01:00
e561fa6222 actions: update PHP versions 2021-08-16 23:14:17 +01:00
b3298d7c77 Fix Skull->asItem() (#4375) 2021-08-16 19:06:30 +01:00
a012e7ccc0 VersionInfo: make static methods more constant-like
if we could have class constants declared at runtime, these would be constant.
2021-08-16 16:37:36 +01:00
5da90b9530 Stop auto-translating strings when not asked
fixes #4371
2021-08-15 20:44:27 +01:00
a81680c5c6 missed a few more hardcoded translation keys 2021-08-15 20:12:55 +01:00
039c59856d Remove % translation prefixes dotted around all over the place 2021-08-15 20:03:38 +01:00
39cdf23bd5 Language: Attempt to treat parameters as translation keys, even if they don't have %prefixes
%prefixes should only be necessary for embedded translations where the key isn't at the start of the string.

Longer term we should just drop raw string translation entirely and just translate Translatables exclusively, but this is a stepping stone.
2021-08-15 20:00:58 +01:00
1aa541aefe Utils: remove useless commented code 2021-08-15 19:38:55 +01:00
dfc82f6820 VanillaCommand: fix bogus mixed typehints 2021-08-15 19:32:33 +01:00
60ac76a3bc Remove more usages of hardcoded translation keys 2021-08-15 19:22:40 +01:00
752d1179a1 Do not rely on random translation keys prefixed with % getting translated 2021-08-15 19:05:05 +01:00
715fbc9ee5 fix last remaining non-usages of KnownTranslationFactory 2021-08-15 16:35:51 +01:00
789a669395 Rename TranslationContainer -> Translatable 2021-08-15 16:17:46 +01:00
5bdcc0339f build/generate-known-translation-apis: make the ref to TranslationContainer statically analysable
this ensures that it will follow refactors automatically with no additional changes.
2021-08-15 16:13:07 +01:00
177eecf9ee [ci skip] changelog: mention recent translation changes 2021-08-15 16:04:27 +01:00
db90b40bdd Command: remove unnecessary branching in broadcastCommandMessage()
this problem is handled automatically now that nested translations are supported.
2021-08-15 16:00:16 +01:00
4748b0db37 PluginManager: remove unused import 2021-08-14 21:28:38 +01:00
8b9d7d6390 Support for nested TranslationContainers 2021-08-14 20:57:13 +01:00
804d02b086 TranslationContainer: added prefix(), postfix() and format() 2021-08-14 16:08:22 +01:00
13d4131d0d Remove player update warnings
a player ingame is not going to have access to the terminal to update PM, and if they do, they can see the warning on the console themselves anyway.
2021-08-14 13:27:21 +01:00