91 Commits

Author SHA1 Message Date
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
71d02e5870 Improve dev build error messages 2018-11-12 22:07:14 +00:00
Dylan K. Taylor
c201a0e909 Move language submodule to resources/
again, this isn't source code.
2018-11-05 09:49:21 +00:00
Dylan K. Taylor
a273a0c8a9 Fixed remaining cases of undefined behaviour on ambiguous world format
It was still possible to produce undefined behaviour by creating a db folder in a region-based world, or adding regions to a leveldb world. This now solves the problem completely by refusing to load the world if multiple formats match the world.
2018-10-04 19:43:31 +01:00
Dylan K. Taylor
eaf6b316c7 I always commit this submodule when I don't want it, and not when I do 2018-10-04 12:52:09 +01:00
Dylan K. Taylor
4597899ac3 Merge branch 'release/3.2' 2018-08-06 21:34:07 +01:00
max
f3b2bcfd13 Added Conduit Power effect 2018-08-06 21:30:15 +01:00
Dylan K. Taylor
e5b69deccf Merge branch 'release/3.2' 2018-08-06 20:53:16 +01:00
Dylan K. Taylor
c947909c2e Updated language submodule 2018-08-06 20:52:53 +01:00
Dylan K. Taylor
4e8a256a53 Language: use null coalesce for get() and internalGet() 2018-07-30 17:29:13 +01:00
Dylan K. Taylor
58b46179f9 Language: make internal function not public
this is only used within the Language class anyway.
2018-07-30 17:27:48 +01:00
Dylan K. Taylor
0d9952d53e Rename BaseLang -> Language 2018-07-30 17:07:19 +01:00
Dylan K. Taylor
d26631d8e0 Clean up BaseLang error handling, throw exceptions instead 2018-07-30 17:00:52 +01:00
Dylan K. Taylor
f60b0e5cc7 Server: more dev build warnings 2018-06-22 09:40:33 +01:00
Dylan K. Taylor
5f2d4c36c0 Updated Language submodule 2018-06-17 13:04:34 +01:00
Dylan K. Taylor
1f9bed275a Merged server and API version 2018-06-17 12:54:18 +01:00
Dylan K. Taylor
b5da6b1591 Added a pocketmine.yml kill switch for development builds 2018-06-12 17:11:01 +01:00
Dylan K. Taylor
0b9ce8a0d4 Remove server codename
This has long been a waste of time and creativity, and that's only going to continue to be the case now that we're going to be properly versioning. New codenames every couple of months is not worth the bother.
2018-06-12 10:51:49 +01:00
Dylan K. Taylor
5b6762d0d5 Fixed lang submodule version 2018-05-09 14:53:22 +01:00
Dylan K. Taylor
99134de6b6 Updated NBT dependency
this needs further changes (particularly to Furnace) to stop things abusing NBT for runtime data handling, otherwise performance is going to drop off a cliff.
2018-04-04 10:29:32 +01:00
Dylan K. Taylor
9e4bccd8c0 updated Language submodule 2018-03-03 19:59:13 +00:00
Dylan K. Taylor
5457c7a202 Updated PocketMine-Language submodule 2018-03-01 09:53:14 +00:00
Dylan K. Taylor
ee28296d60 Server: fixed authentication messages
why did I do this...
2018-03-01 09:32:04 +00:00
Dylan K. Taylor
906d7eb176 Lang: Move TranslationContainer and TextContainer to \pocketmine\lang namespace
why the hell were they ever put in \pocketmine\event in the first place??

This change was suggested many months ago but I forgot all about it.
2018-02-04 20:03:30 +00:00
Dylan K. Taylor
fd5557861b Changed how login verification is handled, add more useful error messages
closes #1955
2018-01-28 14:13:59 +00:00
Dylan K. Taylor
990a48d858 Better error message when a level is unloaded during its level tick
Plugins may cause this issue unexpectedly by unloading levels directly during events such as EntityDamageEvent. This adds a better error message to allow developers to understand what is going on and create appropriate workarounds.
2017-12-04 10:01:55 +00:00
Dylan K. Taylor
1fd9994056 Merge branch 'master' into mcpe-1.2.5 2017-11-21 16:48:18 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
a91a4489d4 Updated PocketMine-Language submodule 2017-11-19 10:21:06 +00:00
Dylan K. Taylor
372b97ba8f Revert "Patch %0 client translation exploit"
this bug was (FINALLY) fixed in 1.2.5.15

This reverts commit 378c3d7994b41849ba4d5608b0a9a5482e84cc25.
2017-11-01 16:17:17 +00:00
Dylan K. Taylor
584810780a Moved projectile-related classes to their own namespace 2017-10-19 12:27:44 +01:00
Dylan K. Taylor
a4ca3f1d1c Updated PocketMine-Language submodule 2017-10-18 21:08:39 +01:00
Dylan K. Taylor
f783789e5a fixed escape code unescaping in language files, close #1474 2017-10-18 20:43:35 +01:00
Dylan K. Taylor
f6e30d4225 s/online-mode/xbox-auth/
lots of servers are currently running in insecure mode without realizing because of old Genisys shit configs?!
2017-09-30 12:19:24 +01:00
Dylan K. Taylor
91c6086ae1 Updated PocketMine-Language submodule 2017-09-26 09:35:43 +01:00
Dylan K. Taylor
03d3e595d6 Implement JWT signature verification and Xbox Live checks, close #315
This can be enabled or disabled using the "online-mode" directive in
server.properties.

NOTE: For safety reasons it is enabled by default, since many naive server owners currently believe that authentication is not needed because "the client is forced to sign-in".
Newsflash for readers: the forced authentication is easily bypassed using a LAN proxy.

Un-authenticated LAN connections will still work fine if the online mode is disabled.

Added the following API methods:
- Server->getOnlineMode() : bool
- Server->requiresAuthentication() : bool
- Player->isAuthenticated() : bool

JWT verification is rather expensive, so it is done in an AsyncTask. Make sure you don't hog your worker threads.
2017-09-25 12:30:58 +01:00
Dylan K. Taylor
8ca59d12e9 Updated PocketMine-Language submodule 2017-09-25 11:36:39 +01:00
Dylan K. Taylor
5d75d3d5b6 Merge branch 'php/7.0' into mcpe-1.2 2017-09-01 23:10:58 +01:00
Dylan K. Taylor
c81b76cbf6 Make plugin load errors more descriptive 2017-09-01 18:52:55 +01:00
Dylan K. Taylor
6e8631347d Added capability to specify compatible protocol versions in plugin.yml (#1247)
Protocol-dependent plugins may specify the `mcpe-protocol` attribute in plugin.yml to disallow plugin loading when the protocol changes.
2017-09-01 17:57:40 +01:00
Dylan K. Taylor
1e539c4e3b fix some 1.2 translation issues, close pmmp/PocketMine-Language#19 2017-08-09 21:40:20 +01:00
Dylan K. Taylor
dbb92096e4 More typehints, documentation fixes and static analysis cleanup 2017-07-15 12:12:06 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
Dylan K. Taylor
4d874e7e78 static analysis 2017-07-13 16:45:24 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
6ef132e468 Updated PocketMine-Language submodule 2017-04-27 11:50:17 +01:00
Dylan K. Taylor
d264a04db4 Added detection for recursive server aliases (#424)
* Added detection for recursive server aliases, close #423

* Oops
2017-03-13 20:43:34 +00:00
Dylan K. Taylor
4ee8d14584 Added API for transferring players to other servers (#355)
* Added API method `Player->transfer()` and PlayerTransferEvent
2017-03-04 18:22:31 +00:00