Dylan K. Taylor
5b9453af43
WhitelistCommand: fixed incorrect implode() parameter order
...
PHP allows this to work either way for legacy reasons, but glue-first is the canonical way for a long time.
2020-07-21 11:46:11 +01:00
Dylan K. Taylor
fb6491ddeb
BanListCommand: sort output into lexical order
2020-07-03 11:23:00 +01:00
Dylan K. Taylor
3b961d0e5f
WhitelistCommand: sort output of /whitelist list into lexical order
2020-07-03 11:19:23 +01:00
Dylan K. Taylor
a60fc4cc28
ListCommand: sort output into lexical order
2020-07-03 11:15:31 +01:00
Dylan K. Taylor
b747899fdd
PluginsCommand: sort plugins list into lexical order
2020-07-03 11:13:32 +01:00
Dylan K. Taylor
c523595e85
Rewrite TeleportCommand (sadly I can't make this commit any smaller)
...
this pile of shit was overdue a rewrite. The new version is much easier to understand.
2020-06-21 00:04:18 +01:00
Dylan K. Taylor
7c7e4f2093
WhitelistCommand: fixed silence on unknown subcommand
2020-06-20 23:05:39 +01:00
Dylan K. Taylor
88c1014f03
TimingsCommand: fixed silence when using a nonexisting subcommand
2020-06-20 23:04:08 +01:00
Dylan K. Taylor
409c8c1703
TimingsCommand: workaround a PHPStan type specifying bug
2020-06-10 12:11:10 +01:00
Dylan K. Taylor
376926c700
TimingsCommand: fix missing type information for async task local storage
2020-06-10 12:10:33 +01:00
Dylan K. Taylor
a27b29897c
TimingsCommand: tell operators what's going on for audit purposes
...
previously nobody except the person who was managing timings would know that timings was running, being pasted or whatever else. Since timings can impact performance (and, for example, block the main thread when writing timings to a file), access to it should be logged so that server owners know what's going on.
2020-06-05 11:12:36 +01:00
Dylan K. Taylor
f24be2b055
Merge branch 'stable' into next-minor
...
# Conflicts:
# src/pocketmine/Player.php
# src/pocketmine/block/SnowLayer.php
2020-06-01 13:42:59 +01:00
Dylan K. Taylor
d234d3e45e
ParticleCommand: added mobflame, closes #3102
2020-05-31 20:28:57 +01:00
Dylan K. Taylor
ecbf21acea
Utils: added OS constants, remove hardcoded OS strings everywhere
2020-05-23 11:05:58 +01:00
XenialDan
45c89d084c
TimeCommand: add time aliases "noon", "sunset", "midnight", "sunrise"
...
closes #3508
2020-05-20 20:42:21 +01:00
Dylan K. Taylor
da4a2d8552
Fixed a bunch of missed Position->getLevel() usages
...
these were not in the usage search because PhpStorm decided to refer to ChunkLoader->getLevel() for any Player references, which caused them to only show when that was searched.
There's also an undetected LSP violation with ChunkLoader because it requires returning Level and Position->getLevel() returns Level|null. I don't know why PHPStan doesn't complain about that.
2020-05-19 21:01:18 +01:00
Dylan K. Taylor
f8ce01e2fd
ItemFactory: extract fromStringSingle() from fromString()
...
on PM4, the multiple functionality is removed, but on PM3 this is a problem for phpstan.
2020-03-13 17:54:25 +00:00
Dylan K. Taylor
3907a2b6ba
Process: split getMemoryUsage() into 2 functions
...
this isn't released yet so it's OK to change.
phpstan level 7 doesn't like these kinds of ambiguous return types because there's no way for it to tell which type is returned without a return type specifying extension, and it's easier to just change the API than to make PHPStan understand it.
2020-03-13 17:32:17 +00:00
Dylan K. Taylor
f08e411cad
Merge branch 'stable' into next-minor
2020-02-10 11:40:08 +00:00
Dylan K. Taylor
da3742b39e
Remove useless typecasts
2020-02-06 16:00:57 +00:00
Dylan K. Taylor
d26fcf7dee
Removed useless casts() from min/max calls
2020-02-06 15:58:27 +00:00
Dylan K. Taylor
1a5228e7a6
Fixed property types with missing null PhpDoc types
2020-02-05 20:55:03 +00:00
Dylan K. Taylor
faef4e8736
SimpleCommandMap: Command->getLabel() never returns null
2020-02-05 20:33:27 +00:00
Dylan K. Taylor
fa82cb26d8
added native types to closures (phpstan-strict-rules)
2020-02-05 16:35:10 +00:00
Dylan K. Taylor
c43e21235d
HelpCommand: do not overwrite non-foreach vars in foreach
2020-02-05 12:57:27 +00:00
Dylan K. Taylor
f1083bd9c4
SimpleCommandMap: beware case mismatches in alias recursion, closes #3281
2020-01-31 10:36:47 +00:00
Dylan K. Taylor
260ac47588
add some phpstan array types
2020-01-30 22:23:11 +00:00
Dylan K. Taylor
e61c3e8bf6
populate missing array value types in command namespace
2020-01-30 20:48:14 +00:00
Dylan K. Taylor
7ce6c8aa13
TimingsCommand: fix confusing indentation
2020-01-30 20:47:33 +00:00
Dylan K. Taylor
9abcc99c10
Command: fixed spacing of phpdoc on execute()
2020-01-30 20:46:25 +00:00
Dylan K. Taylor
f624871b3f
strip extra blank lines (php-cs-fixer)
2020-01-22 14:50:29 +00:00
Dylan K. Taylor
9cd6b3e1c7
fix remaining multiline @var annotations
2020-01-22 14:44:36 +00:00
Dylan K. Taylor
9f44adf04a
pass 2, manual removal of incorrect non-nullable @param for nullable native types
2020-01-21 15:44:34 +00:00
Dylan K. Taylor
c4793241f5
Mass removal of useless @param/@return PHPDoc annotations, pass 1
2020-01-21 15:10:18 +00:00
Dylan K. Taylor
e328d00cca
command: populate missing return type info
2020-01-19 17:02:55 +00:00
Dylan K. Taylor
8794292788
remove &$var reference notations in phpdoc
...
this isn't required by the spec and PHPStan chokes on it. I was previously having it ignore these errors, but it turns out that PHPStan is not making use of extended typeinfo provided if it can't parse the tag, which is problematic on level 6 and also a problem for array-of-type. Therefore, we are going to have to take the hit.
2020-01-11 21:20:55 +00:00
Dylan K. Taylor
1eedac87b2
added missing @var property types (reported by phpstan)
2020-01-09 14:13:54 +00:00
Dylan K. Taylor
494660102e
Replace empty() usages with count()
2019-12-18 11:23:24 +00:00
Dylan K. Taylor
9a67192f74
Merge branch 'stable' into next-minor
2019-12-03 10:45:51 +00:00
Dylan K. Taylor
4b65e1cbe1
Command: fix type doc comment for commandMap field
2019-12-01 21:01:57 +00:00
Dylan K. Taylor
ecbf3e9722
GamemodeCommand: fix CommandSender assignment causing troubles for type inference on static analyzers
...
this would never crash, but in strongly typed code it would be a compile failure.
2019-12-01 09:33:12 +00:00
SOFe
cb76f8a5df
Merge branch 'stable' into next-minor
2019-11-21 23:21:16 +08:00
Dylan K. Taylor
0d5d5e21a8
CommandReader: define $w and $e to make PHPStan happy
2019-10-25 16:11:02 +01:00
Dylan K. Taylor
0591458ef6
Merge branch 'stable' into next-minor
2019-10-22 18:49:22 +01:00
Dylan K. Taylor
bf44bd016d
TransferServerCommand: add missing boilerplate permission check
2019-10-20 14:28:53 +01:00
Dylan K. Taylor
bb048fb361
Merge branch 'stable' into next-minor
2019-07-26 19:50:17 +01:00
Dylan K. Taylor
622f93df45
remove usages of deprecated {} string access, closes #3035
2019-07-22 16:39:33 +01:00
Dylan K. Taylor
4635b93f4d
backport 23071d257 + deprecations: Extract process-related functions from Utils into a separate Process class
2019-06-16 14:40:51 +01:00
Dylan K. Taylor
ac5339414a
Merge branch 'stable' into next-minor
...
# Conflicts:
# build/preprocessor
2019-06-16 14:08:06 +01:00
Johnmacro
bb93d4f8de
TimeCommand: Fix commands.time.query message ( #2917 )
2019-05-12 09:21:39 +01:00