Commit Graph

33 Commits

Author SHA1 Message Date
1099e2044b SetupWizard: fixed user being able to avoid agreeing to license, closes #2703 2019-01-29 13:43:13 +00:00
71d17c50d6 Fixed internal IP detection (#2711), closes #2702 2019-01-29 12:51:53 +00:00
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
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
c947909c2e Updated language submodule 2018-08-06 20:52:53 +01:00
706c620d04 Move Internet-related functions from Utils into their own class (#2324)
- Added `Internet::getIP()`, `Internet::getURL()`, `Internet::postURL()`, and `Internet::simpleCurl()`.
- Deprecated the corresponding functions in `Utils`. Updating to the new functions is as simple as replacing `Utils` with `Internet`, since this doesn't break backwards compatibility.

The deprecations should be catered for by plugin developers. These deprecated redirects will be removed no later than 4.0.0.
2018-07-25 15:51:18 +01:00
05af87e1d4 Strip empty lines at the end of classes 2018-06-11 13:19:23 +01:00
7b3653f75d SetupWizard: remove dead constant 2018-05-10 12:39:15 +01:00
4f8e4f0522 Add EOF newlines where missing (bulk) (#1836)
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
74b074753f Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
85ec7d9732 Change default MOTD
"Minecraft: PE Server" is no longer accurate, "Minecraft: Bedrock
Edition Server" is too wordy, and "Minecraft: BE Server" just sounds
weird.

and I'm not calling it simply a "Minecraft Server"
2017-09-25 23:43:09 +01:00
10f597cd64 Stop hardcoding "PocketMine-MP" everywhere 2017-09-25 18:17:35 +01:00
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
5011198a4e Cleaned up SetupWizard and fixed crash when pressing CTRL+C during setup 2017-06-13 17:38:19 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
11e0387e19 Show an error if no language files found during setup, mitigates #380 2017-02-25 11:21:32 +00:00
2d5567d9dd Removed InstallerLang mess, language improvements, updated PocketMine-Language submodule 2017-02-15 14:44:12 +00:00
8f9c52507a Some PhpStorm cleanup 2017-02-12 12:36:02 +00:00
82cf38d46c Installer: No need for force-kills 2017-01-31 12:05:56 +00:00
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
92bd1a755d Fix Installer server name bug (server name uses MOTD now 2016-11-18 11:41:25 +00:00
Tux
8e9a078ff9 Use built-in random_bytes functionality 2016-09-06 11:47:58 +01:00
26c9eed82e Added all block hardness 2015-07-27 20:31:55 +02:00
3cf1692c96 Possible fix for #2424 2014-12-21 13:59:04 +01:00
747f7685e7 Fix formatting issues due to bad IDE settings 2014-12-07 16:30:04 +01:00
19c030281f Fixed #1969 2014-11-18 13:53:38 +01:00
34946faf94 Remove errors from Utils::getRandomBytes() 2014-10-19 13:44:38 +02:00
eab86f5f90 Replaced array() with [] 2014-08-28 17:04:22 +02:00
db7222976e Code cleanup 2014-08-21 17:26:41 +02:00
071033ad5c Added new installer languages 2014-08-02 18:00:36 +02:00
825656feed Fixed installer language strings, bumped MCPE build to 5 (already compatible) 2014-06-18 19:23:14 +02:00
6cbd39de9b Added Inventory interfaces and types, updated long array() to [] 2014-05-22 18:59:16 +02:00
dd17652aca Fixed wrong paths 2014-04-01 05:06:12 +02:00