381 Commits

Author SHA1 Message Date
Dylan K. Taylor
649ce5080b StatusCommand: don't use config for reading global limit 2019-03-27 19:24:06 +00:00
Dylan K. Taylor
7333e7118e Server: remove useless function 2019-03-26 15:52:34 +00:00
Dylan K. Taylor
23071d257e Extract process-related functions from Utils into a separate Process class 2019-03-24 18:57:32 +00:00
Dylan T
d03f0aab37
Remove /reload (#2823)
For many years, this has been the cause of many users (particularly plugin devs) confusion. The reality is that /reload has little to no practical value. It does not reload plugin source code (contrary to popular belief).
2019-03-22 15:01:11 +00:00
Dylan K. Taylor
ad19696364 Make Effect and Enchantment functions less verbose 2019-03-13 15:26:21 +00:00
Dylan K. Taylor
6bd43a8215 Firehose auto-tick-rate anti-feature, closes #2665 2019-03-03 13:24:53 +00:00
Dylan K. Taylor
2bffd5cc1c Add timer measurements for autosave 2019-03-02 18:20:25 +00:00
Dylan K. Taylor
6c8fa8ae28 More nullable and void typehints 2019-03-02 10:29:11 +00:00
Dylan K. Taylor
9ad0ea85c7 Rename two misleadingly-named functions 2019-02-27 12:59:12 +00:00
Dylan K. Taylor
c26544475e More PHP 7.1 nullables 2019-02-22 12:55:34 +00:00
Dylan K. Taylor
73a565355b Make some forced-optional nullable parameters non-optional, PHP 7.1 style
these parameters did not make any sense to be optional, but were forced to be this way because of the way nullable types worked before 7.1.
2019-02-22 12:54:00 +00:00
Dylan K. Taylor
646fea5a4e Effect: Introduce a bunch of static getters, change a bunch of API to use objects
This introduces static getters for every currently-known effect type. At some point in the near future, the magic number constants (which are really network IDs, by the way) will disappear.

Migrating:
- If you used constants (like any sensible person would): for the most part it's just a case of adding a () anywhere you used an Effect constant.
- If you hardcoded magic numbers: ... well, have fun fixing your code, and I reserve the right to say "I told you so" :)

This achieves multiple goals:
1) creating an EffectInstance for application is much less verbose (see diff for examples, especially the Potion class)
2) plugin devs cannot use magic numbers to apply effects anymore and are forced to use type-safe objects. :)

This is a warning shot for plugin devs who use magic numbers. More changes like this are coming in the not-too-distant future.
2019-02-20 12:05:17 +00:00
Dylan K. Taylor
f49d590794 Level: remove getTiles(), more removal of tiles from user interface 2019-02-15 16:27:00 +00:00
Dylan K. Taylor
6424dc9c82 Merge branch '3.6' 2019-02-14 16:04:32 +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
Dylan K. Taylor
470879c9bf Merge branch '3.6' 2019-02-13 14:53:20 +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
3e58708130 Add some missing @throws annotations 2019-02-04 19:50:43 +00:00
Dylan K. Taylor
78dfcc5f2d Move Effect and EffectInstance to entity\effect namespace 2019-01-28 15:41:07 +00:00
Dylan K. Taylor
0b1bdec3ac GameMode::fromString() now throws InvalidArgumentException 2019-01-26 17:09:54 +00:00
Dylan K. Taylor
738e310798 Strip out RCON, closes #2686
Users should move to the new RconServer plugin instead.
2019-01-23 20:39:16 +00:00
Dylan K. Taylor
6df983da3e Merge branch '3.5' 2019-01-19 16:24:41 +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
6b7710e62b Introduce dedicated NBT data exceptions, fix up some corrupted chunk handling 2019-01-19 12:43:47 +00:00
Dylan K. Taylor
e341f3dce2 Level: rename getName() to getDisplayName() 2019-01-17 16:46:56 +00:00
Dylan K. Taylor
5052b75565 Separate Level management functionality from Server, clean up a bunch of mess 2019-01-12 19:11:05 +00:00
Dylan K. Taylor
27761ac26e Fixed casing: Gamemode -> GameMode
it's two words, not one.
2019-01-12 16:19:31 +00:00
Dylan K. Taylor
a756519e6b Move gamemode constants & functions to their own class
future enhancements:
- make gamemode an object containing information about abilities that players have in this gamemode (gamemodes are just predefined ability sets)
- get the magic numbers out of the API
2019-01-12 16:10:14 +00:00
Dylan K. Taylor
f80eeee20f Merge branch '3.5' 2019-01-05 18:59:13 +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
adc1069ed2 Merge branch '3.5' 2019-01-04 23:28:44 +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
e1064a9e36 Merge branch '3.5' 2019-01-04 00:37:48 +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
71f123c616 Merge branch '3.5'
# Conflicts:
#	resources/locale
2019-01-02 21:25:57 +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
3c520aa786 Particle no longer extends Vector3 2018-12-16 14:15:41 +00:00
Dylan K. Taylor
ebf9cb3e62 Merge branch 'release/3.5' 2018-12-16 14:13:35 +00:00
Dylan K. Taylor
bf8a8b386e Allow ~relative coordinates to work in /particle 2018-12-16 14:12:46 +00:00
Dylan K. Taylor
19edacbea9 BanIpCommand: fix crash when banning by playername, closes #2578 2018-12-15 13:59:10 +00:00
Dylan K. Taylor
0028ce0ed2 Merge branch 'release/3.4' 2018-11-04 23:25:05 +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
90482e79bc Merge branch 'release/3.4' 2018-10-21 18:23:54 +01: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