Skip to content

Commit

Permalink
tidy & remove non-essential changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Nov 16, 2024
1 parent d772b19 commit e994606
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 249 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,16 @@

use pocketmine\command\CommandSender;
use pocketmine\lang\Translatable;
use pocketmine\permission\Permissible;

/**
* This interface can be implemented in order to receive messages from the server's global broadcast channels.
*/
interface MessageChannelSubscriber{
interface MessageBroadcastSubscriber{

/**
* Called when a message is broadcasted on any channel that this receiver is subscribed to.
*
* @see Server::subscribeToBroadcastChannel()
*/
public function onMessage(string $channelId, CommandSender $source, Translatable|string $message) : void;

/**
* Used to check if the subscriber is allowed to receive messages from channels with permission restrictions.
* If this function returns null, the subscriber will receive all messages regardless of permissions.
*/
public function getPermissible() : ?Permissible;
public function onMessage(CommandSender $source, Translatable|string $message, string $channelId) : void;
}
145 changes: 0 additions & 145 deletions src/MessageChannel.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
use pocketmine\command\CommandSender;
use pocketmine\lang\Translatable;

interface MinecraftMessageChannelSubscriber extends MessageChannelSubscriber{
interface MinecraftMessageBroadcastSubscriber extends MessageBroadcastSubscriber{

public function onTip(string $channelId, CommandSender $source, Translatable|string $message) : void;
public function onTip(CommandSender $source, Translatable|string $message, string $channelId) : void;

public function onPopup(string $channelId, CommandSender $source, Translatable|string $message) : void;
public function onPopup(CommandSender $source, Translatable|string $message, string $channelId) : void;

public function onTitle(string $channelId, CommandSender $source, string $title, string $subtitle = "", int $fadeIn = -1, int $stay = -1, int $fadeOut = -1) : void;
public function onTitle(CommandSender $source, string $title, string $subtitle, int $fadeIn, int $stay, int $fadeOut, string $channelId) : void;
}
Loading

0 comments on commit e994606

Please sign in to comment.