626 Commits

Author SHA1 Message Date
Dylan K. Taylor
bc0434913e Fixed crash when a numeric world seed is set in pocketmine.yml 2017-09-28 16:35:19 +01:00
Dylan K. Taylor
38fad4b963 Implement difficulty per-world (#878)
* Moved Server::getDifficultyFromString() to Level
* Added ability to set difficulty in worlds section of pocketmine.yml for generation
2017-09-26 11:16:51 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
10f597cd64 Stop hardcoding "PocketMine-MP" everywhere 2017-09-25 18:17:35 +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
89e4defa29 use null coalesce in Server->getLevel() 2017-09-25 09:51:21 +01:00
Dylan K. Taylor
f5534a9ab0 Server: add some typehints 2017-09-25 09:49:19 +01:00
Dylan K. Taylor
28bce8d48c Fixed plugins causing crashes by using Level->unload() and add a warning
yes, we don't want you to use this, but it still shouldn't crash if it can be prevented...
2017-09-25 09:46:19 +01:00
Dylan K. Taylor
d7091f4460 Fixed not being able to disable stats reporting using command line options 2017-09-21 17:14:44 +01:00
Dylan K. Taylor
fcb3c4820e Merge branch 'php/7.0' into mcpe-1.2 2017-09-07 10:42:20 +01:00
Dylan K. Taylor
2c6205e3f3 Added new events for network interface handling, close #1232 (#1250)
Added 
- NetworkInterfaceRegisterEvent (cancellable)
- NetworkInterfaceUnregisterEvent
- NetworkInterfaceCrashEvent
2017-09-06 11:22:10 +01:00
Dylan K. Taylor
f0c1ea7dd7 Fixed string seeds in pocketmine.yml crash the server, close #1355 2017-09-04 10:01:21 +01:00
Dylan K. Taylor
95752ef542 Merge branch 'master' into mcpe-1.2 2017-08-23 13:20:35 +01:00
Dylan K. Taylor
84c8ac03fb Fixed #1179
This solution isn't ideal, but it works...
2017-08-23 13:19:34 +01:00
Dylan K. Taylor
445a67954d Merge changes from master 2017-08-22 14:13:31 +01:00
Dylan K. Taylor
876659cc73 Item factory refactor and added capability to register custom items 2017-08-21 17:49:26 +01:00
Dylan K. Taylor
1f70a7830e Branch merge 2017-08-20 21:07:19 +01:00
Dylan K. Taylor
02f42eba48 Move block registration to its own class 2017-08-20 18:05:01 +01:00
Dylan K. Taylor
17053389b0 Added memory limits for AsyncWorkers 2017-08-20 12:15:48 +01:00
Dylan K. Taylor
e0307411da Cleaned up PlayerList handling 2017-08-19 19:36:15 +01:00
Dylan K. Taylor
4f1302adf2 Merge branch 'master' into mcpe-1.2 2017-08-17 17:14:16 +01:00
Dylan K. Taylor
5b4035253b Casting cleanup and removed some 32-bit string-int leftovers 2017-08-17 11:24:49 +01:00
Dylan K. Taylor
98e0a2ecba Removed InventoryType, added new inventory API methods 2017-08-07 11:31:36 +01:00
xFlare
f0b4a33e2e www.pocketmine.net -> update.pmmp.io (#1263) 2017-07-31 22:44:02 +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
24bdf330d5 Merge branch 'moar-typehints' 2017-07-15 09:43:43 +01:00
Dylan K. Taylor
6de8415c79 Merge network refactors 2017-07-14 13:04:02 +01:00
Dylan K. Taylor
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
Dylan K. Taylor
8fc1501e89 Moar typehints 2017-07-14 08:52:27 +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
3a214b7ce6 Cleaned up isEncoded mess 2017-07-13 12:21:26 +01:00
Dylan K. Taylor
72d1948f30 Improved batch handling 2017-07-13 12:04:47 +01:00
Dylan K. Taylor
8a28dfa64d Don't send crashdumps if git hash is invalid 2017-07-10 08:50:11 +01:00
Dylan K. Taylor
1a6517ea4e Added timings for console title ticking
As stupid as this seems, this can actually cost a significant amount of tick time due to reading from disk and/or executing commands.
2017-07-04 17:05:53 +01:00
Dylan K. Taylor
409fc282d2 Cleaned up ping response and added missing fields (#1114) 2017-07-04 11:17:47 +01:00
Dylan K. Taylor
a73c6f1861 Fixed some unnecessary FQNs in docs 2017-06-25 12:43:04 +01:00
Dylan K. Taylor
4b4f2af9e3 Fixed some very unusual crashdumps reporting non-fatal errors when plugins use die() or exit() 2017-06-22 19:08:33 +01:00
Dylan K. Taylor
6a2a74a457 Improved git hash handling, add dirty git detection and disable automatic reporting for dirty builds 2017-06-22 13:35:04 +01:00
Dylan K. Taylor
8cd31c2dc4 Fixed crashes starting RCON 2017-06-21 18:15:57 +01:00
Dylan K. Taylor
a0ef15b15e New CrashArchive is up 2017-06-21 14:25:54 +01:00
jojoe77777
e9a638d84a Set a default value 0 for tick counter (#1108) 2017-06-17 12:42:42 +01:00
Dylan K. Taylor
1bae973502 Fix server crashing while crashing when trying to decode an invalid response from the crash-archive post 2017-06-17 10:31:20 +01:00
Dylan K. Taylor
e0f8a02bb8 Catch and log all crashes occurring while creating crashdumps 2017-06-17 10:25:34 +01:00
Dylan K. Taylor
3167817e34 Fixed crash when memory hard limit is disabled, close #1074 2017-06-12 09:32:31 +01:00
Dylan K. Taylor
890f72dbf2 Type-hinted NBT tag constructors, made getValue() and setValue() more strict, fix dozens of assorted related bugs 2017-06-08 19:17:52 +01:00
Dylan K. Taylor
e18a3ac933 Fixed UUID-related issues 2017-06-07 13:11:03 +01:00
Dylan K. Taylor
5aea9220c9 Fixed chat and some TextContainer documentation issues 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
bd7205dd64 PhpStorm doesn't understand variable class names :( 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
cf07af8b55 Fix some strict type violations reported by PhpStorm (strict types <3) 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
c2186041d6 Fix TranslationContainer issue 2017-06-07 12:53:16 +01:00