mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
parent
7b56bd70e9
commit
6b7c076c41
@ -1,30 +0,0 @@
|
||||
package dev.plex.event;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BroadcastEvent extends Event
|
||||
{
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final Component message;
|
||||
|
||||
private final String string;
|
||||
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull HandlerList getHandlers()
|
||||
{
|
||||
return handlers;
|
||||
}
|
||||
}
|
@ -4,7 +4,6 @@ import com.google.common.base.CharMatcher;
|
||||
import com.google.common.collect.Lists;
|
||||
import dev.plex.Plex;
|
||||
import dev.plex.PlexBase;
|
||||
import dev.plex.event.BroadcastEvent;
|
||||
import dev.plex.listener.impl.ChatListener;
|
||||
import dev.plex.storage.StorageType;
|
||||
import dev.plex.util.minimessage.SafeMiniMessage;
|
||||
@ -292,13 +291,11 @@ public class PlexUtils implements PlexBase
|
||||
public static void broadcast(String s)
|
||||
{
|
||||
Bukkit.broadcast(MINI_MESSAGE.deserialize(s));
|
||||
Bukkit.getServer().getPluginManager().callEvent(new BroadcastEvent(null, s));
|
||||
}
|
||||
|
||||
public static void broadcast(Component component)
|
||||
{
|
||||
Bukkit.broadcast(component);
|
||||
Bukkit.getServer().getPluginManager().callEvent(new BroadcastEvent(component, null));
|
||||
}
|
||||
|
||||
public static void broadcastToAdmins(Component component, String permission)
|
||||
|
Loading…
Reference in New Issue
Block a user