Only keep CustomDonatorEnd variable.
This commit is contained in:
parent
d52c356b99
commit
596dd975ae
@ -61,7 +61,6 @@ public class AdminDonator implements IAdminCommandHandler
|
||||
{
|
||||
targetPlayer.setDonator(true);
|
||||
targetPlayer.updateNameTitleColor();
|
||||
targetPlayer.getVariables().set("CustomDonator", true);
|
||||
targetPlayer.getVariables().set("CustomDonatorEnd", System.currentTimeMillis() + donatorTime);
|
||||
targetPlayer.sendMessage(activeChar.getName() + " has granted you donator status!");
|
||||
activeChar.sendMessage("You have granted donator status to " + targetPlayer.getName());
|
||||
@ -73,7 +72,6 @@ public class AdminDonator implements IAdminCommandHandler
|
||||
{
|
||||
targetPlayer.setDonator(false);
|
||||
targetPlayer.updateNameTitleColor();
|
||||
targetPlayer.getVariables().set("CustomDonator", false);
|
||||
targetPlayer.getVariables().remove("CustomDonatorEnd");
|
||||
targetPlayer.sendMessage(activeChar.getName() + " has revoked donator status from you!");
|
||||
activeChar.sendMessage("You have revoked donator status from " + targetPlayer.getName());
|
||||
|
@ -14531,8 +14531,14 @@ public class PlayerInstance extends Playable
|
||||
|
||||
public void restoreCustomStatus()
|
||||
{
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
if (getVariables().getLong("CustomDonatorEnd", 0) > currentTime)
|
||||
{
|
||||
setDonator(true);
|
||||
}
|
||||
|
||||
final long heroEnd = getVariables().getLong("CustomHeroEnd", 0);
|
||||
if (getVariables().getBoolean("CustomHero", false) && ((heroEnd == 0) || (heroEnd > System.currentTimeMillis())))
|
||||
if (getVariables().getBoolean("CustomHero", false) && ((heroEnd == 0) || (heroEnd > currentTime)))
|
||||
{
|
||||
setHero(true);
|
||||
}
|
||||
@ -14546,12 +14552,6 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
setNoble(true);
|
||||
}
|
||||
|
||||
final long donatorEnd = getVariables().getLong("CustomDonatorEnd", 0);
|
||||
if (getVariables().getBoolean("CustomDonator", false) && ((donatorEnd == 0) || (donatorEnd > System.currentTimeMillis())))
|
||||
{
|
||||
setDonator(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,6 @@ public class AdminDonator implements IAdminCommandHandler
|
||||
{
|
||||
targetPlayer.setDonator(true);
|
||||
targetPlayer.updateNameTitleColor();
|
||||
targetPlayer.getVariables().set("CustomDonator", true);
|
||||
targetPlayer.getVariables().set("CustomDonatorEnd", System.currentTimeMillis() + donatorTime);
|
||||
targetPlayer.sendMessage(activeChar.getName() + " has granted you donator status!");
|
||||
activeChar.sendMessage("You have granted donator status to " + targetPlayer.getName());
|
||||
@ -73,7 +72,6 @@ public class AdminDonator implements IAdminCommandHandler
|
||||
{
|
||||
targetPlayer.setDonator(false);
|
||||
targetPlayer.updateNameTitleColor();
|
||||
targetPlayer.getVariables().set("CustomDonator", false);
|
||||
targetPlayer.getVariables().remove("CustomDonatorEnd");
|
||||
targetPlayer.sendMessage(activeChar.getName() + " has revoked donator status from you!");
|
||||
activeChar.sendMessage("You have revoked donator status from " + targetPlayer.getName());
|
||||
|
@ -14886,8 +14886,14 @@ public class PlayerInstance extends Playable
|
||||
|
||||
public void restoreCustomStatus()
|
||||
{
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
if (getVariables().getLong("CustomDonatorEnd", 0) > currentTime)
|
||||
{
|
||||
setDonator(true);
|
||||
}
|
||||
|
||||
final long heroEnd = getVariables().getLong("CustomHeroEnd", 0);
|
||||
if (getVariables().getBoolean("CustomHero", false) && ((heroEnd == 0) || (heroEnd > System.currentTimeMillis())))
|
||||
if (getVariables().getBoolean("CustomHero", false) && ((heroEnd == 0) || (heroEnd > currentTime)))
|
||||
{
|
||||
setHero(true);
|
||||
}
|
||||
@ -14901,12 +14907,6 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
setNoble(true);
|
||||
}
|
||||
|
||||
final long donatorEnd = getVariables().getLong("CustomDonatorEnd", 0);
|
||||
if (getVariables().getBoolean("CustomDonator", false) && ((donatorEnd == 0) || (donatorEnd > System.currentTimeMillis())))
|
||||
{
|
||||
setDonator(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user