mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
And register it
This commit is contained in:
1 parent
4f9ba91bec
commit
c62c30ee5e
2 files changed
+4
-1
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
package net.draycia.carbon.bukkit;
|
package net.draycia.carbon.bukkit;
|
||||||
|
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
|
import net.draycia.carbon.bukkit.listeners.BukkitChatListener;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
@@ -32,6 +33,8 @@ public class CarbonChatBukkitEntry extends JavaPlugin {
|
|||||||
|
|
||||||
final Metrics metrics = new Metrics(this, BSTATS_PLUGIN_ID);
|
final Metrics metrics = new Metrics(this, BSTATS_PLUGIN_ID);
|
||||||
|
|
||||||
|
Bukkit.getPluginManager().registerEvents(new BukkitChatListener(this.carbon), this);
|
||||||
|
|
||||||
this.carbon.initialize();
|
this.carbon.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class BukkitChatListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerchat(final @NonNull AsyncChatEvent event) {
|
public void onPlayerChat(final @NonNull AsyncChatEvent event) {
|
||||||
// There's no guarantee that recipients is mutable.
|
// There's no guarantee that recipients is mutable.
|
||||||
// If it's ever immutable, we yell at who ever is responsible.
|
// If it's ever immutable, we yell at who ever is responsible.
|
||||||
event.recipients().clear();
|
event.recipients().clear();
|
||||||
|
|||||||
Reference in new issue
Block a user