13456 Commits

Author SHA1 Message Date
Dylan K. Taylor
17c7e25346
resourcepacks: use typed properties in JSON models 2021-08-19 16:12:04 +01:00
Dylan K. Taylor
5478b7cb63
UpdateInfo: use typed properties 2021-08-19 16:07:11 +01:00
Dylan K. Taylor
7ba34927c9
Update UpdateInfo JSON model to be compatible with new updater API 2021-08-19 15:57:53 +01:00
Dylan K. Taylor
bf8b5905e4
Player: Play ItemBreakSounds when items break due to usage
closes #4381
2021-08-19 15:56:40 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
b4b3c21d30
Merge branch 'stable' 2021-08-19 15:39:16 +01:00
Dylan K. Taylor
19c47fa71f
3.22.3 is next 2021-08-18 14:14:58 +01:00
Dylan K. Taylor
d670bc8bf8
Release 3.22.2 2021-08-18 14:14:54 +01:00
Dylan T
7bd8d09023
GitHub Actions: automatically build and upload release artifacts, and auto-update update.pmmp.io (#4376) 2021-08-18 14:02:52 +01:00
Dylan K. Taylor
83805a3406
Entity: use match in checkObstruction() 2021-08-17 20:44:49 +01:00
marshall
b3298d7c77
Fix Skull->asItem() (#4375) 2021-08-16 19:06:30 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
5da90b9530
Stop auto-translating strings when not asked
fixes #4371
2021-08-15 20:44:27 +01:00
Dylan K. Taylor
a81680c5c6
missed a few more hardcoded translation keys 2021-08-15 20:12:55 +01:00
Dylan K. Taylor
039c59856d
Remove % translation prefixes dotted around all over the place 2021-08-15 20:03:38 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
1aa541aefe
Utils: remove useless commented code 2021-08-15 19:38:55 +01:00
Dylan K. Taylor
dfc82f6820
VanillaCommand: fix bogus mixed typehints 2021-08-15 19:32:33 +01:00
Dylan K. Taylor
60ac76a3bc
Remove more usages of hardcoded translation keys 2021-08-15 19:22:40 +01:00
Dylan K. Taylor
752d1179a1
Do not rely on random translation keys prefixed with % getting translated 2021-08-15 19:05:05 +01:00
Dylan K. Taylor
715fbc9ee5
fix last remaining non-usages of KnownTranslationFactory 2021-08-15 16:35:51 +01:00
Dylan K. Taylor
789a669395
Rename TranslationContainer -> Translatable 2021-08-15 16:17:46 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
4748b0db37
PluginManager: remove unused import 2021-08-14 21:28:38 +01:00
Dylan K. Taylor
8b9d7d6390
Support for nested TranslationContainers 2021-08-14 20:57:13 +01:00
Dylan K. Taylor
804d02b086
TranslationContainer: added prefix(), postfix() and format() 2021-08-14 16:08:22 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
ecdfd9ea26
Terminal: reduce code duplication in getFallbackEscapeCodes() 2021-08-13 14:04:13 +01:00
Dylan K. Taylor
78c2dcaee5
Terminal: fixed crash on platforms which don't support tput fully
in 8-bit colour mode, it seems that ITALIC is not supported. This only showed its face now because of typed properties.
closes #4365
closes #4366
2021-08-13 14:00:17 +01:00
Dylan K. Taylor
2ca7fc7254
Server: add native return types to getters that were skipped first time 2021-08-12 23:56:43 +01:00
Dylan K. Taylor
0e0bbdfb70
Use typed properties in Server 2021-08-12 23:52:39 +01:00
Dylan K. Taylor
e907c70160
... 2021-08-12 23:37:24 +01:00
Dylan K. Taylor
34309bc810
TextFormat: do not assume that an array given to toHTML() is actually a tokenized string
this is a far stretch, since the documentation doesn't mention that the string needs to be tokenized. Anyone passing an array in here is most likely doing so by mistake.
2021-08-12 23:37:00 +01:00
Dylan K. Taylor
a59ac522ee
Terminal: do not assume that an array given to toANSI() is actually a tokenized string
this is a far stretch, since the documentation doesn't mention that the string needs to be tokenized. Anyone passing an array in here is most likely doing so by mistake.
2021-08-12 23:35:45 +01:00
Dylan K. Taylor
ab232ee759
Merge branch 'master' of github.com:pmmp/PocketMine-MP 2021-08-12 23:32:05 +01:00
Dylan K. Taylor
d30371be11
Command: Assume that TranslationContainer->getText() returns a valid translation key
there's no reason for it not to be.
2021-08-12 23:31:37 +01:00
Rush2929
58bc9332cd
Workaround for offhand sync (#4359)
fixes #4231
2021-08-12 23:27:53 +01:00
Dylan T
27e0ecf7ee
Implemented Blast Furnace and Smoker (#4362) 2021-08-12 23:27:05 +01:00
Dylan K. Taylor
fd41a0f510
Remove colors from VersionCommand
these will have to stay gone for now, until we have some way to terminate formatting codes without breaking logger output. (we need &p!! #4364)
2021-08-12 20:35:34 +01:00
Dylan K. Taylor
6a2a4cca4d
Terminal: use match instead of switch in toANSI()
phpstan seems to have some trouble with large match statements (phpstan/phpstan#5454)
2021-08-12 20:13:44 +01:00
Dylan K. Taylor
2782af7e22
Terminal: use typed properties 2021-08-12 19:41:16 +01:00
Dylan K. Taylor
4d683c63d8
TextFormat: remove toJSON()
this is not used in the PM core, and is only used by 1 plugin in the whole public ecosystem: BigBrother. It makes more sense to make BigBrother maintainers shoulder the responsibility of maintaining this code, since they are the only ones that need it - besides, if this changed in any MCJE update in the last 5y, nobody has updated it, and nobody has maintained it either due to not having a fucking clue what the thing is for (the documentation is basically nonexistent).
2021-08-12 13:43:58 +01:00
Dylan K. Taylor
eb24e040f3
TextFormat: add COLORS and FORMATS constants 2021-08-12 13:13:33 +01:00
Dylan K. Taylor
28bfe9fbb4
emit_performance_warnings(): Log a warning when using a PHP debug build 2021-08-11 20:14:03 +01:00
Dylan K. Taylor
99e68fb5d3
Merge branch 'master' of github.com:pmmp/PocketMine-MP 2021-08-10 19:48:39 +01:00
Dylan K. Taylor
f42c9bb6d6
Removed unused translation 2021-08-10 19:48:30 +01:00
Rush2929
cf77b33c3b
Bows can now use offhand arrows (#4356) 2021-08-10 19:36:57 +01:00
Dylan K. Taylor
2cdd6e634f
New /version format 2021-08-10 19:32:28 +01:00
Dylan K. Taylor
2ad5de379f
HandlerListManager::unregisterAll() accepts RegisteredListener
since all this function is doing is passing the object on to the HandlerList, it should accept RegisteredListener, like HandlerList::unregister().
2021-08-10 15:28:11 +01:00
Dylan K. Taylor
b4c0ddd155
Use native union types for TranslationContainer|string 2021-08-10 15:17:26 +01:00