Skip to content

Commit e7770f8

Browse files
authored
Update FactionCommands.php
1 parent 2bc17be commit e7770f8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/FactionsPro/FactionCommands.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function onCommand(CommandSender $sender, Command $command, string $label
253253
return true;
254254
}
255255
$player = $this->plugin->getServer()->getPlayerExact($args[1]);
256-
if (!($player instanceof Player)) {
256+
if ($player instanceof Player) {
257257
if ($player->getName() == $playerName) {
258258
$sender->sendMessage($this->plugin->formatMessage("$prefix §cYou can't promote yourself"));
259259
return true;
@@ -295,7 +295,7 @@ public function onCommand(CommandSender $sender, Command $command, string $label
295295
return true;
296296
}
297297
$player = $this->plugin->getServer()->getPlayerExact($args[1]);
298-
if (!($player instanceof Player)) {
298+
if ($player instanceof Player) {
299299
if ($player->getName() == $playerName) {
300300
$sender->sendMessage($this->plugin->formatMessage("$prefix §cYou can't demote yourself"));
301301
return true;
@@ -337,7 +337,7 @@ public function onCommand(CommandSender $sender, Command $command, string $label
337337
return true;
338338
}
339339
$player = $this->plugin->getServer()->getPlayerExact($args[1]);
340-
if (!($player instanceof Player)) {
340+
if ($player instanceof Player) {
341341
if ($player->getName() == $playerName) {
342342
$sender->sendMessage($this->plugin->formatMessage("$prefix §cYou can't kick yourself"));
343343
return true;

0 commit comments

Comments
 (0)