geforkt von SteamWar/BungeeCore
Fix Errors
Dieser Commit ist enthalten in:
Ursprung
a7525dd8a1
Commit
98326fcaa0
@ -102,7 +102,7 @@ public class Fabric extends BasicListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!modsAreAbsent(mods)) {
|
if(!neededModsContained(mods)) {
|
||||||
banPlayer(user, player);
|
banPlayer(user, player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -124,20 +124,19 @@ public class Fabric extends BasicListener {
|
|||||||
return isSorted;
|
return isSorted;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean modsAreAbsent(List<Mod> mods) {
|
private boolean neededModsContained(List<Mod> mods) {
|
||||||
return mods.stream()
|
return mods.stream()
|
||||||
.map(Mod::getModName)
|
.map(Mod::getModName)
|
||||||
.filter(neededMods::contains)
|
.filter(neededMods::contains)
|
||||||
.distinct()
|
|
||||||
.count() == neededMods.size();
|
.count() == neededMods.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void banPlayer(SteamwarUser user, ProxiedPlayer player) {
|
public void banPlayer(SteamwarUser user, ProxiedPlayer player) {
|
||||||
user.punish(Punishment.PunishmentType.Ban,
|
user.punish(Punishment.PunishmentType.Ban,
|
||||||
Timestamp.from(Instant.now()),
|
Timestamp.from(Instant.now()),
|
||||||
Message.parse("MODIFICATION_BAN_MESSAGE", player),
|
Message.parse("MODIFICATION_BAN_MESSAGE", player, user.getUserName(), user.getId()),
|
||||||
0,
|
0,
|
||||||
true);
|
true);
|
||||||
BungeeCore.log(Level.SEVERE, user.getUserName() + " " + user.getId() + Message.parse("MODIFICATION_BAN_LOG", player));
|
BungeeCore.log(Level.SEVERE, user.getUserName() + " " + user.getId() + Message.parse("MODIFICATION_BAN_LOG", player, user.getUserName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -586,5 +586,5 @@ RANK_NEEDED_FIGHTS_LEFT={0} §8(§7noch §e{1}§7 Kämpfe nötig§8)
|
|||||||
|
|
||||||
#Fabric Mod Sender
|
#Fabric Mod Sender
|
||||||
MODIFICATION_BAN_MESSAGE="Du hast probiert den FabricModSender zu umgehen / zu modifizieren!"
|
MODIFICATION_BAN_MESSAGE="Du hast probiert den FabricModSender zu umgehen / zu modifizieren!"
|
||||||
MODIFICATION_BAN_LOG = " hat probiert den Fabric Mod Sender zu editieren / umzugehen!"
|
MODIFICATION_BAN_LOG= "{0} hat probiert den Fabric Mod Sender zu editieren / umzugehen!"
|
||||||
MODIFICATION_CHECK_SUCCESS="§eDeine Mods wurden geprüft und du darfst nun auf Arenen joinen!"
|
MODIFICATION_CHECK_SUCCESS="§eDeine Mods wurden geprüft und du darfst nun auf Arenen joinen!"
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren