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
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
Dylan K. Taylor
0d5d5e21a8
CommandReader: define $w and $e to make PHPStan happy
2019-10-25 16:11:02 +01:00
Dylan K. Taylor
bf44bd016d
TransferServerCommand: add missing boilerplate permission check
2019-10-20 14:28:53 +01:00
Dylan K. Taylor
622f93df45
remove usages of deprecated {} string access, closes #3035
2019-07-22 16:39:33 +01:00
Johnmacro
bb93d4f8de
TimeCommand: Fix commands.time.query message ( #2917 )
2019-05-12 09:21:39 +01:00
Dylan K. Taylor
4c268acc00
Fixed /whitelist on/off permissions, closes #2849
2019-04-14 17:58:53 +01:00
Dylan K. Taylor
e9a87978a6
Fixed usages of commands.generic.permission
...
apparently this doesn't exist in the client anymore
2019-04-07 15:07:24 +01:00
Dylan K. Taylor
5c12bee874
Backport other part of 2bffd5cc1c326670c25386ce78e5c690f4c5fd54: Add timer measurements for autosave
2019-03-10 11:20:51 +00:00
Dylan K. Taylor
0659d2fbef
Backport 6bd43a8215b9e612478fe789da9a58b36f0f0e73: Firehose auto-tick-rate anti-feature, closes #2665
2019-03-09 19:20:53 +00:00
Dylan K. Taylor
65529ff2ce
Command: add @throws CommandException
2019-02-14 15:09:41 +00:00
Dylan K. Taylor
c346c45d42
Use regex for command argument parsing, fixes #2266
...
moral of the story: don't abuse functions for things they weren't designed for... lol
2019-02-14 15:07:58 +00:00
Jack Noordhuis
27767e7ddb
Verify player name command input, closes #2729 , closes #2749
2019-02-13 14:50:43 +00:00
Dylan K. Taylor
243c12de7c
EffectCommand: fix bounds check, closes #2055
2019-02-13 14:37:40 +00:00
Dylan K. Taylor
82dddde159
Remove dead code in /time command handler
2019-01-19 15:15:04 +00:00
Dylan K. Taylor
bc709efb77
Prevent stupidity with /enchant
2019-01-19 15:14:51 +00:00
Dylan K. Taylor
93969197f7
Enable status,gc,dumpmemory OOB
...
dumpmemory has been confined to console by default due to the hazards it poses to a running server.
closes #2528
2019-01-05 18:56:57 +00:00
Dylan K. Taylor
4b9a142a5d
Import global functions and constants for enhanced performance
...
This is better for performance because these then don't need to be reevaluated every time they are called.
When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.
However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
Dylan K. Taylor
0bacf51729
Fix another swathe of number_format() truncation bugs
2019-01-04 19:39:51 +00:00
Dylan K. Taylor
33f6b441d8
Fixed /gc truncating memory freed
...
wtf PHP?
2019-01-04 17:30:35 +00:00
Dylan K. Taylor
d71a543d10
Fixed a bunch of things PHPStan finds unpalatable
...
close #2614 , fix a bunch of docs bugs, fix sendCreativeContents() crash on Human holders, move some inline variable declarations
2019-01-04 00:23:09 +00:00
Dylan K. Taylor
658786f2f6
TitleCommand: fix off-by-one bug in "times" subcommand
2019-01-02 21:04:25 +00:00
Dylan K. Taylor
bf8a8b386e
Allow ~relative coordinates to work in /particle
2018-12-16 14:12:46 +00:00
Dylan K. Taylor
1634dd62e3
Don't catch unexpected exceptions during command execution
2018-11-04 23:11:51 +00:00
Dylan K. Taylor
6dd2597934
Merge branch 'release/3.3' into release/3.4
2018-10-21 18:17:07 +01:00
Dylan K. Taylor
45c9caa38c
Fixup some formatting issues
2018-10-21 18:15:25 +01:00
Dylan K. Taylor
b35759cc25
Add /unban and /unban-ip as aliases of /pardon and /pardon-ip
2018-10-21 15:32:38 +01:00
Dylan K. Taylor
bb1944ca40
Merge branch 'release/3.1' into release/3.2
2018-09-26 13:12:20 +01:00
Dylan K. Taylor
d1a20ecb4a
CommandReader: Require readline to be explicitly enabled on Windows
...
readline on Windows causes issues with console output corruption. Additionally, PM readline impl is extremely buggy and probably ought to be removed. However, have a hotfix for now.
2018-09-26 13:11:21 +01:00
Dylan K. Taylor
fe6d546190
Merge branch 'release/3.1' into release/3.2
2018-08-25 17:49:21 +01:00
Dylan K. Taylor
22fcfffa53
PluginsCommand: remove useless private function
2018-08-25 16:09:51 +01:00
Dylan K. Taylor
7dd53f2397
Replace unnecessary strlen > 0 calls with !== "" checks
2018-08-25 16:07:49 +01:00
Dylan K. Taylor
298259b473
PluginsCommand: clean up garbage code
2018-08-25 16:05:25 +01:00