fixed CC Bug :D

This commit is contained in:
Chiss 2014-12-15 15:49:52 +11:00
parent e02bcd8b84
commit d7eb01e8f0
4 changed files with 15 additions and 1 deletions

View File

@ -39,6 +39,17 @@ public class UnknownPackageReward extends Reward
@Override @Override
public boolean canGiveReward(Player player) public boolean canGiveReward(Player player)
{ {
System.out.println("Player: " + (player.getName()));
System.out.println("Player Online: " + (player.isOnline()));
System.out.println("Donation: " + (_donationManager == null));
System.out.println("Donor: " + (_donationManager.Get(player.getName()) == null));
if (_donationManager.Get(player.getName()) == null)
{
System.out.println("Could not give reward " + _packageName + " to Offline Player: " + player.getName());
return false;
}
return !_donationManager.Get(player.getName()).OwnsUnknownPackage(_packageName); return !_donationManager.Get(player.getName()).OwnsUnknownPackage(_packageName);
} }

View File

@ -1083,6 +1083,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
public void rewardPet(Player player, String pet, EntityType type) public void rewardPet(Player player, String pet, EntityType type)
{ {
if (!player.isOnline())
return;
PetReward reward = new PetReward(_petManager, _inventoryManager, _donationManager, pet, pet, type, RewardRarity.OTHER, 0); PetReward reward = new PetReward(_petManager, _inventoryManager, _donationManager, pet, pet, type, RewardRarity.OTHER, 0);
if (reward.canGiveReward(player)) if (reward.canGiveReward(player))

View File

@ -151,6 +151,7 @@ public class BossSnowmanPattern
{ {
ent.Entity.remove(); ent.Entity.remove();
entIterator.remove(); entIterator.remove();
continue;
} }
//Move //Move

View File

@ -731,7 +731,6 @@ public class GameFlagManager implements Listener
else else
team.RemovePlayer(event.getPlayer()); team.RemovePlayer(event.getPlayer());
} }
} }
@EventHandler @EventHandler