mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 23:37:45 +00:00
More typehints for Command stuff
This commit is contained in:
@@ -40,7 +40,7 @@ class BanCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.ban.player");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class BanIpCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.ban.ip");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class BanListCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.ban.list");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class DefaultGamemodeCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.defaultgamemode");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class DeopCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.op.take");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class DifficultyCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.difficulty");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class DumpMemoryCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.dumpmemory");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class EffectCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.effect");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class EnchantCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.enchant");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class GamemodeCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.gamemode");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ class GarbageCollectorCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.gc");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ class GiveCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.give");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class HelpCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.help");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class KickCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.kick");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class KillCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.kill.self;pocketmine.command.kill.other");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class ListCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.list");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class MeCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.me");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class OpCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.op.give");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class PardonCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.unban.player");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class PardonIpCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.unban.ip");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ class ParticleCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.particle");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class PluginsCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.plugins");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ class ReloadCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.reload");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class SaveCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.save.perform");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class SaveOffCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.save.disable");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class SaveOnCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.save.enable");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class SayCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.say");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class SeedCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.seed");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class SetWorldSpawnCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.setworldspawn");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.spawnpoint");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class StatusCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.status");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class StopCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.stop");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class TeleportCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.teleport");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class TellCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.tell");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class TimeCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.time.add;pocketmine.command.time.set;pocketmine.command.time.start;pocketmine.command.time.stop");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(count($args) < 1){
|
||||
throw new InvalidCommandSyntaxException();
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ class TimingsCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.timings");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class TitleCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.title");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class TransferServerCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.transferserver");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $commandLabel, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(count($args) < 1){
|
||||
throw new InvalidCommandSyntaxException();
|
||||
}elseif(!($sender instanceof Player)){
|
||||
|
@@ -41,7 +41,7 @@ class VersionCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.version");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class WhitelistCommand extends VanillaCommand{
|
||||
$this->setPermission("pocketmine.command.whitelist.reload;pocketmine.command.whitelist.enable;pocketmine.command.whitelist.disable;pocketmine.command.whitelist.list;pocketmine.command.whitelist.add;pocketmine.command.whitelist.remove");
|
||||
}
|
||||
|
||||
public function execute(CommandSender $sender, $currentAlias, array $args){
|
||||
public function execute(CommandSender $sender, string $commandLabel, array $args){
|
||||
if(!$this->testPermission($sender)){
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user