Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex into MC_1.8

This commit is contained in:
libraryaddict 2015-10-20 04:38:12 +13:00
commit b3caf7c2d4
6 changed files with 48 additions and 8 deletions

View File

@ -55,7 +55,7 @@ public class MotdManager implements Listener, Runnable
//String motdLine = "§f§l◄ §c§lMaintenance§f§l ►"; //String motdLine = "§f§l◄ §c§lMaintenance§f§l ►";
//String motdLine = "§f§l◄ §a§lCarl the Creeper§f§l ►"; //String motdLine = "§f§l◄ §a§lCarl the Creeper§f§l ►";
String motdLine = " §2§l§n M O N S T E R M A Z E §f"; String motdLine = " §2§l§n M O N S T E R M A Z E B E T A §f";
//String motdLine = " §f§l◄ §a§lCarl the Creeper§f§l ▬ §c§l75% OFF SALE§f§l ►"; //String motdLine = " §f§l◄ §a§lCarl the Creeper§f§l ▬ §c§l75% OFF SALE§f§l ►";
//String motdLine = " §d§lRank Sale §a§l40% Off"); //String motdLine = " §d§lRank Sale §a§l40% Off");
//String motdLine = " §f§l◄§c§lMAINTENANCE§f§l►"); //String motdLine = " §f§l◄§c§lMAINTENANCE§f§l►");

View File

@ -31,7 +31,7 @@ public class BenefitManager extends MiniDbClientPlugin<BenefitData>
//_benefits.add(new Christmas2014(plugin, _repository, inventoryManager)); //_benefits.add(new Christmas2014(plugin, _repository, inventoryManager));
//_benefits.add(new Thanksgiving2014(plugin, _repository, inventoryManager)); //_benefits.add(new Thanksgiving2014(plugin, _repository, inventoryManager));
//_benefits.add(new Players40k(this, _repository, inventoryManager)); _benefits.add(new Players43k(this, _repository, inventoryManager));
} }
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)

View File

@ -0,0 +1,45 @@
package mineplex.core.benefit.benefits;
import mineplex.core.benefit.BenefitManager;
import mineplex.core.benefit.BenefitManagerRepository;
import mineplex.core.common.util.C;
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.inventory.InventoryManager;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
public class Players43k extends BenefitBase
{
private InventoryManager _inventoryManager;
public Players43k(BenefitManager plugin, BenefitManagerRepository repository, InventoryManager inventoryManager)
{
super(plugin, "Players43k", repository);
_inventoryManager = inventoryManager;
}
@Override
public void rewardPlayer(final Player player)
{
_inventoryManager.addItemToInventory(new Callback<Boolean>()
{
public void run(Boolean success)
{
if (success)
{
UtilPlayer.message(player, C.cGold + C.Strike + "=============================================");
UtilPlayer.message(player, "");
UtilPlayer.message(player, "To celebrate hitting 43,000 players online,");
UtilPlayer.message(player, "everyone receives a prize! You're awesome!");
UtilPlayer.message(player, "");
UtilPlayer.message(player, "You received 3 Ancient Chests!");
UtilPlayer.message(player, "");
UtilPlayer.message(player, C.cGold + C.Strike + "=============================================");
}
}
}, player, "Ancient Chest", 3);
}
}

View File

@ -102,7 +102,6 @@ public class PetTagPage extends ShopPageBase<CosmeticManager, CosmeticShop>
getPlugin().getPetManager().Get(getPlayer()).GetPets().put(_pet.GetPetType(), token.PetName); getPlugin().getPetManager().Get(getPlayer()).GetPets().put(_pet.GetPetType(), token.PetName);
getPlugin().getInventoryManager().addItemToInventory(null, getPlayer(), _pet.GetPetType().toString(), 1);
getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), getPlayer())); getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), getPlayer()));
} }
}, null, _petPurchase ? _pet : tag, CurrencyType.Coins, getPlayer())); }, null, _petPurchase ? _pet : tag, CurrencyType.Coins, getPlayer()));

View File

@ -89,11 +89,6 @@ public class InventoryManager extends MiniDbClientPlugin<ClientInventory>
if (!success) if (!success)
{ {
System.out.println("Add item to Inventory FAILED for " + player.getName()); System.out.println("Add item to Inventory FAILED for " + player.getName());
if (_items.containsKey(item))
{
Get(player).addItem(new ClientItem(_items.get(item), -count));
}
} }
if (callback != null) if (callback != null)

View File

@ -31,6 +31,7 @@ public class LightFlicker extends BukkitRunnable
{ {
_world.setTime(_previousTime); _world.setTime(_previousTime);
cancel(); cancel();
return;
} }
if (_ticks % 5 == 0) if (_ticks % 5 == 0)