Two fixes, one commit

To kill two birds with one stone, I've done two fixes in this commit.
- Fixes issue that caused quiet warns to behave improperly (e.g. the warnings wouldn't increment if quiet)
- Added WARN to the PunishmentType list.
This commit is contained in:
Video
2021-06-16 17:29:57 -06:00
parent 06025b2e69
commit 3027e2a18c
3 changed files with 29 additions and 17 deletions

View File

@ -429,14 +429,19 @@ public class FPlayer
this.warningCount = warningCount;
}
public void incrementWarnings()
public void incrementWarnings(boolean quiet)
{
this.warningCount++;
if (this.warningCount % 2 == 0)
{
Player p = getPlayer();
p.getWorld().strikeLightning(p.getLocation());
if (!quiet)
{
p.getWorld().strikeLightning(p.getLocation());
}
FUtil.playerMsg(p, ChatColor.RED + "You have been warned at least twice now, make sure to read the rules at " + ConfigEntry.SERVER_BAN_URL.getString());
}
}