Use Account ID from client manager instead of PlayerCache
This commit is contained in:
parent
b1536547d3
commit
d16d9a36e9
@ -93,6 +93,7 @@ public class InventoryManager extends MiniDbClientPlugin<ClientInventory>
|
||||
|
||||
public void addItemToInventory(final Callback<Boolean> callback, final Player player, final String item, final int count)
|
||||
{
|
||||
int accountId = getClientManager().getAccountId(player);
|
||||
addItemToInventoryForOffline(new Callback<Boolean>()
|
||||
{
|
||||
public void run(Boolean success)
|
||||
@ -105,7 +106,7 @@ public class InventoryManager extends MiniDbClientPlugin<ClientInventory>
|
||||
if (callback != null)
|
||||
callback.run(success);
|
||||
}
|
||||
}, player.getUniqueId(), item, count);
|
||||
}, accountId, item, count);
|
||||
}
|
||||
|
||||
public boolean validItem(String item)
|
||||
|
@ -25,7 +25,15 @@ public enum TreasureStyle
|
||||
ParticleType.LARGE_EXPLODE,
|
||||
ParticleType.INSTANT_SPELL,
|
||||
Sound.PORTAL_TRAVEL,
|
||||
Sound.ANVIL_LAND);
|
||||
Sound.ANVIL_LAND),
|
||||
|
||||
CHRISTMAS(
|
||||
ParticleType.SNOW_SHOVEL,
|
||||
ParticleType.SNOWBALL_POOF,
|
||||
ParticleType.FIREWORKS_SPARK,
|
||||
Sound.FIZZ,
|
||||
Sound.CHICKEN_EGG_POP
|
||||
);
|
||||
|
||||
private ParticleType _secondaryParticle;
|
||||
private ParticleType _chestSpawnParticle;
|
||||
|
@ -11,7 +11,9 @@ public enum TreasureType
|
||||
|
||||
ANCIENT(C.cGold + "Ancient Chest", "Ancient Chest", "Ancient", RewardType.AncientChest, Material.TRAPPED_CHEST, TreasureStyle.ANCIENT),
|
||||
|
||||
MYTHICAL(C.cRed + "Mythical Chest", "Mythical Chest", "Mythical", RewardType.MythicalChest, Material.ENDER_CHEST, TreasureStyle.MYTHICAL);
|
||||
MYTHICAL(C.cRed + "Mythical Chest", "Mythical Chest", "Mythical", RewardType.MythicalChest, Material.ENDER_CHEST, TreasureStyle.MYTHICAL),
|
||||
|
||||
CHRISTMAS(C.cAqua + "Christmas Chest", "Christmas Chest", "Christmas", RewardType.MythicalChest, Material.CHEST, TreasureStyle.CHRISTMAS);
|
||||
|
||||
private final String _name;
|
||||
private final RewardType _rewardType;
|
||||
|
Loading…
Reference in New Issue
Block a user