Dylan K. Taylor
78b5cc993b
Server: fixed signatures and type-checks for logger
...
this might not be a MainLogger instance, but it definitely has to be an \AttachableThreadedLogger instance.
2018-05-10 10:49:41 +01:00
Dylan K. Taylor
5e91c05424
Server::getIp() now returns 0.0.0.0 if the IP string is empty
2018-05-10 10:25:44 +01:00
Muqsit
e7c5d14af3
Fix DoubleSlab name ( #2177 )
2018-05-09 21:17:35 +01:00
Dylan K. Taylor
126a97b405
ServerKiller: fixed start/stop race condition
...
in some cases the main thread was trying to signal the server killer to stop before it was even started due to limited resources available for scheduling.
2018-05-09 20:59:56 +01:00
Dylan K. Taylor
68ef4b210d
Allow RakLibServer to inherit constants (PATH const is needed for exception logging)
...
this is very annoying and needs a better fix.
2018-05-09 20:08:25 +01:00
Dylan K. Taylor
c3822b795c
CommandReader: use PTHREADS_INHERIT_NONE
...
probably not necessary to register autoloader, but just in case...
2018-05-09 20:02:51 +01:00
Dylan K. Taylor
be0e85dfae
CommandReader: fix notifier race condition crash, don't start self in constructor
...
self-start is extremely annoying!
2018-05-09 20:01:16 +01:00
Dylan K. Taylor
72690ea7f5
RakLibInterface: start RakLibServer with PTHREADS_INHERIT_NONE
...
this is now OK since the logger colours will be initialized on the fly.
2018-05-09 20:00:09 +01:00
Dylan K. Taylor
c9bd60123b
Scheduler: shutdown async pool properly instead of relying on ThreadManager
2018-05-09 19:49:12 +01:00
Dylan K. Taylor
05f4262e81
MainLogger: moved format to private variable
2018-05-09 18:14:46 +01:00
Dylan K. Taylor
dd11bcaf11
Fixed #1979 : logger colours don't show on other threads when classes are not inherited
2018-05-09 18:07:12 +01:00
Dylan K. Taylor
b96adda14d
MainLogger: Colorize at point of echo, not beforehand
...
this removes the need for a hack I had to do with ClientConsole to translate ANSI colour codes back into MC colour codes.
2018-05-09 18:04:16 +01:00
Dylan K. Taylor
5c66c615bf
Living: fix possible crash in getTargetBlock()
...
ArrayOutOfBoundsException is not thrown by SPL anymore since the exception handler throwing it was removed by @shoghicp. Regardless, it seems cleaner to to check it properly.
2018-05-09 17:11:37 +01:00
Dylan K. Taylor
2ff2a2de08
FormattedCommandAlias: use multiple catch clauses
2018-05-09 16:58:55 +01:00
Dylan K. Taylor
78f8d54f89
Merge branch 'release/alpha12'
2018-05-09 16:53:41 +01:00
Dylan K. Taylor
5b6762d0d5
Fixed lang submodule version
2018-05-09 14:53:22 +01:00
Dylan K. Taylor
2a0a2134d1
Server: Implemented an signal/sleep interrupt mechanism for ticking ( #2171 )
...
This allows other threads to notify the main thread to wake it up while it's sleeping between ticks, allowing reduction of processing latency.
Currently only RakLib and the CommandReader threads utilize this, but it's planned to extend it to more things in the near future.
CommandReader is now event-driven instead of poll-based - the server will not poll the CommandReader thread for messages each tick anymore.
RakLib utilizes this mechanism to get packets processed without delays to lower latency.
This now adds an extra dependency - `pocketmine/snooze` library contains the meat of the code used for this. See the Snooze repository for details.
2018-05-09 14:18:13 +01:00
Dylan K. Taylor
e70af362d0
RCONInstance: fixup bad continues
2018-05-07 13:55:23 +01:00
Dylan K. Taylor
24aab8365e
RCONInstance: remove redundant size ref param from readPacket()
2018-05-07 13:53:34 +01:00
Dylan K. Taylor
0e5504ed3f
RCONInstance: add docs to fields, make 'stop' private
2018-05-07 13:52:33 +01:00
Dylan K. Taylor
83008440c0
RCONInstance: replace hardcoded status values with constants
...
I thought I'd seen the worst of PM, but I haven't.........
2018-05-07 13:44:59 +01:00
Dylan K. Taylor
b14dfa9f7e
RCONInstance: Remove pointless code that makes pthreads segfault
...
pthreads doesn't play well with resources, and this code upsets it. Also, this code is utterly pointless.
The whole of RCON needs burning to the ground...
2018-05-07 10:05:05 +01:00
Dylan K. Taylor
197102ca3d
Level: fixed blocks not dropping when not broken by player
...
closes #2172
2018-05-05 21:50:28 +01:00
Dylan K. Taylor
f497e43db3
SourceInterface: removed redundant return value from process()
2018-05-05 15:30:46 +01:00
Dylan K. Taylor
38c3f00ef7
avoid crashes when XUID is null
2018-05-05 13:33:13 +01:00
Dylan K. Taylor
396056c636
Sign: Pad exploded blob to appropriate size
...
I'm not sure how it's possible to get one of these blobs with less newlines than expected, but whatever I guess
closes #2152
2018-05-04 23:29:32 +01:00
Dylan K. Taylor
dd1dfefd83
ItemEntity: remove unnecessary damage types restrictions
...
Invalid damage types are all restricted by other means anyway. This fixes items not getting killed by fire (close #2143 ) and cacti.
2018-05-04 22:57:28 +01:00
Dylan K. Taylor
7565b786e7
Implemented @notHandler annotation for event handlers - skip registering any handlers with this annotation ( #2164 )
...
It is somewhat reasonable to have a function in an event handler which accepts an Event parameter, but is not a handler. For example, multiple event handlers can redirect to the same function to process an event, but this function may not want to receive called events.
There are other ways to get around this, such as making the event handler protected/private, or adding a dummy parameter, but this way is cleaner and more explicit.
Relevant old-repo PR: PocketMine/PocketMine-MP#2143
2018-05-04 21:36:58 +01:00
SOFe
ae0c1c185f
Fixed wrong doccomment for Permission::$children
2018-05-04 15:31:00 +08:00
Dylan K. Taylor
723251e800
Fixed bug in commit hash detection when output ends with newline
2018-05-03 16:37:05 +01:00
Dylan K. Taylor
295016cbc1
DisconnectPacket: fix decoding
2018-05-02 16:56:48 +01:00
Dylan K. Taylor
d80c471ae1
Typehints on missed sound and particle APIs
2018-05-02 11:44:18 +01:00
Dylan K. Taylor
b4068dfd2f
remove unused import
2018-05-02 10:44:05 +01:00
Dylan K. Taylor
3095eb544d
Item: removed isTool()
...
this should be replaced with `instanceof Tool`.
2018-05-01 20:05:53 +01:00
Dylan K. Taylor
0247dff909
Fixed mis-uses of Item->isTool()
...
this has been wrongly used to indicate a durable item, but not just tools are durable items.
2018-05-01 20:05:02 +01:00
Dylan K. Taylor
5368120f13
Level: remove redundant getAutoSave() condition in close()
...
this is already checked by save() anyway.
2018-05-01 18:47:08 +01:00
Dylan K. Taylor
2e7db552dc
Level: __construct() now accepts a LevelProvider object instead of string, string
...
This is made possible by the removal of LevelProvider dependence on their Levels, and furthers the goal of #2024 .
2018-05-01 18:43:11 +01:00
Dylan K. Taylor
53c35aaa1d
Server: remove unused variable from generateLevel()
2018-05-01 18:26:03 +01:00
SOFe
3293074cfc
Implement @softDepend annotation for event handlers - skip registering if the event class is undefined ( #2162 )
...
This allows plugins to soft-depend on other plugins without separating their listeners into a dedicated class for listening to that plugin.
This can be utilized by adding a `@softDepend PluginName` to the event handler's annotations.
If the plugin providing the event does not exist or is not loaded, then the handler will silently not be registered.
If it does exist and the event is not found, the original behaviour applies and an exception will be thrown.
This change should be fully backwards compatible.
2018-05-01 14:33:24 +01:00
Dylan K. Taylor
d8f4dde5f3
PlayerHotbarPacket: remove unused import
2018-05-01 14:09:17 +01:00
Dylan K. Taylor
dfa6cd2b7e
Biome: Moved biome classes from level\generator\* to level\biome
2018-05-01 14:07:46 +01:00
Dylan K. Taylor
e03d2b23f7
Sign: add some typehints where it wasn't previously possible
2018-05-01 14:00:23 +01:00
Dylan K. Taylor
96a2fd7482
Server: fixed wonky doc comment for broadcastTitle()
2018-05-01 12:30:06 +01:00
Dylan K. Taylor
88c56bcdc8
Server: move formattingCodes check to initial assignment of doTitleTick
2018-05-01 12:21:41 +01:00
Dylan K. Taylor
2731fc3d0f
Server: remove redundant return value from tick()
2018-05-01 12:17:11 +01:00
Dylan K. Taylor
a02f178f80
PocketMine.php: add git hash length check "just in case"
2018-04-29 18:07:40 +01:00
Dylan K. Taylor
96d26a77a1
Explosion: set block damage to zero on destruction
2018-04-16 14:30:54 +01:00
Dylan K. Taylor
532269a484
Implemented block break XP drops
2018-04-15 19:03:18 +01:00
Dylan K. Taylor
1e2122d854
avoid crashing in forceShutdown() if properties wasn't initialized yet
2018-04-14 12:45:03 +01:00
Dylan K. Taylor
c276ef2b7f
Updated dependency versions
2018-04-13 20:09:18 +01:00