Skip to content

Commit

Permalink
fix(save): Fixed save errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmJos committed Mar 5, 2024
1 parent 167a86d commit 2e39b1f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ public class UserSuffixCommands {
@Execute(name = "clear")
void clearSuffix(@Context Player player) {
SuffixAccount account = ArtCore.getHandler(player, SuffixAccount.class);
if (account.getContent() == null && account.getColor() == null) {
PluginMessages.CLEARED.send(player);
return;
}

if (account.isCoolingDown()) {
PluginMessages.COOLING.send(player, account.getCoolDownSeconds());
return;
}

account.setSuffix(null, null);
PluginMessages.CLEARED.send(player);
}
Expand Down

0 comments on commit 2e39b1f

Please sign in to comment.