Skip to content

Commit

Permalink
Fix Island Chat
Browse files Browse the repository at this point in the history
  • Loading branch information
DuoIncure committed Oct 21, 2022
1 parent 749a157 commit 7ee6b78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ permissions:
skyblockspm.accept:
default: true
description: Accept the incoming invite to a SkyBlock island
skyblockspm.chat:
default: true
description: SkyBlocks Island Chat
skyblockspm.chat:
default: true
description: SkyBlocks Island Chat
2 changes: 1 addition & 1 deletion src/Vecnavium/SkyBlocksPM/commands/SkyBlockCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class SkyBlockCommand extends BaseCommand
public function prepare(): void
{
$this->setPermission('skyblockspm.command');
$this->registerSubCommand(new ChatSubCommand('chat', 'Chat with your island members'));
$this->registerSubCommand(new AcceptSubCommand('accept', 'Accept the incoming invite to a SkyBlock island'));
$this->registerSubCommand(new ChatSubCommand('chat', 'Chat with your island members'));
$this->registerSubCommand(new CreateSubCommand('create', 'Create your own SkyBlock island'));
$this->registerSubCommand(new DeleteSubCommand('delete', 'Delete a users SkyBlock Island'));
$this->registerSubCommand(new SetWorldCommand('setworld', 'Sets the current world as the SkyBlock World which will be copied to newer worlds upon Island creation'));
Expand Down
2 changes: 1 addition & 1 deletion src/Vecnavium/SkyBlocksPM/listener/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function onPlayerDamage(EntityDamageEvent $event): void

public function onChat(PlayerChatEvent $event): void
{
if (!in_array($event->getPlayer(), SkyBlocksPM::getInstance()->getChat())) return;
if (!in_array($event->getPlayer()->getName(), SkyBlocksPM::getInstance()->getChat())) return;

$skyBlock = SkyBlocksPM::getInstance()->getSkyBlockManager()->getSkyBlockByUuid(SkyBlocksPM::getInstance()->getPlayerManager()->getPlayer($event->getPlayer())->getSkyBlock());
if (!$skyBlock instanceof SkyBlock)
Expand Down

0 comments on commit 7ee6b78

Please sign in to comment.