Skip to content

Commit

Permalink
EffBan - toString change as per suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneBeee committed Jun 30, 2024
1 parent dab1a52 commit b42fa8c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/java/ch/njol/skript/effects/EffBan.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,12 @@ protected void execute(final Event e) {

@Override
public String toString(final @Nullable Event event, final boolean debug) {
String ip = ipBan ? "IP-" : "";
String ban = this.ban ? "ban " : "unban ";
String andKick = kick ? "and kick " : "";
String players = this.players.toString(event, debug);
String reason = this.reason != null ? " on account of " + this.reason.toString(event, debug) : "";
String time = expires != null ? " for " + expires.toString(event, debug) : "";
return ip + ban + andKick + players + reason + time;
return (ipBan ? "IP-" : "") +
(this.ban ? "ban " : "unban ") +
(kick ? "and kick " : "") +
this.players.toString(event, debug) +
(this.reason != null ? " on account of " + this.reason.toString(event, debug) : "") +
(expires != null ? " for " + expires.toString(event, debug) : "");
}

}

0 comments on commit b42fa8c

Please sign in to comment.