geforkt von SteamWar/BungeeCore
Fixing...
Dieser Commit ist enthalten in:
Ursprung
c3ff72373b
Commit
a959b20370
@ -51,7 +51,8 @@ public class BanCommand extends BasicCommand {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
StringBuilder banReason = new StringBuilder();
|
StringBuilder banReason = new StringBuilder();
|
||||||
for (int i = 3; i < args.length; i++){
|
int start = hasTimestamp(args[2])?2:3;
|
||||||
|
for (int i = start; i < args.length; i++){
|
||||||
banReason.append(args[i]).append(" ");
|
banReason.append(args[i]).append(" ");
|
||||||
}
|
}
|
||||||
String msg = banReason.toString();
|
String msg = banReason.toString();
|
||||||
@ -79,4 +80,14 @@ public class BanCommand extends BasicCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean hasTimestamp(String time) {
|
||||||
|
SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
|
||||||
|
try{
|
||||||
|
dateFormat.parse(time);
|
||||||
|
return true;
|
||||||
|
}catch(ParseException exception){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,8 @@ public class MuteCommand extends BasicCommand {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
StringBuilder muteReason = new StringBuilder();
|
StringBuilder muteReason = new StringBuilder();
|
||||||
for (int i = 3; i < args.length; i++){
|
int start = BanCommand.hasTimestamp(args[2])?2:3;
|
||||||
|
for (int i = start; i < args.length; i++){
|
||||||
muteReason.append(args[i]).append(" ");
|
muteReason.append(args[i]).append(" ");
|
||||||
}
|
}
|
||||||
String msg = muteReason.toString();
|
String msg = muteReason.toString();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren