Commit c1fac042 authored by SuperXingKong's avatar SuperXingKong
Browse files

Commands are available now! Fixed #1101

parent ca9dd604
...@@ -745,12 +745,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade ...@@ -745,12 +745,12 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$data = new \stdClass(); $data = new \stdClass();
$count = 0; $count = 0;
foreach($this->server->getCommandMap()->getCommands() as $command){ foreach($this->server->getCommandMap()->getCommands() as $command){
if($this->hasPermission($command->getPermission()) or $command->getPermission() == null) { //if($this->hasPermission($command->getPermission()) or $command->getPermission() == null) {
if (($cmdData = $command->generateCustomCommandData($this)) !== null){ if (($cmdData = $command->generateCustomCommandData($this)) !== null){
++$count; ++$count;
$data->{$command->getName()}->versions[0] = $cmdData; $data->{$command->getName()}->versions[0] = $cmdData;
} }
} //}
} }
if($count > 0){ if($count > 0){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment