geforkt von SteamWar/BungeeCore
Add Fabric Challenge
Dieser Commit ist enthalten in:
Ursprung
bebf5cdebb
Commit
d3cbf29a3f
@ -20,6 +20,7 @@
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.*;
|
||||
import de.steamwar.bungeecore.listeners.mods.Fabric;
|
||||
import de.steamwar.bungeecore.sql.IgnoreSystem;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@ -46,6 +47,11 @@ public class ChallengeCommand extends BasicCommand {
|
||||
if (!(sender instanceof ProxiedPlayer))
|
||||
return;
|
||||
|
||||
if(Fabric.isFabric((ProxiedPlayer) sender)) {
|
||||
BungeeCore.send((ProxiedPlayer) sender, BungeeCore.CHAT_PREFIX + "§cHat ich dir nicht gesagt, dass man mit Fabric nicht auf die Arenen darf?");
|
||||
return;
|
||||
}
|
||||
|
||||
ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]);
|
||||
if(target == null){
|
||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cDer Herausgeforderte ist nicht online.");
|
||||
|
@ -20,6 +20,7 @@
|
||||
package de.steamwar.bungeecore.commands;
|
||||
|
||||
import de.steamwar.bungeecore.*;
|
||||
import de.steamwar.bungeecore.listeners.mods.Fabric;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
@ -127,6 +128,11 @@ public class FightCommand extends BasicCommand {
|
||||
if(!(sender instanceof ProxiedPlayer))
|
||||
return;
|
||||
|
||||
if(Fabric.isFabric((ProxiedPlayer) sender)) {
|
||||
BungeeCore.send((ProxiedPlayer) sender, BungeeCore.CHAT_PREFIX + "§cHat ich dir nicht gesagt, dass man mit Fabric nicht auf die Arenen darf?");
|
||||
return;
|
||||
}
|
||||
|
||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||
if(alreadyInArena(player))
|
||||
return;
|
||||
|
@ -63,4 +63,8 @@ public class Fabric extends BasicListener {
|
||||
BungeeCore.send(event.getPlayer(), BungeeCore.CHAT_PREFIX + "§cDu kannst nicht auf die Arena mit Fabric");
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isFabric(ProxiedPlayer player) {
|
||||
return Storage.fabricPlayers.contains(player);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren