geforkt von SteamWar/BungeeCore
Update Punishment, messages not final
Dieser Commit ist enthalten in:
Ursprung
9da2228806
Commit
ecaba65f79
@ -131,12 +131,9 @@ 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("antischemadd", Punishment.PunishmentType.AntiSchemAdd);
|
new PunishmentCommand("noschemreceiving", Punishment.PunishmentType.NoSchemReceiving);
|
||||||
new PunishmentCommand("antischemadded", Punishment.PunishmentType.AntiSchemAdded);
|
new PunishmentCommand("noschemsharing", Punishment.PunishmentType.NoSchemSharing);
|
||||||
new PunishmentCommand("antischemdownload", Punishment.PunishmentType.AntiSchemDownload);
|
new PunishmentCommand("nodev", Punishment.PunishmentType.NoDevServer);
|
||||||
new PunishmentCommand("antischemupload", Punishment.PunishmentType.AntiSchemUpload);
|
|
||||||
new PunishmentCommand("antibaujoin", Punishment.PunishmentType.AntiBauJoin);
|
|
||||||
new PunishmentCommand("antifightjoin", Punishment.PunishmentType.AntiFightJoin);
|
|
||||||
|
|
||||||
if(!EVENT_MODE){
|
if(!EVENT_MODE){
|
||||||
new BauCommand();
|
new BauCommand();
|
||||||
|
@ -43,12 +43,6 @@ public class BauCommand extends BasicCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
|
||||||
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.AntiBauJoin)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ProxiedPlayer p = (ProxiedPlayer) sender;
|
ProxiedPlayer p = (ProxiedPlayer) sender;
|
||||||
|
|
||||||
if(args.length == 0){
|
if(args.length == 0){
|
||||||
|
@ -41,12 +41,6 @@ public class ChallengeCommand extends BasicCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
|
||||||
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.AntiFightJoin)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(args.length < 1){
|
if(args.length < 1){
|
||||||
Message.send("CHALLENGE_USAGE", sender);
|
Message.send("CHALLENGE_USAGE", sender);
|
||||||
return;
|
return;
|
||||||
|
@ -50,7 +50,7 @@ public class DevCommand extends BasicCommand {
|
|||||||
|
|
||||||
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
||||||
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.AntiBauJoin)) {
|
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.NoDevServer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,12 +165,6 @@ public class FightCommand extends BasicCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
|
||||||
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.AntiFightJoin)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
createArena(sender, "/fight ", args, 0, false, (player, mode, map) -> {
|
createArena(sender, "/fight ", args, 0, false, (player, mode, map) -> {
|
||||||
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, null, null, player.getUniqueId(), null, false);
|
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, null, null, player.getUniqueId(), null, false);
|
||||||
arena.sendPlayer(player);
|
arena.sendPlayer(player);
|
||||||
|
@ -35,12 +35,6 @@ public class HistoricCommand extends BasicCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
|
||||||
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.AntiFightJoin)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FightCommand.createArena(sender, "/historic ", args, 0, true, (player, mode, map) -> {
|
FightCommand.createArena(sender, "/historic ", args, 0, true, (player, mode, map) -> {
|
||||||
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, null, null, player.getUniqueId(), null, false);
|
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, 0, null, null, player.getUniqueId(), null, false);
|
||||||
arena.sendPlayer(player);
|
arena.sendPlayer(player);
|
||||||
|
@ -24,6 +24,7 @@ import de.steamwar.bungeecore.sql.Punishment;
|
|||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
import net.md_5.bungee.BungeeCord;
|
import net.md_5.bungee.BungeeCord;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
@ -39,6 +40,9 @@ public class PunishmentCommand {
|
|||||||
new BasicCommand(command, "bungeecore.ban") {
|
new BasicCommand(command, "bungeecore.ban") {
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
|
if (punishmentType == Punishment.PunishmentType.NoDevServer && !SteamwarUser.get((ProxiedPlayer) sender).getUserGroup().isAdminGroup()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (args.length < 3) {
|
if (args.length < 3) {
|
||||||
Message.send("PUNISHMENT_USAGE", sender, command);
|
Message.send("PUNISHMENT_USAGE", sender, command);
|
||||||
return;
|
return;
|
||||||
@ -66,6 +70,9 @@ public class PunishmentCommand {
|
|||||||
new BasicCommand(antiCommand, "bungeecore.ban") {
|
new BasicCommand(antiCommand, "bungeecore.ban") {
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender sender, String[] args) {
|
public void execute(CommandSender sender, String[] args) {
|
||||||
|
if (punishmentType == Punishment.PunishmentType.NoDevServer && !SteamwarUser.get((ProxiedPlayer) sender).getUserGroup().isAdminGroup()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
Message.send("UNPUNISHMENT_USAGE", sender, antiCommand);
|
Message.send("UNPUNISHMENT_USAGE", sender, antiCommand);
|
||||||
return;
|
return;
|
||||||
|
@ -54,12 +54,6 @@ public class RankedCommand extends BasicCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) sender;
|
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(proxiedPlayer);
|
|
||||||
if (steamwarUser.isPunishedWithMessage(proxiedPlayer, Punishment.PunishmentType.AntiFightJoin)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(args.length < 1){
|
if(args.length < 1){
|
||||||
getModes(sender, "/ranked ");
|
getModes(sender, "/ranked ");
|
||||||
return;
|
return;
|
||||||
|
@ -150,16 +150,5 @@ public class ConnectionListener extends BasicListener {
|
|||||||
if (subserver == null) {
|
if (subserver == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(e.getPlayer());
|
|
||||||
|
|
||||||
if (subserver.getType() == Servertype.BAUSERVER) {
|
|
||||||
if (steamwarUser.isPunishedWithMessage(e.getPlayer(), Punishment.PunishmentType.AntiBauJoin)) {
|
|
||||||
e.setCancelled(true);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (steamwarUser.isPunishedWithMessage(e.getPlayer(), Punishment.PunishmentType.AntiFightJoin)) {
|
|
||||||
e.setCancelled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,12 +131,9 @@ public class Punishment {
|
|||||||
public enum PunishmentType {
|
public enum PunishmentType {
|
||||||
Ban("BAN_TEAM_BANNED", "BANNED_MESSAGE_PERMA", "BANNED_MESSAGE_UNTIL", "UNBAN_NOT_BANNED", "UNBAN_UNBANNED"),
|
Ban("BAN_TEAM_BANNED", "BANNED_MESSAGE_PERMA", "BANNED_MESSAGE_UNTIL", "UNBAN_NOT_BANNED", "UNBAN_UNBANNED"),
|
||||||
Mute( "MUTE_TEAM_MUTED", "MUTED_MESSAGE_PERMA", "MUTED_MESSAGE_UNTIL", "UNMUTE_NOT_MUTED", "UNMUTE_UNMUTED"),
|
Mute( "MUTE_TEAM_MUTED", "MUTED_MESSAGE_PERMA", "MUTED_MESSAGE_UNTIL", "UNMUTE_NOT_MUTED", "UNMUTE_UNMUTED"),
|
||||||
AntiSchemAdd("ANTISCHEMADD_TEAM_ANTISCHEMADD", "ANTISCHEMADD_MESSAGE_PERMA", "ANTISCHEMADD_MESSAGE_UNTIL", "UNANTISCHEMADD_NOT_ANTISCHEMADD", "UNANTISCHEMADD_UNANTISCHEMADDED"),
|
NoSchemReceiving("NOSCHEMRECEIVING_TEAM_NOSCHEMRECEIVING", "NOSCHEMRECEIVING_MESSAGE_PERMA", "NOSCHEMRECEIVING_MESSAGE_UNTIL", "UNNOSCHEMRECEIVING_NOT_NOSCHEMRECEIVING", "UNNOSCHEMRECEIVING_UNNOSCHEMRECEIVING"),
|
||||||
AntiSchemAdded("ANTISCHEMADDED_TEAM_ANTISCHEMADDED", "ANTISCHEMADDED_MESSAGE_PERMA", "ANTISCHEMADDED_MESSAGE_UNTIL", "UNANTISCHEMADDED_NOT_ANTISCHEMADDED", "UNANTISCHEMADDED_UNANTISCHEMADDED"),
|
NoSchemSharing("NOSCHEMSHARING_TEAM_NOSCHEMSHARING", "NOSCHEMSHARING_MESSAGE_PERMA", "NOSCHEMSHARING_MESSAGE_UNTIL", "UNNOSCHEMSHARING_NOT_NOSCHEMSHARING", "UNNOSCHEMSHARING_UNNOSCHEMSHARING"),
|
||||||
AntiSchemDownload("ANTISCHEMDOWNLOAD_TEAM_ANTISCHEMDOWNLOADED", "ANTISCHEMDOWNLOAD_MESSAGE_PERMA", "ANTISCHEMDOWNLOAD_MESSAGE_UNTIL", "UNANTISCHEMDOWNLOAD_NOT_ANTISCHEMDOWNLOADED", "UNANTISCHEMDOWNLOAD_UNANTISCHEMDOWNLOADED"),
|
NoDevServer("NODEVSERVER_TEAM_NODEVSERVER", "NODEVSERVER_MESSAGE_PERMA", "NODEVSERVER_MESSAGE_UNTIL", "UNNODEVSERVER_NOT_NODEVSERVER", "UNNODEVSERVER_UNNODEVSERVER");
|
||||||
AntiSchemUpload("ANTISCHEMUPLOAD_TEAM_ANTISCHEMUPLOADED", "ANTISCHEMUPLOAD_MESSAGE_PERMA", "ANTISCHEMUPLOAD_MESSAGE_UNTIL", "UNANTISCHEMUPLOAD_NOT_ANTISCHEMUPLOADED", "UNANTISCHEMUPLOAD_ANTISCHEMUPLOADED"),
|
|
||||||
AntiBauJoin("ANTIBAUJOIN_TEAM_ANTIBAUJOINED", "ANTIBAUJOIN_MESSAGE_PERMA", "ANTIBAUJOIN_MESSAGE_UNTIL", "UNANTIBAUJOIN_NOT_ANTIBAUJOINED", "UNANTIBAUJOIN_ANTIBAUJOINED"),
|
|
||||||
AntiFightJoin("ANTIFIGHTJOIN_TEAM_ANTIFIGHTJOINED", "ANTIFIGHTJOIN_MESSAGE_PERMA", "ANTIFIGHTJOIN_MESSAGE_UNTIL", "UNANTIFIGHTJOIN_NOT_ANTIFIGHTJOINED", "UNANTIFIGHTJOIN_ANTIFIGHTJOINED");
|
|
||||||
|
|
||||||
private String teamMessage;
|
private String teamMessage;
|
||||||
private String playerMessagePerma;
|
private String playerMessagePerma;
|
||||||
|
@ -130,41 +130,23 @@ MUTED_MESSAGE_UNTIL=§cDu bist bis zum {0} gemuted. §r§lGrund§r: §c{1}
|
|||||||
UNMUTE_NOT_MUTED=§cDer Spieler ist nicht gemutet.
|
UNMUTE_NOT_MUTED=§cDer Spieler ist nicht gemutet.
|
||||||
UNMUTE_UNMUTED=Du hast {0} entmutet.
|
UNMUTE_UNMUTED=Du hast {0} entmutet.
|
||||||
|
|
||||||
ANTISCHEMADD_TEAM_ANTISCHEMADD={0} §c{1} wurde von {2} {3} schem geaddet werden ausgeschlossen. §f§lGrund§r: §f{4}
|
NOSCHEMRECEIVING_TEAM_NOSCHEMRECEIVING={0} §c{1} wurde von {2} {3} vom schem erhalten ausgeschlossen. §f§lGrund§r: §f{4}
|
||||||
ANTISCHEMADD_MESSAGE_PERMA=§cDu bist permanent vom schem geaddet werden ausgeschlossen. §f§lGrund§r: §f{0}
|
NOSCHEMRECEIVING_MESSAGE_PERMA=§cDu bist permanent vom erhalten von schems ausgeschlossen. §f§lGrund§r: §f{0}
|
||||||
ANTISCHEMADD_MESSAGE_UNTIL=§cDu bist bis zum {0} vom schem geaddet werden ausgeschlossen. §f§lGrund§r: §f{1}
|
NOSCHEMRECEIVING_MESSAGE_UNTIL=§cDu bist bis zum {0} vom erhalten von schems ausgeschlossen. §f§lGrund§r: §f{1}
|
||||||
UNANTISCHEMADD_NOT_ANTISCHEMADD=§cDer Spieler ist nicht vom schem geaddet werden ausgeschlossen.
|
UNNOSCHEMRECEIVING_NOT_NOSCHEMRECEIVING=§cDer Spieler ist nicht vom erhalten von schems ausgeschlossen.
|
||||||
UNANTISCHEMADD_UNANTISCHEMADDED=Du hast {0} das schem geaddet werden zurückgegeben.
|
UNNOSCHEMRECEIVING_UNNOSCHEMRECEIVING=Du hast {0} das schems erhalten zurückgegeben.
|
||||||
|
|
||||||
ANTISCHEMADDED_TEAM_ANTISCHEMADDED={0} §c{1} wurde von {2} {3} schem adden ausgeschlossen. §f§lGrund§r: §f{4}
|
NOSCHEMSHARING_TEAM_NOSCHEMSHARING={0} §c{1} wurde von {2} {3} vom schem verteilen ausgeschlossen. §f§lGrund§r: §f{4}
|
||||||
ANTISCHEMADDED_MESSAGE_PERMA=§cDu bist permanent vom schem adden ausgeschlossen. §f§lGrund§r: §f{0}
|
NOSCHEMSHARING_MESSAGE_PERMA=§cDu bist permanent vom verteilen von schems ausgeschlossen. §f§lGrund§r: §f{0}
|
||||||
ANTISCHEMADDED_MESSAGE_UNTIL=§cDu bist bis zum {0} vom schem adden ausgeschlossen. §f§lGrund§r: §f{1}
|
NOSCHEMSHARING_MESSAGE_UNTIL=§cDu bist bis zum {0} vom verteilen von schems ausgeschlossen. §f§lGrund§r: §f{1}
|
||||||
UNANTISCHEMADDED_NOT_ANTISCHEMADDED=§cDer Spieler ist nicht vom schem adden ausgeschlossen.
|
UNNOSCHEMSHARING_NOT_NOSCHEMSHARING=§cDer Spieler ist nicht vom verteilen von schems ausgeschlossen.
|
||||||
UNANTISCHEMADDED_UNANTISCHEMADDED=Du hast {0} das schem adden wiederhergestellt.
|
UNNOSCHEMSHARING_UNNOSCHEMSHARING=Du hast {0} das schems verteilen zurückgegeben.
|
||||||
|
|
||||||
ANTISCHEMDOWNLOAD_TEAM_ANTISCHEMDOWNLOADED={0} §c{1} wurde von {2} {3} schem download ausgeschlossen. §f§lGrund§r: §f{4}
|
NODEVSERVER_TEAM_NODEVSERVER={0} §c{1} wurde von {2} {3} vom dev server ausgeschlossen. §f§lGrund§r: §f{4}
|
||||||
ANTISCHEMDOWNLOAD_MESSAGE_PERMA=§cDu bist permanent vom schem download ausgeschlossen. §f§lGrund§r: §f{0}
|
NODEVSERVER_MESSAGE_PERMA=§cDu bist permanent vom dev server ausgeschlossen. §f§lGrund§r: §f{0}
|
||||||
ANTISCHEMDOWNLOAD_MESSAGE_UNTIL=§cDu bist bis zum {0} vom schem download ausgeschlossen. §f§lGrund§r: §f{1}
|
NODEVSERVER_MESSAGE_UNTIL=§cDu bist bis zum {0} vom dev server ausgeschlossen. §f§lGrund§r: §f{1}
|
||||||
UNANTISCHEMDOWNLOAD_NOT_ANTISCHEMDOWNLOADED=§cDer Spieler ist nicht ausgeschlossen Schematics runterzuladen.
|
UNNODEVSERVER_NOT_NODEVSERVER=§cDer Spieler ist nicht vom dev server ausgeschlossen.
|
||||||
UNANTISCHEMDOWNLOAD_UNANTISCHEMDOWNLOADED=Du hast {0} das schem downloaden wiederhergestellt.
|
UNNODEVSERVER_UNNODEVSERVER=Du hast {0} das das joinen des dev servers zurückgegeben.
|
||||||
|
|
||||||
ANTISCHEMUPLOAD_TEAM_ANTISCHEMUPLOADED={0} §c{1} wurde von {2} {3} schem upload ausgeschlossen. §f§lGrund§r: §f{4}
|
|
||||||
ANTISCHEMUPLOAD_MESSAGE_PERMA=§cDu bist permanent vom schem upload ausgeschlossen. §f§lGrund§r: §f{0}
|
|
||||||
ANTISCHEMUPLOAD_MESSAGE_UNTIL=§cDu bist bis zum {0} vom schem upload ausgeschlossen. §f§lGrund§r: §f{1}
|
|
||||||
UNANTISCHEMUPLOAD_NOT_ANTISCHEMUPLOADED=§cDer Spieler ist nicht ausgeschlossen Schematics hochzuladen.
|
|
||||||
UNANTISCHEMUPLOAD_ANTISCHEMUPLOADED=Du hast {0} das schem upload wiederhergestellt.
|
|
||||||
|
|
||||||
ANTIBAUJOIN_TEAM_ANTIBAUJOINED={0} §c{1} wurde von {2} {3} joinen von Baus ausgeschlossen. §f§lGrund§r: §f{4}
|
|
||||||
ANTIBAUJOIN_MESSAGE_PERMA=§cDu bist permanent vom joinen von Baus ausgeschlossen. §f§lGrund§r: §f{0}
|
|
||||||
ANTIBAUJOIN_MESSAGE_UNTIL=§cDu bist bis zum {0} vom joinen von Baus ausgeschlossen. §f§lGrund§r: §f{1}
|
|
||||||
UNANTIBAUJOIN_NOT_ANTIBAUJOINED=§cDer Spieler ist nicht vom joinen von Baus ausgeschlossen.
|
|
||||||
UNANTIBAUJOIN_ANTIBAUJOINED=Du hast {0} das joinen von Baus wiederhergestellt.
|
|
||||||
|
|
||||||
ANTIFIGHTJOIN_TEAM_ANTIFIGHTJOINED={0} §c{1} wurde von {2} {3} joinen von Fights ausgeschlossen. §f§lGrund§r: §f{4}
|
|
||||||
ANTIFIGHTJOIN_MESSAGE_PERMA=§cDu bist permanent vom joinen von Fights ausgeschlossen. §f§lGrund§r: §f{0}
|
|
||||||
ANTIFIGHTJOIN_MESSAGE_UNTIL=§cDu bist bis zum {0} vom joinen von Fights ausgeschlossen. §f§lGrund§r: §f{1}
|
|
||||||
UNANTIFIGHTJOIN_NOT_ANTIFIGHTJOINED=§cDer Spieler ist nicht vom joinen von Fights ausgeschlossen.
|
|
||||||
UNANTIFIGHTJOIN_ANTIFIGHTJOINED=Du hast {0} das joinen von Fights wiederhergestellt.
|
|
||||||
|
|
||||||
#BugCommand
|
#BugCommand
|
||||||
BUG_MESSAGE=§7Dein Bugreport wurde gespeichert.
|
BUG_MESSAGE=§7Dein Bugreport wurde gespeichert.
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren