mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Enable status,gc,dumpmemory OOB
dumpmemory has been confined to console by default due to the hazards it poses to a running server. closes #2528
This commit is contained in:
parent
946a1036f1
commit
93969197f7
@ -100,9 +100,11 @@ class SimpleCommandMap implements CommandMap{
|
|||||||
new DefaultGamemodeCommand("defaultgamemode"),
|
new DefaultGamemodeCommand("defaultgamemode"),
|
||||||
new DeopCommand("deop"),
|
new DeopCommand("deop"),
|
||||||
new DifficultyCommand("difficulty"),
|
new DifficultyCommand("difficulty"),
|
||||||
|
new DumpMemoryCommand("dumpmemory"),
|
||||||
new EffectCommand("effect"),
|
new EffectCommand("effect"),
|
||||||
new EnchantCommand("enchant"),
|
new EnchantCommand("enchant"),
|
||||||
new GamemodeCommand("gamemode"),
|
new GamemodeCommand("gamemode"),
|
||||||
|
new GarbageCollectorCommand("gc"),
|
||||||
new GiveCommand("give"),
|
new GiveCommand("give"),
|
||||||
new HelpCommand("help"),
|
new HelpCommand("help"),
|
||||||
new KickCommand("kick"),
|
new KickCommand("kick"),
|
||||||
@ -122,6 +124,7 @@ class SimpleCommandMap implements CommandMap{
|
|||||||
new SeedCommand("seed"),
|
new SeedCommand("seed"),
|
||||||
new SetWorldSpawnCommand("setworldspawn"),
|
new SetWorldSpawnCommand("setworldspawn"),
|
||||||
new SpawnpointCommand("spawnpoint"),
|
new SpawnpointCommand("spawnpoint"),
|
||||||
|
new StatusCommand("status"),
|
||||||
new StopCommand("stop"),
|
new StopCommand("stop"),
|
||||||
new TeleportCommand("tp"),
|
new TeleportCommand("tp"),
|
||||||
new TellCommand("tell"),
|
new TellCommand("tell"),
|
||||||
@ -132,14 +135,6 @@ class SimpleCommandMap implements CommandMap{
|
|||||||
new VersionCommand("version"),
|
new VersionCommand("version"),
|
||||||
new WhitelistCommand("whitelist")
|
new WhitelistCommand("whitelist")
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if($this->server->getProperty("debug.commands", false)){
|
|
||||||
$this->registerAll("pocketmine", [
|
|
||||||
new StatusCommand("status"),
|
|
||||||
new GarbageCollectorCommand("gc"),
|
|
||||||
new DumpMemoryCommand("dumpmemory")
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ abstract class DefaultPermissions{
|
|||||||
self::registerPermission(new Permission(self::ROOT . ".command.seed", "Allows the user to view the seed of the world", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.seed", "Allows the user to view the seed of the world", Permission::DEFAULT_OP), $commands);
|
||||||
self::registerPermission(new Permission(self::ROOT . ".command.status", "Allows the user to view the server performance", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.status", "Allows the user to view the server performance", Permission::DEFAULT_OP), $commands);
|
||||||
self::registerPermission(new Permission(self::ROOT . ".command.gc", "Allows the user to fire garbage collection tasks", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.gc", "Allows the user to fire garbage collection tasks", Permission::DEFAULT_OP), $commands);
|
||||||
self::registerPermission(new Permission(self::ROOT . ".command.dumpmemory", "Allows the user to dump memory contents", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.dumpmemory", "Allows the user to dump memory contents", Permission::DEFAULT_FALSE), $commands);
|
||||||
self::registerPermission(new Permission(self::ROOT . ".command.timings", "Allows the user to records timings for all plugin events", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.timings", "Allows the user to records timings for all plugin events", Permission::DEFAULT_OP), $commands);
|
||||||
self::registerPermission(new Permission(self::ROOT . ".command.spawnpoint", "Allows the user to change player's spawnpoint", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.spawnpoint", "Allows the user to change player's spawnpoint", Permission::DEFAULT_OP), $commands);
|
||||||
self::registerPermission(new Permission(self::ROOT . ".command.setworldspawn", "Allows the user to change the world spawn", Permission::DEFAULT_OP), $commands);
|
self::registerPermission(new Permission(self::ROOT . ".command.setworldspawn", "Allows the user to change the world spawn", Permission::DEFAULT_OP), $commands);
|
||||||
|
@ -98,8 +98,6 @@ network:
|
|||||||
debug:
|
debug:
|
||||||
#If > 1, it will show debug messages in the console
|
#If > 1, it will show debug messages in the console
|
||||||
level: 1
|
level: 1
|
||||||
#Enables /status, /gc
|
|
||||||
commands: false
|
|
||||||
|
|
||||||
player:
|
player:
|
||||||
#Choose whether to enable player data saving.
|
#Choose whether to enable player data saving.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user