SteamWar/BungeeCore
Archiviert
13
2

Add SilentMute Punishment type
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-03-31 12:49:55 +02:00
Ursprung b59189ec48
Commit ee4090941e
7 geänderte Dateien mit 19 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -128,6 +128,7 @@ public class BungeeCore extends Plugin {
// Punishment Commands: // Punishment Commands:
new PunishmentCommand("ban", Punishment.PunishmentType.Ban); new PunishmentCommand("ban", Punishment.PunishmentType.Ban);
new PunishmentCommand("mute", Punishment.PunishmentType.Mute); new PunishmentCommand("mute", Punishment.PunishmentType.Mute);
new PunishmentCommand("silentmute", Punishment.PunishmentType.SilentMute);
new PunishmentCommand("noschemreceiving", Punishment.PunishmentType.NoSchemReceiving); new PunishmentCommand("noschemreceiving", Punishment.PunishmentType.NoSchemReceiving);
new PunishmentCommand("noschemsharing", Punishment.PunishmentType.NoSchemSharing); new PunishmentCommand("noschemsharing", Punishment.PunishmentType.NoSchemSharing);
new PunishmentCommand("noschemsubmitting", Punishment.PunishmentType.NoSchemSubmitting); new PunishmentCommand("noschemsubmitting", Punishment.PunishmentType.NoSchemSubmitting);

Datei anzeigen

@ -51,7 +51,7 @@ public class IngameChatListener extends BasicDiscordListener {
event.getMessage().delete().queue(); event.getMessage().delete().queue();
return; return;
} }
if (steamwarUser.isPunished(Punishment.PunishmentType.Mute) || steamwarUser.isPunished(Punishment.PunishmentType.Ban)) { if (steamwarUser.isPunished(Punishment.PunishmentType.Mute) || steamwarUser.isPunished(Punishment.PunishmentType.SilentMute) || steamwarUser.isPunished(Punishment.PunishmentType.Ban)) {
event.getMessage().delete().queue(); event.getMessage().delete().queue();
return; return;
} }

Datei anzeigen

@ -49,6 +49,9 @@ public class MsgCommand extends BasicCommand {
} }
SteamwarUser user = SteamwarUser.get(player); SteamwarUser user = SteamwarUser.get(player);
if (user.isPunished(Punishment.PunishmentType.SilentMute)) {
return;
}
if (user.isPunishedWithMessage(player, Punishment.PunishmentType.Mute)) { if (user.isPunishedWithMessage(player, Punishment.PunishmentType.Mute)) {
return; return;
} }

Datei anzeigen

@ -45,6 +45,9 @@ public class RCommand extends BasicCommand {
} }
SteamwarUser user = SteamwarUser.get(player); SteamwarUser user = SteamwarUser.get(player);
if (user.isPunished(Punishment.PunishmentType.SilentMute)) {
return;
}
if (user.isPunishedWithMessage(player, Punishment.PunishmentType.Mute)) { if (user.isPunishedWithMessage(player, Punishment.PunishmentType.Mute)) {
return; return;
} }

Datei anzeigen

