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
495bfda044
Drop a bunch of invalid null defaults
...
phpstan doesn't report these out of the box, for reasons I'm not clear on. It's also not clear if having null defaults has any effect on nullability behaviour, so they are best removed. In addition, these would be problematic on 7.4.
2020-02-05 20:53:54 +00:00
Dylan K. Taylor
0d19f6c968
Server: initialize auto updater before loading plugins, not after
...
from a plugin PoV, getUpdater() is always supposed to return an AutoUpdater instance, but it would return null during onLoad(), which is bad.
2020-02-05 20:32:51 +00:00
Dylan K. Taylor
ecf662bf74
Server: Lazy-init static sleeper as-needed
...
this makes it testable without a server context.
2020-02-05 20:31:01 +00:00
Dylan K. Taylor
8cba2e0346
Server: fixed wrong non-nullability of queryHandler
2020-02-05 19:56:16 +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
e5a2cfb65f
avoid type juggling in conditions, always use explicit boolean conditions
2020-02-05 15:44:06 +00:00
Dylan K. Taylor
28c787371a
Server::$rcon may be null (disabled or failed to start)
2020-02-03 19:25:56 +00:00
Dylan K. Taylor
829dd02eea
Server: fixed more bad non-nullable phpdocs
2020-02-01 19:30:47 +00:00
Dylan K. Taylor
799183e13e
make use of phpstan class-string in some areas
2020-01-30 22:23:11 +00:00
Dylan K. Taylor
260ac47588
add some phpstan array types
2020-01-30 22:23:11 +00:00
Dylan K. Taylor
9eebfa7cc3
populate missing array value types in root namespace
2020-01-30 21:43:00 +00:00
Dylan K. Taylor
f624871b3f
strip extra blank lines (php-cs-fixer)
2020-01-22 14:50:29 +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
bd4a63b668
Server: populate missing return type information
2020-01-19 19:09:08 +00:00
Dylan K. Taylor
17720041a3
phpdoc: populate missing parameter typeinfo
2020-01-11 21:53:24 +00:00
Dylan K. Taylor
494660102e
Replace empty() usages with count()
2019-12-18 11:23:24 +00:00
Dylan K. Taylor
cb598155a4
Server: add @return annotation to crashDump() to make phpstan happy
...
this is technically a bug in PHPStan, but it's easier to do this than report a bug.
2019-12-12 16:19:57 +00:00
Dylan K. Taylor
73d4ff6b52
more missed function imports
2019-12-09 21:16:35 +00:00
Dylan K. Taylor
6b61efcfc8
remove unused imports
2019-12-09 19:49:21 +00:00
Dylan K. Taylor
d20d9fb689
Merge branch 'stable' into drew-1.13
2019-12-05 10:59:53 +00:00
Dylan K. Taylor
bc76b1cafe
Server: remove several redundant @var annotations (copy pasta)
...
these are all useless because it is implied by the parameter type anyway.
2019-12-04 10:14:15 +00:00
Stephen
e38c0c0fe1
Merge remote-tracking branch 'upstream/stable' into stable
2019-12-01 21:55:50 -05:00
Dylan K. Taylor
c4a8781b5c
Fixed doc type inconsistencies surrounding chat broadcast handling (several problems that are all related)
2019-12-01 21:40:11 +00:00
Dylan K. Taylor
2b08bbc7b1
Server: fixed type doc comment of nextTick field
2019-12-01 21:18:20 +00:00
Dylan K. Taylor
5caae37768
Server: fixed return type doc comment for getCommandAliases()
2019-12-01 21:00:49 +00:00
Stephen
be9c413a9e
Added network components for skins, to collect instead of throw out data
2019-11-20 21:43:41 -05:00
Dylan K. Taylor
c063a4da29
backport 5c1f1f00cbbcc6460927b922f993f1de8e1e046c: move assert.exception to PocketMine.php with the other stuff
2019-10-24 09:12:05 +01:00
Dylan K. Taylor
d6b9950901
backport fdfbaf4e95d9760199b363005cca71b852d5eee5: make startup performance warnings a little more coherent
2019-10-24 09:06:28 +01:00
Dylan K. Taylor
7439e1971d
Server: stop spamming crashdumps on unsupported / corrupted worlds
...
really we should look into making the server stop if any world fails to load, but flooding the place with crashdumps isn't the way to do it.
This is a simplified version of cf73c7f5c1f0e9c549864fe0434238aa66d49649
2019-10-17 11:27:00 +01:00
Dylan K. Taylor
d9eac8fc0a
Server: fixed default difficulty being EASY instead of NORMAL
2019-10-16 11:45:30 +01:00
Dylan K. Taylor
4da06078ed
Server: promote Patreon on startup
2019-10-01 14:22:07 +01:00
Dylan K. Taylor
0ca07ad075
Fire QueryRegenerateEvent every 1 second instead of every 25, fixes #2670
2019-06-16 16:17:06 +01:00
Dylan K. Taylor
60b183b0d9
backport a753c1342: Clean up Query cache handling, remove useless timeouts
...
the timeout was entirely useless, because:
- when shorter than 25.6 seconds (512 ticks) it would cause caches to be needlessly destroyed and regenerated
- when longer than 25.6 seconds, just made outdated caches persist for longer, even after the query info was regenerated.
This now uses a mark-dirty model to deal with caches, which means that plugin modifications to the query data will be reflected immediately, regardless of when they are made. Previously, modifying the result of Server->getQueryInformation() would have inconsistent results.
2019-06-16 16:08:27 +01:00
Dylan K. Taylor
42954c1d72
Server: document the crazy behaviour of some innocent looking functions
2019-06-12 10:14:29 +01:00
Dylan K. Taylor
eb161f8e1c
Use base64 instead of hex to display binary in some places
...
base64 takes less space than hex, which is beneficial for logging larger payloads.
2019-06-06 14:43:20 +01:00
Frago9876543210
5a351d3caf
Fix for Server::hasOfflinePlayerData ( #2919 )
2019-05-12 12:06:05 +01:00
Dylan K. Taylor
6d64ef8d74
Server: fixed crash reporting bug introduced by a6e5b6e158ff82da1a5ee1f12376c37d4f25114c
2019-05-05 20:52:52 +01:00
Dylan K. Taylor
13ea984b12
Server: setup world things at a more appropriate time
...
closes #2859
this also fixes reported headaches attempting to override generators before world load.
2019-05-02 15:02:10 +01:00
Dylan K. Taylor
612e9e162c
Fixed worlds with unknown generators silently getting wrong generator, closes #2860
2019-04-06 15:17:36 +01:00
Dylan K. Taylor
8e9f787d33
Implement runtimeID table randomization, closes #2841
2019-03-29 14:35:06 +00:00
Dylan K. Taylor
c3d80d711d
Fixed autosave time report measurement not using correct unit (as per master)
2019-03-20 19:01:10 +00:00
Dylan K. Taylor
562179bdd6
Backport 58cafc853f2caa013c65d98ab56f13ac3abe521c: s/level/world (strings only)
...
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
2019-03-10 11:35:46 +00:00
Dylan K. Taylor
a1d50de12e
OOF
2019-03-09 19:31:13 +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
10612acace
Partial backport of 2bffd5cc1c326670c25386ce78e5c690f4c5fd54 to 3.6
2019-03-09 19:10:09 +00:00
Dylan K. Taylor
1d810f8aeb
Backport c3e66e0adc1a0d5ccc2b48dc2ec44e51f5c5383d to 3.6
2019-03-09 19:09:05 +00:00
Dylan K. Taylor
20a25a69df
Force emission of output buffer contents on crash
2019-03-04 12:01:30 +00:00
Dylan K. Taylor
9ba4144a71
Server: remove useless gc_collect_cycles()
...
the server is shutting down at this point so who cares if there are cycles...
2019-02-10 17:15:41 +00:00