Temporary debug yay
This commit is contained in:
parent
77687ea84b
commit
5c80b002b1
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user