Implement confirmation dialogue for /pay. (#1002)

This commit is contained in:
Ali 'SupaHam' M 2016-12-18 15:03:03 +00:00 committed by GitHub
parent 6231a25413
commit dadc6b2d3a
27 changed files with 53 additions and 0 deletions

View file

@ -28,7 +28,9 @@ import org.bukkit.potion.PotionEffectType;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Map;
import java.util.UUID;
import java.util.WeakHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -57,6 +59,7 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
private boolean ignoreMsg = false;
private String afkMessage;
private long afkSince;
private Map<User, BigDecimal> confirmingPayments = new WeakHashMap<>();
public User(final Player base, final IEssentials ess) {
super(base, ess);
@ -836,6 +839,11 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
return afkSince;
}
@Override
public Map<User, BigDecimal> getConfirmingPayments() {
return confirmingPayments;
}
/**
* Returns the {@link ItemStack} in the main hand or off-hand. If the main hand is empty then the offhand item is returned - also nullable.
*/