geforkt von SteamWar/BungeeCore
Added LiteLoader Blocking
Dieser Commit ist enthalten in:
Ursprung
a984cf4d9a
Commit
7893d7a691
@ -22,7 +22,7 @@ package de.steamwar.bungeecore;
|
||||
import de.steamwar.bungeecore.commands.*;
|
||||
import de.steamwar.bungeecore.comms.SpigotReceiver;
|
||||
import de.steamwar.bungeecore.listeners.*;
|
||||
import de.steamwar.bungeecore.listeners.mods.Fabric;
|
||||
import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker;
|
||||
import de.steamwar.bungeecore.listeners.mods.Forge;
|
||||
import de.steamwar.bungeecore.listeners.mods.LabyMod;
|
||||
import de.steamwar.bungeecore.sql.SQL;
|
||||
@ -83,7 +83,7 @@ public class BungeeCore extends Plugin {
|
||||
new ChatListener();
|
||||
new BanListener();
|
||||
new CheckListener();
|
||||
new Fabric();
|
||||
new ModLoaderBlocker();
|
||||
|
||||
commands.put("/b", null);
|
||||
commands.put("/gs", null);
|
||||
|
@ -20,7 +20,7 @@
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.*;
|
||||
import de.steamwar.bungeecore.listeners.mods.Fabric;
|
||||
import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker;
|
||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@ -47,7 +47,7 @@ public class ChallengeCommand extends BasicCommand {
|
||||
if (!(sender instanceof ProxiedPlayer))
|
||||
return;
|
||||
|
||||
if(Fabric.isFabric((ProxiedPlayer) sender)) {
|
||||
if(ModLoaderBlocker.isFabric((ProxiedPlayer) sender)) {
|
||||
BungeeCore.send((ProxiedPlayer) sender, BungeeCore.CHAT_PREFIX + "§cHabe ich dir nicht gesagt, dass man mit Fabric nicht auf die Arenen darf?");
|
||||
return;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.*;
|
||||
import de.steamwar.bungeecore.listeners.mods.Fabric;
|
||||
import de.steamwar.bungeecore.listeners.mods.ModLoaderBlocker;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@ -128,7 +128,7 @@ public class FightCommand extends BasicCommand {
|
||||
if(!(sender instanceof ProxiedPlayer))
|
||||
return;
|
||||
|
||||
if(Fabric.isFabric((ProxiedPlayer) sender)) {
|
||||
if(ModLoaderBlocker.isFabric((ProxiedPlayer) sender) && !precommand.equals("/bau testarena")) {
|
||||
BungeeCore.send((ProxiedPlayer) sender, BungeeCore.CHAT_PREFIX + "§cHabe ich dir nicht gesagt, dass man mit Fabric nicht auf die Arenen darf?");
|
||||
return;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ import net.md_5.bungee.api.event.PluginMessageEvent;
|
||||
import net.md_5.bungee.api.event.ServerSwitchEvent;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
|
||||
public class Fabric extends BasicListener {
|
||||
public class ModLoaderBlocker extends BasicListener {
|
||||
|
||||
@EventHandler
|
||||
public void onPluginMessageEvent(PluginMessageEvent e){
|
||||
@ -46,6 +46,10 @@ public class Fabric extends BasicListener {
|
||||
ProxiedPlayer p = (ProxiedPlayer) sender;
|
||||
Storage.fabricPlayers.add(p);
|
||||
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du hast Fabric installiert. Mit Fabric kannst du nicht auf die Arenen");
|
||||
}else if(new String(e.getData()).contains("LiteLoader")) {
|
||||
ProxiedPlayer p = (ProxiedPlayer) sender;
|
||||
Storage.fabricPlayers.add(p);
|
||||
BungeeCore.send(p, BungeeCore.CHAT_PREFIX + "§7Du hast LiteLoader installiert. Mit LireLoader kannst du nicht auf die Arenen");
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,7 +64,7 @@ public class Fabric extends BasicListener {
|
||||
&& Subserver.getSubserver(event.getPlayer()).getType() == Servertype.ARENA
|
||||
&& isFabric(event.getPlayer())) {
|
||||
event.getPlayer().connect(BungeeCore.get().getProxy().getServerInfo(BungeeCore.LOBBY_SERVER));
|
||||
BungeeCore.send(event.getPlayer(), BungeeCore.CHAT_PREFIX + "§cDu kannst nicht auf die Arena mit Fabric");
|
||||
BungeeCore.send(event.getPlayer(), BungeeCore.CHAT_PREFIX + "§cMit Fabric und LiteLoader kannst du nicht auf die Arenen");
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren