mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 03:36:42 +00:00
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:
@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user