@ -151,6 +151,9 @@ public class ChatListener extends BasicListener {
} }
SteamwarUser user = SteamwarUser.get(sender); SteamwarUser user = SteamwarUser.get(sender);
if (user.isPunished(Punishment.PunishmentType.SilentMute)) {
return;
}
if (user.isPunishedWithMessage(sender, Punishment.PunishmentType.Mute)) { if (user.isPunishedWithMessage(sender, Punishment.PunishmentType.Mute)) {
e.setCancelled(true); e.setCancelled(true);
return; return;
@ -235,6 +238,9 @@ public class ChatListener extends BasicListener {
} }
SteamwarUser user = SteamwarUser.get(sender); SteamwarUser user = SteamwarUser.get(sender);
if (user.isPunished(Punishment.PunishmentType.SilentMute)) {
return;
}
if (user.isPunishedWithMessage(sender, Punishment.PunishmentType.Mute)) { if (user.isPunishedWithMessage(sender, Punishment.PunishmentType.Mute)) {
e.setCancelled(true); e.setCancelled(true);
return; return;

Datei anzeigen

@ -131,6 +131,7 @@ public class Punishment {
public enum PunishmentType { public enum PunishmentType {
Ban(false, "BAN_TEAM", "BAN_PERMA", "BAN_UNTIL", "UNBAN_ERROR", "UNBAN"), Ban(false, "BAN_TEAM", "BAN_PERMA", "BAN_UNTIL", "UNBAN_ERROR", "UNBAN"),
Mute( false, "MUTE_TEAM", "MUTE_PERMA", "MUTE_UNTIL", "UNMUTE_ERROR", "UNMUTE"), Mute( false, "MUTE_TEAM", "MUTE_PERMA", "MUTE_UNTIL", "UNMUTE_ERROR", "UNMUTE"),
SilentMute( false, "SILENTMUTE_TEAM", "", "", "UNSILENTMUTE_ERROR", "UNSILENTMUTE"),
NoSchemReceiving(false, "NOSCHEMRECEIVING_TEAM", "NOSCHEMRECEIVING_PERMA", "NOSCHEMRECEIVING_UNTIL", "UNNOSCHEMRECEIVING_ERROR", "UNNOSCHEMRECEIVING"), NoSchemReceiving(false, "NOSCHEMRECEIVING_TEAM", "NOSCHEMRECEIVING_PERMA", "NOSCHEMRECEIVING_UNTIL", "UNNOSCHEMRECEIVING_ERROR", "UNNOSCHEMRECEIVING"),
NoSchemSharing(false, "NOSCHEMSHARING_TEAM", "NOSCHEMSHARING_PERMA", "NOSCHEMSHARING_UNTIL", "UNNOSCHEMSHARING_ERROR", "UNNOSCHEMSHARING"), NoSchemSharing(false, "NOSCHEMSHARING_TEAM", "NOSCHEMSHARING_PERMA", "NOSCHEMSHARING_UNTIL", "UNNOSCHEMSHARING_ERROR", "UNNOSCHEMSHARING"),
NoSchemSubmitting(true, "NOSCHEMSUBMITTING_TEAM", "NOSCHEMSUBMITTING_PERMA", "NOSCHEMSUBMITTING_UNTIL", "UNNOSCHEMSUBMITTING_ERROR", "UNNOSCHEMSUBMITTING"), NoSchemSubmitting(true, "NOSCHEMSUBMITTING_TEAM", "NOSCHEMSUBMITTING_PERMA", "NOSCHEMSUBMITTING_UNTIL", "UNNOSCHEMSUBMITTING_ERROR", "UNNOSCHEMSUBMITTING"),

Datei anzeigen

@ -130,6 +130,10 @@ MUTE_UNTIL=§7Du bist §ebis zum {0} §e§lgemuted§8. §7Grund§8: §e{1}
UNMUTE_ERROR=§cDer Spieler ist nicht gemuted. UNMUTE_ERROR=§cDer Spieler ist nicht gemuted.
UNMUTE=§7Du hast §e{0} §e§lentmuted. UNMUTE=§7Du hast §e{0} §e§lentmuted.
SILENTMUTE_TEAM={0} §e{1} §7wurde von §e{2} {3} §e§lgemuted§8. §7Grund§8: §f{4}
UNSILENTMUTE_ERROR=§cDer Spieler ist nicht gemuted.
UNSILENTMUTE=§7Du hast §e{0} §e§lentmuted.
NOSCHEMRECEIVING_TEAM={0} §e{1} §7wurde von §e{2} {3} §7vom §e§lSchematicerhalten ausgeschlossen§8. §7Grund§8: §f{4} NOSCHEMRECEIVING_TEAM={0} §e{1} §7wurde von §e{2} {3} §7vom §e§lSchematicerhalten ausgeschlossen§8. §7Grund§8: §f{4}
NOSCHEMRECEIVING_PERMA=§7Du bist §epermanent §7vom Erhalten von §e§lSchematics ausgeschlossen§8. §7Grund§8: §e{0} NOSCHEMRECEIVING_PERMA=§7Du bist §epermanent §7vom Erhalten von §e§lSchematics ausgeschlossen§8. §7Grund§8: §e{0}
NOSCHEMRECEIVING_UNTIL=§7Du bist §ebis zum {0} §7vom Erhalten von §e§lSchematics ausgeschlossen§8. §7Grund§8: §e{1} NOSCHEMRECEIVING_UNTIL=§7Du bist §ebis zum {0} §7vom Erhalten von §e§lSchematics ausgeschlossen§8. §7Grund§8: §e{1}