Temporary debug yay

This commit is contained in:
ArcticZeroo 2018-01-09 16:42:59 -05:00 committed by Alexander Meech
parent 77687ea84b
commit 5c80b002b1

View File

@ -6,6 +6,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;
@ -290,14 +291,19 @@ public abstract class PunishPage extends ShopPageBase<Punish, PunishShop>
protected void reapplyPunishment(Punishment punishment) protected void reapplyPunishment(Punishment punishment)
{ {
if (punishment.GetRemaining() == 0) if (punishment.GetRemaining() == 0 || punishment.GetActive() || !punishment.GetRemoved())
{ {
return; return;
} }
Bukkit.broadcastMessage("Remaining: " + punishment.GetRemaining());
Bukkit.broadcastMessage("In hours: " + (long) Math.floor(punishment.GetRemaining() / UtilTime.TimeUnit.HOURS.getMilliseconds()));
Bukkit.broadcastMessage("Is permanent: " + ((punishment.GetRemaining() < 0) ? "yes" : "no"));
return;
_reason = punishment.GetReason() + " - Reapplied"; _reason = punishment.GetReason() + " - Reapplied";
if (punishment.GetRemaining() == -1) if (punishment.GetRemaining() < 0)
{ {
doPunishment(punishment.GetCategory(), punishment.GetSeverity(), -1); doPunishment(punishment.GetCategory(), punishment.GetSeverity(), -1);
} }