Revert "Add BroadcastEvent"

This reverts commit aab5083f78.
This commit is contained in:
Telesphoreo 2024-01-26 17:13:11 -06:00
parent 7b56bd70e9
commit 6b7c076c41
2 changed files with 0 additions and 33 deletions

View File

@ -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;
}
}

View File

@ -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)