701 Commits

Author SHA1 Message Date
Dylan K. Taylor
946a1036f1 Drop warn-if-enabled for asserts
I don't know why this is optional when no other debug warnings are.
2019-01-05 18:49:15 +00:00
Dylan K. Taylor
43410cdafb Server: warn on assertions !== -1, closes #2640 2019-01-05 18:47:29 +00:00
Dylan K. Taylor
532def67ab Merge branch '3.5' 2019-01-05 11:12:34 +00:00
Dylan K. Taylor
f7f7be896e Server: drop misleading config values 2019-01-05 11:12:09 +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
71f123c616 Merge branch '3.5'
# Conflicts:
#	resources/locale
2019-01-02 21:25:57 +00:00
Dylan K. Taylor
d34f3f1af3 Add a terminal message for the crash strangler 2019-01-02 19:10:05 +00:00
Dylan K. Taylor
f81bbd60e8 Avoid use of internal fields in BinaryStream 2019-01-01 16:42:14 +00:00
Dylan K. Taylor
c6a32ccf2a Merge branch 'release/3.5' 2019-01-01 14:08:20 +00:00
Dylan K. Taylor
8752e363c9 EXCUSE ME, HOW DARE YOU NOT LOG NETWORK ERRORS?! 2018-12-31 22:33:56 +00:00
Frago9876543210
f06e67a792 Allow plugins to disable background generation (#2613) 2018-12-28 14:34:54 +00:00
Dylan K. Taylor
a2e4fdc8a2 Merge branch 'release/3.5' 2018-12-20 20:02:16 +00:00
Dylan K. Taylor
34a899e28b Clean up Utils error handling functions (internal) 2018-12-16 17:50:00 +00:00
Dylan K. Taylor
206f913d2b Merge branch 'release/3.4' 2018-12-01 10:10:52 +00:00
Dylan K. Taylor
75482124f2 Merge branch 'release/3.3' into release/3.4 2018-12-01 10:09:46 +00:00
Dylan K. Taylor
e2f46a4358 Remove unused import... 2018-11-30 19:40:35 +00:00
Dylan K. Taylor
c46475ac4a Merge branch 'release/3.4' 2018-11-30 19:28:06 +00:00
Dylan T
6295ef8a81
Add language option to server.properties (#2531)
This allows to save the language without rewriting pocketmine.yml. Since this is a "standard" config option (something that the user might want to directly modify) it's reasonable to put it in server.properties. pocketmine.yml is generally reserved for more advanced configuration options.
2018-11-30 13:25:04 +00:00
Dylan K. Taylor
ed531c0009 Merge branch 'release/3.4' 2018-11-29 19:57:35 +00:00
Dylan K. Taylor
05dba61a69 Merge branch 'release/3.3' into release/3.4 2018-11-29 19:47:28 +00:00
Dylan K. Taylor
b473ffdedc Remove async playerdata saving, closes #2515
this technically involves non-breaking API changes which should happen on a patch release, but I can't be bothered with the dust cleanup, so we'll just blow it away now. It doesn't hurt anyone anyway.
2018-11-29 19:47:15 +00:00
Dylan K. Taylor
4698c723bd Merge branch 'release/3.4' 2018-11-25 14:36:20 +00:00
Dylan K. Taylor
c90d1faa81 Merge remote-tracking branch 'origin/release/3.3' into release/3.4 2018-11-25 14:35:45 +00:00
Dylan T
d5a1961e6b
Force minimum uptime to be >= 120 seconds if a crash occurs (#2534)
This is an incremental improvement over 4a6841a5a465c791b512517394241f0ac0b38739. This change works better because it also reduces disk spam of crashdumps.

This will now sleep if the server uptime was less than 120 seconds before crashing. If unattended, this will clamp down on automated crashdump spam. If attended, the user can simply press CTRL+C to abort the process and skip the delay.
2018-11-25 14:35:35 +00:00
Dylan K. Taylor
45caec874e Merge branch 'release/3.4' 2018-11-12 22:18:28 +00:00
Dylan K. Taylor
de50f02076 Merge branch 'release/3.3' into release/3.4 2018-11-12 22:07:22 +00:00
Dylan K. Taylor
71d02e5870 Improve dev build error messages 2018-11-12 22:07:14 +00:00
Dylan K. Taylor
3a6af3327f Encapsulate plugin.yml commands handling inside PluginBase, removed CommandExecutor requirement from Plugin interface
This removes the need for custom Plugin implementations to implement onCommand().

In the future it's planned to remove plugin.yml commands completely and have them registered similarly to how events are handled.
2018-11-09 19:50:52 +00:00
Dylan K. Taylor
acd3116591 Merge branch 'release/3.4' 2018-11-01 15:51:50 +00:00
Dylan K. Taylor
cf43f479df Server: cleanup setting up of console 2018-10-30 16:59:03 +00:00
Dylan K. Taylor
c6a160d362 Merge branch 'release/3.4' 2018-10-25 18:42:19 +01:00
Dylan K. Taylor
a714612453 Merge branch 'release/3.3' into release/3.4 2018-10-25 18:42:09 +01:00
Dylan K. Taylor
4835537886 Merge branch 'release/3.2' into release/3.3 2018-10-25 18:41:58 +01:00
Dylan K. Taylor
4a6841a5a4 Added client side self rate-limiting for crashdump reporting
this should produce some reduction in spam at the source.

This could also be used to control the rate at which constantly-crashing servers restart to stop them spamming the disk as well, but the main concern here is eliminating crash archive involuntary DDoS by crashy servers.
2018-10-25 18:10:59 +01:00
Dylan K. Taylor
011b9ae159 Update to latest NBT lib version 2018-10-23 16:47:00 +01: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
5e68858ebf Merge branch 'release/3.2' into release/3.3 2018-10-21 18:16:59 +01:00
Dylan K. Taylor
45c9caa38c Fixup some formatting issues 2018-10-21 18:15:25 +01:00
Dylan K. Taylor
605e7e08ed Remove some deprecated methods 2018-10-20 15:29:43 +01:00
Dylan K. Taylor
39808dd94f Actually merge branch 'release/3.4' this time 2018-10-19 15:35:23 +01:00
Dylan K. Taylor
4221e274d6 Merge branch 'release/3.3' into release/3.4 2018-10-16 18:20:14 +01:00
Dylan K. Taylor
839d5eab7b Protocol changes for 1.7
there's also some new cases in stats, but we don't care about those anyway.
2018-10-16 17:13:52 +01:00
Dylan K. Taylor
1b572d3e40 Level: rename unload to onUnload()
again, this is an intentional rug-jerk, along with a clearer naming.
2018-10-13 15:43:43 +01:00
Dylan K. Taylor
bb286dea91 Server: more elegant isLevelGenerated() check 2018-10-13 15:37:26 +01:00
Dylan K. Taylor
8d1400115e fixed unsupported leveldb format versions crashing the server 2018-10-07 15:42:59 +01:00
Dylan K. Taylor
785df3789d Remove now-unused internal function 2018-10-06 14:46:38 +01:00
Dylan K. Taylor
495a0b1dc2 Merge branch 'release/3.3' 2018-10-05 18:11:33 +01:00
Dylan K. Taylor
1dd6591ac1 Migrate a bunch of PluginManager->callEvent() usages to Event->call
This has the triple bonus effect of a) making a lot of code easier to read, b) reducing Server::getInstance() usages, and c) removing a whole bunch of Server dependencies.

The network and block namespaces are untouched by this commit due to potential for merge conflicts. These should be dealt with separately on master.
2018-10-05 17:30:06 +01:00