mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-27 06:06:40 +00:00
add the ability to overide the chat
This commit is contained in:
8
api/src/main/java/dev/plex/api/chat/IChatHandler.java
Normal file
8
api/src/main/java/dev/plex/api/chat/IChatHandler.java
Normal file
@ -0,0 +1,8 @@
|
||||
package dev.plex.api.chat;
|
||||
|
||||
import io.papermc.paper.event.player.AsyncChatEvent;
|
||||
|
||||
public interface IChatHandler
|
||||
{
|
||||
void doChat(AsyncChatEvent event);
|
||||
}
|
28
api/src/main/java/dev/plex/api/plugin/PlexPlugin.java
Normal file
28
api/src/main/java/dev/plex/api/plugin/PlexPlugin.java
Normal file
@ -0,0 +1,28 @@
|
||||
package dev.plex.api.plugin;
|
||||
|
||||
import dev.plex.api.chat.IChatHandler;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public abstract class PlexPlugin extends JavaPlugin
|
||||
{
|
||||
@Setter(AccessLevel.NONE)
|
||||
private static PlexPlugin plugin;
|
||||
|
||||
private IChatHandler chatHandler;
|
||||
|
||||
@Override
|
||||
public void onLoad()
|
||||
{
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
public static PlexPlugin get()
|
||||
{
|
||||
return plugin;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user