geforkt von SteamWar/PersistentBungeeCore
Moved Fabric Class
Dieser Commit ist enthalten in:
Ursprung
d699f639ab
Commit
0fcaec50b2
@ -1,33 +0,0 @@
|
||||
package de.steamwar.bungeecore;
|
||||
|
||||
import net.md_5.bungee.api.connection.Connection;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
|
||||
import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||
import net.md_5.bungee.api.plugin.Listener;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
|
||||
public class Fabric implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onPluginMessageEvent(PluginMessageEvent e){
|
||||
Connection sender = e.getSender();
|
||||
if(!(sender instanceof ProxiedPlayer))
|
||||
return;
|
||||
|
||||
if(!e.getTag().equals("minecraft:brand"))
|
||||
return;
|
||||
|
||||
if(new String(e.getData()).contains("fabric")){
|
||||
ProxiedPlayer p = (ProxiedPlayer) sender;
|
||||
//p.disconnect(BungeeCore.stringToText("§7Die Verwendung von Fabric ist auf §eSteam§8War §7nicht gestattet."));
|
||||
Storage.fabricPlayers.add(p);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDisconnect(PlayerDisconnectEvent e){
|
||||
Storage.fabricPlayers.removeIf(player -> player == e.getPlayer());
|
||||
|
||||
}
|
||||
}
|
@ -49,7 +49,6 @@ public class Persistent extends Plugin {
|
||||
PluginUtils.loadPlugin(new File(getProxy().getPluginsFolder(), "BungeeCore.jar"));
|
||||
}
|
||||
});
|
||||
getProxy().getPluginManager().unregisterListener(new Fabric());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren