Add all old chest types
This commit is contained in:
parent
b0b581bb0b
commit
029b0606d0
@ -54,7 +54,7 @@ public class AchievementManager extends MiniPlugin
|
||||
_clientManager = clientManager;
|
||||
_shop = new AchievementShop(this, _statsManager, clientManager, donationManager, "Achievement");
|
||||
|
||||
new LevelingManager(this);
|
||||
//new LevelingManager(this);
|
||||
|
||||
generatePermissions();
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ public class MorphAnath extends MorphGadget
|
||||
|
||||
Block block = player.getLocation().getBlock();
|
||||
|
||||
while (!UtilBlock.solid(block))
|
||||
while (!UtilBlock.solid(block) && block.getLocation().getBlockY() > 10)
|
||||
{
|
||||
block = block.getRelative(BlockFace.DOWN);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.serverdata.database.column.Column;
|
||||
import mineplex.serverdata.database.column.ColumnByte;
|
||||
import mineplex.serverdata.database.column.ColumnDouble;
|
||||
@ -59,7 +60,18 @@ public class NPC
|
||||
public LivingEntity spawnEntity()
|
||||
{
|
||||
_spawn.getChunk().load(true);
|
||||
LivingEntity entity = (LivingEntity) _spawn.getWorld().spawnEntity(_spawn, _entityType);
|
||||
LivingEntity entity;
|
||||
|
||||
//TODO remove this terrible hack
|
||||
if (_name.contains("Halloween"))
|
||||
{
|
||||
entity = UtilVariant.spawnWitherSkeleton(_spawn);
|
||||
}
|
||||
else
|
||||
{
|
||||
entity = (LivingEntity) _spawn.getWorld().spawnEntity(_spawn, _entityType);
|
||||
}
|
||||
|
||||
boolean nullName = _name.equals("NULL");
|
||||
|
||||
entity.setCanPickupItems(false);
|
||||
|
@ -472,13 +472,13 @@ public class NewNPCManager extends MiniPlugin
|
||||
|
||||
/**
|
||||
* @param metadata The metadata you wish to find all the NPCs of.
|
||||
* @return A list of {@link NPC} that are unloaded (have no entity attached to them) and that have the metadata
|
||||
* specified.
|
||||
* @return A list of {@link NPC} that are unloaded (have no entity attached to them) and that have the metadata which
|
||||
* starts with that specified.
|
||||
*/
|
||||
private List<NPC> getUnloadedNPCs(String metadata)
|
||||
{
|
||||
return _npcs.stream()
|
||||
.filter(npc -> npc.getMetadata().equals(metadata) && npc.getEntity() == null)
|
||||
.filter(npc -> npc.getMetadata().startsWith(metadata) && npc.getEntity() == null)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,4 @@ public class ChestReward extends InventoryReward
|
||||
{
|
||||
super(type.getName(), type.getItemName(), "Treasure Chest", min, max, type.getItemStack(), rarity, shardValue);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -185,6 +185,7 @@ public class TreasureLocation implements Listener
|
||||
|
||||
if (_session.hasFailed())
|
||||
{
|
||||
getManager().getInventoryManager().addItemToInventory(null, player, treasure.getTreasureType().getItemName(), 1);
|
||||
_session = null;
|
||||
player.sendMessage(F.main(getManager().getName(), "Sorry, it looks like the rewards for the chest could not be generated."));
|
||||
return;
|
||||
|
@ -24,8 +24,11 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.treasure.reward.TreasureRewardManager;
|
||||
import mineplex.core.treasure.types.AncientTreasure;
|
||||
import mineplex.core.treasure.types.IlluminatedTreasure;
|
||||
import mineplex.core.treasure.types.MOBATreasure;
|
||||
import mineplex.core.treasure.types.MinestrikeTreasure;
|
||||
import mineplex.core.treasure.types.MythicalTreasure;
|
||||
import mineplex.core.treasure.types.OldTreasure;
|
||||
import mineplex.core.treasure.types.OmegaTreasure;
|
||||
import mineplex.core.treasure.types.Treasure;
|
||||
import mineplex.core.treasure.types.TrickOrTreatTreasure;
|
||||
|
||||
@ -66,6 +69,9 @@ public class TreasureManager extends MiniPlugin
|
||||
addTreasureType(new AncientTreasure());
|
||||
addTreasureType(new MythicalTreasure());
|
||||
addTreasureType(new IlluminatedTreasure());
|
||||
addTreasureType(new OmegaTreasure());
|
||||
addTreasureType(new MinestrikeTreasure());
|
||||
addTreasureType(new MOBATreasure());
|
||||
addTreasureType(new TrickOrTreatTreasure());
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,6 @@ public class TreasureSession implements Listener
|
||||
Player player = event.getPlayer();
|
||||
Location location = event.getClickedBlock().getLocation();
|
||||
|
||||
if (!player.equals(getPlayer()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
boolean found = false;
|
||||
|
||||
for (Location chestLocation : _treasureLocation.getChestLocations())
|
||||
@ -107,7 +102,7 @@ public class TreasureSession implements Listener
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (_openedChests.contains(location) || isDone())
|
||||
if (!player.equals(event.getPlayer()) || _openedChests.contains(location) || isDone())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -0,0 +1,94 @@
|
||||
package mineplex.core.treasure.animation.animations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseGuardian;
|
||||
import mineplex.core.treasure.TreasureLocation;
|
||||
import mineplex.core.treasure.animation.TreasureOpenAnimation;
|
||||
import mineplex.core.treasure.types.Treasure;
|
||||
|
||||
public class MOBAChestAnimation extends TreasureOpenAnimation
|
||||
{
|
||||
|
||||
private static final int RADIUS = 3;
|
||||
private static final double OFFSET_THETA = Math.PI / 10;
|
||||
private static final double DELTA_THETA = Math.PI / 40;
|
||||
private static final double TOTAL_THETA = 2 * Math.PI;
|
||||
|
||||
private double _deltaTheta;
|
||||
private double _totalTheta;
|
||||
|
||||
public MOBAChestAnimation(Treasure treasure, TreasureLocation treasureLocation)
|
||||
{
|
||||
super(treasure, treasureLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
changeFloor(Material.PRISMARINE, 0, Material.PRISMARINE, 1);
|
||||
|
||||
List<Location> chests = getTreasureLocation().getChestLocations();
|
||||
_deltaTheta = Math.PI * 2 / (double) chests.size();
|
||||
|
||||
for (Location location : chests)
|
||||
{
|
||||
ArmorStand stand = spawnArmourStand(location);
|
||||
disguise(new DisguiseGuardian(stand));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick()
|
||||
{
|
||||
_totalTheta += DELTA_THETA;
|
||||
|
||||
int index = 0;
|
||||
for (ArmorStand stand : _stands)
|
||||
{
|
||||
Location location = getTreasureLocation().getChest().clone();
|
||||
double x = RADIUS * Math.cos(_totalTheta + OFFSET_THETA + index * _deltaTheta);
|
||||
double z = RADIUS * Math.sin(_totalTheta + OFFSET_THETA + index * _deltaTheta);
|
||||
|
||||
location.add(x, 0, z);
|
||||
|
||||
location.setYaw(UtilAlg.GetYaw(UtilAlg.getTrajectory(location, getTreasureLocation().getChest())));
|
||||
|
||||
stand.teleport(location);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.DRIP_WATER, location.add(0, 1, 0), 0.25F, 0.25F, 0.25F, 0.1F, 1, ViewDist.NORMAL);
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
if (_totalTheta >= TOTAL_THETA)
|
||||
{
|
||||
for (ArmorStand stand : _stands)
|
||||
{
|
||||
Location location = stand.getLocation();
|
||||
stand.getWorld().playSound(location, Sound.NOTE_PLING, 1, 1.2F);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.LARGE_EXPLODE, location, 0, 0, 0, 0.1F, 1, ViewDist.NORMAL);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.PORTAL, location, 0.8F, 0.8F, 0.8F, 0.1F, 20, ViewDist.NORMAL);
|
||||
stand.remove();
|
||||
|
||||
createChestAt(location, Material.ENDER_CHEST);
|
||||
}
|
||||
|
||||
setRunning(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinish()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package mineplex.core.treasure.animation.animations;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.TreasureLocation;
|
||||
import mineplex.core.treasure.animation.TreasureOpenAnimation;
|
||||
import mineplex.core.treasure.types.Treasure;
|
||||
|
||||
public class MinestrikeChestAnimation extends TreasureOpenAnimation
|
||||
{
|
||||
|
||||
public MinestrikeChestAnimation(Treasure treasure, TreasureLocation treasureLocation)
|
||||
{
|
||||
super(treasure, treasureLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
changeFloor(Material.SAND, 0, Material.SANDSTONE, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick()
|
||||
{
|
||||
if (getTicks() % 3 == 0)
|
||||
{
|
||||
for (Location location : getTreasureLocation().getChestLocations())
|
||||
{
|
||||
UtilParticle.PlayParticleToAll(ParticleType.BLOCK_DUST.getParticle(Material.OBSIDIAN, 0), location.clone().add(0, 0.4, 0), 0.25F, 0.25F, 0.25F, 0, 3, ViewDist.NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
if (getTicks() > 50)
|
||||
{
|
||||
setRunning(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinish()
|
||||
{
|
||||
for (Location location : getTreasureLocation().getChestLocations())
|
||||
{
|
||||
location = location.clone();
|
||||
location.setYaw(UtilAlg.GetYaw(UtilAlg.getTrajectory(location, getTreasureLocation().getChest())));
|
||||
location.getWorld().playEffect(location, Effect.STEP_SOUND, Material.CHEST);
|
||||
createChestAt(location, Material.CHEST);
|
||||
|
||||
location.add(0, 1, 0);
|
||||
|
||||
UtilParticle.PlayParticleToAll(ParticleType.LARGE_EXPLODE, location, 0, 0, 0, 0.1F, 1, ViewDist.NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package mineplex.core.treasure.animation.animations;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.treasure.TreasureLocation;
|
||||
import mineplex.core.treasure.animation.TreasureOpenAnimation;
|
||||
import mineplex.core.treasure.types.Treasure;
|
||||
|
||||
public class OmegaChestAnimation extends TreasureOpenAnimation
|
||||
{
|
||||
|
||||
private static final ItemStack HELMET = SkinData.OMEGA_CHEST.getSkull();
|
||||
private static final double SHAKE_MAGNITUDE = Math.PI / 35D;
|
||||
|
||||
private int _index;
|
||||
|
||||
public OmegaChestAnimation(Treasure treasure, TreasureLocation treasureLocation)
|
||||
{
|
||||
super(treasure, treasureLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart()
|
||||
{
|
||||
changeFloor(Material.WOOL, 15, Material.WOOL, 7);
|
||||
|
||||
for (Location location : getTreasureLocation().getChestLocations())
|
||||
{
|
||||
ArmorStand stand = spawnArmourStand(location.clone().subtract(0, 2.5, 0));
|
||||
|
||||
stand.setHelmet(HELMET);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTick()
|
||||
{
|
||||
if (getTicks() % 10 == 0 && _index != _stands.size())
|
||||
{
|
||||
_index++;
|
||||
}
|
||||
|
||||
int chestY = getTreasureLocation().getChest().getBlockY();
|
||||
boolean moved = false;
|
||||
|
||||
for (int i = 0; i < _index; i++)
|
||||
{
|
||||
ArmorStand stand = _stands.get(i);
|
||||
Location location = stand.getLocation();
|
||||
|
||||
if (location.getY() > chestY - 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (Math.random() < 0.1)
|
||||
{
|
||||
stand.getWorld().playSound(location, Sound.ZOMBIE_UNFECT, 1, 0.7F);
|
||||
}
|
||||
|
||||
moved = true;
|
||||
location.add(0, 0.05, 0);
|
||||
stand.teleport(location);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.BLOCK_DUST.getParticle(Material.OBSIDIAN, 0), stand.getLocation().add(0, 1.5, 0), 0.25F, 0.25F, 0.25F, 0, 3, ViewDist.NORMAL);
|
||||
|
||||
if (location.getY() > chestY - 1)
|
||||
{
|
||||
resetArmourStand(stand);
|
||||
}
|
||||
else
|
||||
{
|
||||
shakeArmourStand(stand, SHAKE_MAGNITUDE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!moved)
|
||||
{
|
||||
for (ArmorStand stand : _stands)
|
||||
{
|
||||
Location location = stand.getLocation().add(0, 1, 0);
|
||||
UtilParticle.PlayParticleToAll(ParticleType.WITCH_MAGIC, location, 0.5F, 0.5F, 0.5F, 0.5F, 20, ViewDist.NORMAL);
|
||||
createChestAt(location, Material.ENDER_CHEST);
|
||||
stand.remove();
|
||||
}
|
||||
|
||||
setRunning(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinish()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package mineplex.core.treasure.types;
|
||||
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.moba.shopmorph.ShopMorphType;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.moba.skins.HeroSkinGadget;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphAnath;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphBardolf;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphBiff;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphDana;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphDevon;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphHattori;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphIvy;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphLarissa;
|
||||
import mineplex.core.gadget.gadgets.morph.moba.MorphRowena;
|
||||
import mineplex.core.reward.RewardType;
|
||||
import mineplex.core.reward.rewards.GadgetReward;
|
||||
import mineplex.core.treasure.animation.animations.MOBAChestAnimation;
|
||||
import mineplex.core.treasure.animation.animations.TrickOrTreatChestAnimation;
|
||||
import mineplex.core.treasure.reward.RewardRarity;
|
||||
|
||||
public class MOBATreasure extends Treasure
|
||||
{
|
||||
|
||||
public MOBATreasure()
|
||||
{
|
||||
super(TreasureType.MOBA);
|
||||
|
||||
setAnimation(treasureLocation -> new MOBAChestAnimation(this, treasureLocation));
|
||||
setRewards(RewardType.MOBA);
|
||||
setRewardsPerChest(4);
|
||||
setPurchasable(20000);
|
||||
purchasableFromStore();
|
||||
enabledByDefault();
|
||||
allowDuplicates();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addUncommon(RewardRarity rarity)
|
||||
{
|
||||
for (ShopMorphType shopMorphType : ShopMorphType.values())
|
||||
{
|
||||
if (shopMorphType.getRarity() == rarity)
|
||||
{
|
||||
addMOBAShopSkin(shopMorphType, rarity, 1);
|
||||
}
|
||||
}
|
||||
|
||||
addAllMOBASkins(rarity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addRare(RewardRarity rarity)
|
||||
{
|
||||
for (ShopMorphType shopMorphType : ShopMorphType.values())
|
||||
{
|
||||
if (shopMorphType.getRarity() == rarity)
|
||||
{
|
||||
addMOBAShopSkin(shopMorphType, rarity, 1);
|
||||
}
|
||||
}
|
||||
|
||||
addAllMOBASkins(rarity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addLegendary(RewardRarity rarity)
|
||||
{
|
||||
addGadgetReward(getGadget(MorphHattori.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphDevon.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphAnath.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphDana.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphBardolf.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphRowena.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphLarissa.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphBiff.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphIvy.class), rarity, 1);
|
||||
|
||||
addAllMOBASkins(rarity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addMythical(RewardRarity rarity)
|
||||
{
|
||||
}
|
||||
|
||||
private void addAllMOBASkins(RewardRarity rarity)
|
||||
{
|
||||
HeroSkinGadget.getSkins().forEach((name, dataList) ->
|
||||
{
|
||||
if (name.equals("Bardolf-Werewolf"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dataList.forEach(data ->
|
||||
{
|
||||
if (data.getRarity() != rarity)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
addMOBASkin(data.getGadget(), rarity, 1);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public GadgetReward addMOBASkin(HeroSkinGadget gadget, RewardRarity rarity, int weight)
|
||||
{
|
||||
return addMOBASkin(gadget, rarity, weight, getShards(rarity));
|
||||
}
|
||||
|
||||
public GadgetReward addMOBASkin(HeroSkinGadget gadget, RewardRarity rarity, int weight, int shards)
|
||||
{
|
||||
return addGadgetReward(gadget, rarity, weight, shards);
|
||||
}
|
||||
|
||||
public GadgetReward addMOBAShopSkin(ShopMorphType morphType, RewardRarity rarity, int weight)
|
||||
{
|
||||
return addMOBAShopSkin(morphType, rarity, weight, getShards(rarity));
|
||||
}
|
||||
|
||||
public GadgetReward addMOBAShopSkin(ShopMorphType morphType, RewardRarity rarity, int weight, int shards)
|
||||
{
|
||||
return addGadgetReward(GADGET_MANAGER.getGameCosmeticManager().getGadgetFrom(morphType.getName()), rarity, weight, shards);
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package mineplex.core.treasure.types;
|
||||
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.MineStrikeSkin;
|
||||
import mineplex.core.reward.RewardType;
|
||||
import mineplex.core.reward.rewards.GadgetReward;
|
||||
import mineplex.core.treasure.animation.animations.MinestrikeChestAnimation;
|
||||
import mineplex.core.treasure.reward.RewardRarity;
|
||||
|
||||
public class MinestrikeTreasure extends Treasure
|
||||
{
|
||||
|
||||
public MinestrikeTreasure()
|
||||
{
|
||||
super(TreasureType.MINESTRIKE);
|
||||
|
||||
setAnimation(treasureLocation -> new MinestrikeChestAnimation(this, treasureLocation));
|
||||
setRewards(RewardType.MINESTRIKE_CHEST);
|
||||
setRewardsPerChest(2);
|
||||
setPurchasable(10000);
|
||||
purchasableFromStore();
|
||||
enabledByDefault();
|
||||
allowDuplicates();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addRare(RewardRarity rarity)
|
||||
{
|
||||
addMineStrikeSkinReward(MineStrikeSkin.SSG_08_Blood_in_the_Water, rarity, 150, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Galil_AR_Eco, rarity, 150, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Nova_Koi, rarity, 100, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Knife_M9_Bayonette_Fade, rarity, 30, 2500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.PP_Bizon_Streak, rarity, 150, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.CZ75_Auto_Tigris, rarity, 100, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.XM1014_Tranquility, rarity, 100, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Desert_Eagle_Golden_Gun, rarity, 30, 2500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.P90_Asiimov, rarity, 100, 1000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.SG553_Pulse, rarity, 100, 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addLegendary(RewardRarity rarity)
|
||||
{
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Desert_Eagle_Blaze, rarity, 100, 5000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Glock_18_Fade, rarity, 100, 5000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.P250_Muertos, rarity, 100, 5000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.AK_47_Vulcan, rarity, 100, 5000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Knife_Counter_Terrorist_Sword, rarity, 50, 6500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Knife_Terrorist_Sword, rarity, 50, 6500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.Knife_M9_Bayonette_Glass, rarity, 50, 6500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.AK_47_Guardian, rarity, 10, 7500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.AWP_Asiimov, rarity, 100, 5000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.FAMAS_Pulse, rarity, 100, 5000);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.XM1014_Pig_Gun, rarity, 10, 7500);
|
||||
addMineStrikeSkinReward(MineStrikeSkin.M4A4_Enderman, rarity, 10, 7500);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addMythical(RewardRarity rarity)
|
||||
{
|
||||
}
|
||||
|
||||
private GadgetReward addMineStrikeSkinReward(MineStrikeSkin skin, RewardRarity rarity, int weight, int shards)
|
||||
{
|
||||
return addGadgetReward(GADGET_MANAGER.getGameCosmeticManager().getGadgetFrom(skin.getSkinName()), rarity, weight, shards);
|
||||
}
|
||||
}
|
@ -0,0 +1,399 @@
|
||||
package mineplex.core.treasure.types;
|
||||
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailHalloween;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailSpring;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm;
|
||||
import mineplex.core.gadget.gadgets.balloons.BalloonType;
|
||||
import mineplex.core.gadget.gadgets.death.DeathBlood;
|
||||
import mineplex.core.gadget.gadgets.death.DeathCandyCane;
|
||||
import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart;
|
||||
import mineplex.core.gadget.gadgets.death.DeathEmerald;
|
||||
import mineplex.core.gadget.gadgets.death.DeathEnchant;
|
||||
import mineplex.core.gadget.gadgets.death.DeathFreedom;
|
||||
import mineplex.core.gadget.gadgets.death.DeathFrostLord;
|
||||
import mineplex.core.gadget.gadgets.death.DeathMapleLeaf;
|
||||
import mineplex.core.gadget.gadgets.death.DeathMusic;
|
||||
import mineplex.core.gadget.gadgets.death.DeathPinataBurst;
|
||||
import mineplex.core.gadget.gadgets.death.DeathPresentDanger;
|
||||
import mineplex.core.gadget.gadgets.death.DeathShadow;
|
||||
import mineplex.core.gadget.gadgets.death.DeathSpring;
|
||||
import mineplex.core.gadget.gadgets.death.DeathStorm;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpSpring;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm;
|
||||
import mineplex.core.gadget.gadgets.hat.HatType;
|
||||
import mineplex.core.gadget.gadgets.kitselector.HaloKitSelector;
|
||||
import mineplex.core.gadget.gadgets.kitselector.RainbowDanceKitSelector;
|
||||
import mineplex.core.gadget.gadgets.kitselector.ShimmeringRingKitSelector;
|
||||
import mineplex.core.gadget.gadgets.kitselector.SingleParticleKitSelector.SingleParticleSelectors;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphAwkwardRabbit;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphBat;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphBlock;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphBunny;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphChicken;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphCow;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphEnderman;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphGrimReaper;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphLoveDoctor;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphPumpkinKing;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphSlime;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphSnowman;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphUncleSam;
|
||||
import mineplex.core.gadget.gadgets.morph.MorphVillager;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountBabyReindeer;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountCake;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountCart;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountChicken;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountFreedomHorse;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountFrost;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountLoveTrain;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountMule;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountNightmareSteed;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountSlime;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountSpider;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountStPatricksHorse;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountUndead;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountValentinesSheep;
|
||||
import mineplex.core.gadget.gadgets.mount.types.MountZombie;
|
||||
import mineplex.core.gadget.gadgets.outfit.freezesuit.OutfitFreezeSuitBoots;
|
||||
import mineplex.core.gadget.gadgets.outfit.freezesuit.OutfitFreezeSuitChestplate;
|
||||
import mineplex.core.gadget.gadgets.outfit.freezesuit.OutfitFreezeSuitHelmet;
|
||||
import mineplex.core.gadget.gadgets.outfit.freezesuit.OutfitFreezeSuitLeggings;
|
||||
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitBoots;
|
||||
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate;
|
||||
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitHelmet;
|
||||
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitLeggings;
|
||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitBoots;
|
||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate;
|
||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet;
|
||||
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings;
|
||||
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksBoots;
|
||||
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksChestplate;
|
||||
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksHat;
|
||||
import mineplex.core.gadget.gadgets.outfit.stpatricks.OutfitStPatricksLeggings;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleBlood;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleCandyCane;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleChristmasTree;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleEmerald;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleEnchant;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleFairy;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleFireRings;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleFoot;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleFrostLord;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleHeart;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleMusic;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticlePartyTime;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleRain;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleWingsAngel;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleWingsDemons;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleWingsLove;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleYinYang;
|
||||
import mineplex.core.gadget.gadgets.particle.freedom.ParticleAuraNiceness;
|
||||
import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian;
|
||||
import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom;
|
||||
import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedomFireworks;
|
||||
import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled;
|
||||
import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo;
|
||||
import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt;
|
||||
import mineplex.core.gadget.gadgets.taunts.RainbowTaunt;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectBabyChicken;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectFlames;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectHalloween;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectLavaTrap;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectLightningStrike;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectMrPunchMan;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectRiseOfTheElderGuardian;
|
||||
import mineplex.core.gadget.gadgets.wineffect.WinEffectSnowTrails;
|
||||
import mineplex.core.pet.PetType;
|
||||
import mineplex.core.reward.RewardType;
|
||||
import mineplex.core.treasure.animation.animations.OmegaChestAnimation;
|
||||
import mineplex.core.treasure.reward.RewardRarity;
|
||||
|
||||
public class OmegaTreasure extends Treasure
|
||||
{
|
||||
|
||||
public OmegaTreasure()
|
||||
{
|
||||
super(TreasureType.OMEGA);
|
||||
|
||||
setAnimation(treasureLocation -> new OmegaChestAnimation(this, treasureLocation));
|
||||
setRewards(RewardType.OMEGA_CHEST);
|
||||
setRewardsPerChest(1);
|
||||
enabledByDefault();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addUncommon(RewardRarity rarity)
|
||||
{
|
||||
addGadgetReward(getGadget(ArrowTrailRedWhite.class), rarity, 2);
|
||||
addGadgetReward(getGadget(ArrowTrailFreedom.class), rarity, 2);
|
||||
|
||||
addMusicReward("Blocks Disc", rarity, 25);
|
||||
addMusicReward("Cat Disc", rarity, 25);
|
||||
addMusicReward("Chirp Disc", rarity, 25);
|
||||
addMusicReward("Far Disc", rarity, 25);
|
||||
addMusicReward("Mall Disc", rarity, 25);
|
||||
addMusicReward("Mellohi Disc", rarity, 25);
|
||||
addMusicReward("Stal Disc", rarity, 25);
|
||||
addMusicReward("Strad Disc", rarity, 25);
|
||||
addMusicReward("Wait Disc", rarity, 25);
|
||||
addMusicReward("Ward Disc", rarity, 25);
|
||||
|
||||
addGadgetReward(getGadget(ArrowTrailHalloween.class), rarity, 50);
|
||||
|
||||
addHatReward(HatType.PUMPKIN, rarity, 75);
|
||||
addHatReward(HatType.PRESENT, rarity, 5);
|
||||
addHatReward(HatType.SNOWMAN, rarity, 5);
|
||||
|
||||
addBalloonReward(BalloonType.BABY_COW, rarity, 10, 100);
|
||||
addBalloonReward(BalloonType.BABY_PIG, rarity, 10, 100);
|
||||
addBalloonReward(BalloonType.BABY_SHEEP, rarity, 15, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addRare(RewardRarity rarity)
|
||||
{
|
||||
addTitleReward("shrug", rarity, 10, 500);
|
||||
addTitleReward("tableflip", rarity, 10, 500);
|
||||
addTitleReward("tablerespecter", rarity, 15, 500);
|
||||
addTitleReward("tableflip-disgusted", rarity, 15, 500);
|
||||
addTitleReward("tableflip-enraged", rarity, 15, 500);
|
||||
addTitleReward("tableflip-riot", rarity, 10, 500);
|
||||
addTitleReward("teddy-bear", rarity, 10, 500);
|
||||
addTitleReward("disgust", rarity, 10, 500);
|
||||
addTitleReward("old-man", rarity, 5, 500);
|
||||
addTitleReward("jake", rarity, 5, 500);
|
||||
addTitleReward("finn", rarity, 5, 500);
|
||||
addTitleReward("finn-and-jake", rarity, 5, 500);
|
||||
addTitleReward("boxer", rarity, 5, 500);
|
||||
addTitleReward("zoidberg", rarity, 5, 500);
|
||||
|
||||
addGadgetReward(getGadget(DoubleJumpFreedom.class), rarity, 5);
|
||||
addGadgetReward(getGadget(DoubleJumpBlood.class), rarity, 50);
|
||||
addGadgetReward(getGadget(DoubleJumpFirecracker.class), rarity, 33);
|
||||
addGadgetReward(getGadget(DoubleJumpEmerald.class), rarity, 25);
|
||||
addGadgetReward(getGadget(DoubleJumpMusic.class), rarity, 20);
|
||||
addGadgetReward(getGadget(DoubleJumpShadow.class), rarity, 15);
|
||||
addGadgetReward(getGadget(DoubleJumpStorm.class), rarity, 30);
|
||||
addGadgetReward(getGadget(DoubleJumpCandyCane.class), rarity, 20);
|
||||
addGadgetReward(getGadget(DoubleJumpHalloween.class), rarity, 50);
|
||||
addGadgetReward(getGadget(DoubleJumpSpring.class), rarity, 40);
|
||||
addGadgetReward(getGadget(DoubleJumpFreedom.class), rarity, 50);
|
||||
addGadgetReward(getGadget(DoubleJumpMaple.class), rarity, 50);
|
||||
|
||||
addGadgetReward(getGadget(DeathFreedom.class), rarity, 15);
|
||||
addGadgetReward(getGadget(DeathStorm.class), rarity, 30);
|
||||
addGadgetReward(getGadget(DeathBlood.class), rarity, 50);
|
||||
addGadgetReward(getGadget(DeathEmerald.class), rarity, 25);
|
||||
addGadgetReward(getGadget(DeathMusic.class), rarity, 20);
|
||||
addGadgetReward(getGadget(DeathPinataBurst.class), rarity, 27);
|
||||
addGadgetReward(getGadget(DeathShadow.class), rarity, 15);
|
||||
addGadgetReward(getGadget(DeathCandyCane.class), rarity, 25);
|
||||
addGadgetReward(getGadget(DeathSpring.class), rarity, 60);
|
||||
addGadgetReward(getGadget(DeathMapleLeaf.class), rarity, 10);
|
||||
|
||||
addGadgetReward(getGadget(ArrowTrailFreedom.class), rarity, 10);
|
||||
addGadgetReward(getGadget(ArrowTrailConfetti.class), rarity, 27);
|
||||
addGadgetReward(getGadget(ArrowTrailBlood.class), rarity, 50);
|
||||
addGadgetReward(getGadget(ArrowTrailEmerald.class), rarity, 25);
|
||||
addGadgetReward(getGadget(ArrowTrailMusic.class), rarity, 27);
|
||||
addGadgetReward(getGadget(ArrowTrailStorm.class), rarity, 30);
|
||||
addGadgetReward(getGadget(ArrowTrailShadow.class), rarity, 15);
|
||||
addGadgetReward(getGadget(ArrowTrailCandyCane.class), rarity, 10);
|
||||
addGadgetReward(getGadget(ArrowTrailSpring.class), rarity, 60);
|
||||
|
||||
addHatReward(HatType.UNCLE_SAM, rarity, 25);
|
||||
addHatReward(HatType.COMPANION_BLOCK, rarity, 15);
|
||||
addHatReward(HatType.LOVESTRUCK, rarity, 20);
|
||||
addHatReward(HatType.SECRET_PACKAGE, rarity, 25);
|
||||
addHatReward(HatType.TEDDY_BEAR, rarity, 25);
|
||||
addHatReward(HatType.SANTA, rarity, 25);
|
||||
addHatReward(HatType.RUDOLPH, rarity, 25);
|
||||
addHatReward(HatType.COAL, rarity, 25);
|
||||
addHatReward(HatType.AMERICA, rarity, 50);
|
||||
addHatReward(HatType.CANADA, rarity, 50);
|
||||
|
||||
addGadgetReward(getGadget(MorphChicken.class), rarity, 50);
|
||||
addGadgetReward(getGadget(MorphCow.class), rarity, 167);
|
||||
addGadgetReward(getGadget(MorphEnderman.class), rarity, 33);
|
||||
addGadgetReward(getGadget(MorphVillager.class), rarity, 83);
|
||||
|
||||
addGadgetReward(getGadget(WinEffectFlames.class), rarity, 100);
|
||||
addGadgetReward(getGadget(WinEffectSnowTrails.class), rarity, 100);
|
||||
|
||||
addGadgetReward(getGadget(MountFrost.class), rarity, 50);
|
||||
addGadgetReward(getGadget(MountCart.class), rarity, 100);
|
||||
addGadgetReward(getGadget(MountMule.class), rarity, 200);
|
||||
addGadgetReward(getGadget(MountSlime.class), rarity, 67);
|
||||
addGadgetReward(getGadget(MountLoveTrain.class), rarity, 20);
|
||||
|
||||
addGadgetReward(getGadget(OutfitRaveSuitBoots.class), rarity, 30);
|
||||
addGadgetReward(getGadget(OutfitRaveSuitChestplate.class), rarity, 30);
|
||||
addGadgetReward(getGadget(OutfitRaveSuitLeggings.class), rarity, 30);
|
||||
addGadgetReward(getGadget(OutfitRaveSuitHelmet.class), rarity, 30);
|
||||
addGadgetReward(getGadget(OutfitSpaceSuitBoots.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitSpaceSuitChestplate.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitSpaceSuitLeggings.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitSpaceSuitHelmet.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitStPatricksChestplate.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitStPatricksLeggings.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitStPatricksBoots.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitFreezeSuitChestplate.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitFreezeSuitLeggings.class), rarity, 50);
|
||||
addGadgetReward(getGadget(OutfitFreezeSuitBoots.class), rarity, 50);
|
||||
|
||||
addGadgetReward(getGadget(ParticleCandyCane.class), rarity, 20);
|
||||
addGadgetReward(getGadget(ParticleChristmasTree.class), rarity, 40);
|
||||
|
||||
addBalloonReward(BalloonType.BABY_ZOMBIE, rarity, 25, 500);
|
||||
addBalloonReward(BalloonType.BABY_MUSHROOM, rarity, 50, 500);
|
||||
addBalloonReward(BalloonType.BABY_OCELOT, rarity, 50, 500);
|
||||
addBalloonReward(BalloonType.BABY_WOLF, rarity, 75, 500);
|
||||
addBalloonReward(BalloonType.BABY_VILLAGER, rarity, 25, 500);
|
||||
addBalloonReward(BalloonType.BABY_SLIME, rarity, 25, 500);
|
||||
addBalloonReward(BalloonType.BAT, rarity, 50, 500);
|
||||
|
||||
addGadgetReward(getGadget(HaloKitSelector.class), rarity, 100);
|
||||
addGadgetReward(getGadget(RainbowDanceKitSelector.class), rarity, 100);
|
||||
addGadgetReward(getGadget(ShimmeringRingKitSelector.class), rarity, 100);
|
||||
addGadgetReward(getKitSelector(SingleParticleSelectors.FLAMES_OF_FURY), rarity, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addLegendary(RewardRarity rarity)
|
||||
{
|
||||
addTitleReward("ayyye", rarity, 25, 500);
|
||||
addTitleReward("ameno", rarity, 15, 5000);
|
||||
addTitleReward("magician", rarity, 25, 5000);
|
||||
addTitleReward("fireball", rarity, 75, 5000);
|
||||
addTitleReward("magic-missile", rarity, 75, 5000);
|
||||
addTitleReward("pewpewpew", rarity, 75, 5000);
|
||||
addTitleReward("stardust", rarity, 60, 5000);
|
||||
addTitleReward("blow-a-kiss", rarity, 60, 5000);
|
||||
addTitleReward("cool-guy", rarity, 60, 5000);
|
||||
addTitleReward("deal-with-it", rarity, 60, 5000);
|
||||
addTitleReward("party-time", rarity, 55, 5000);
|
||||
addTitleReward("lalala", rarity, 30, 5000);
|
||||
addTitleReward("gotta-go", rarity, 30, 5000);
|
||||
addTitleReward("whaaat", rarity, 30, 5000);
|
||||
|
||||
addPetReward(PetType.VILLAGER, rarity, 1);
|
||||
addPetReward(PetType.ZOMBIE, rarity, 10);
|
||||
addPetReward(PetType.PIG_ZOMBIE, rarity, 1);
|
||||
addPetReward(PetType.BLAZE, rarity, 2);
|
||||
addPetReward(PetType.RABBIT, rarity, 10);
|
||||
addPetReward(PetType.KILLER_BUNNY, rarity, 3);
|
||||
addPetReward(PetType.CUPID_PET, rarity, 40);
|
||||
addPetReward(PetType.LEPRECHAUN, rarity, 8);
|
||||
|
||||
addGadgetReward(getGadget(MorphBunny.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphUncleSam.class), rarity, 5);
|
||||
addGadgetReward(getGadget(MorphPumpkinKing.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MorphBat.class), rarity, 25);
|
||||
addGadgetReward(getGadget(MorphSlime.class), rarity, 10);
|
||||
addGadgetReward(getGadget(MorphBlock.class), rarity, 20);
|
||||
addGadgetReward(getGadget(MorphSnowman.class), rarity, 10);
|
||||
addGadgetReward(getGadget(MorphGrimReaper.class), rarity, 25);
|
||||
addGadgetReward(getGadget(MorphAwkwardRabbit.class), rarity, 30);
|
||||
addGadgetReward(getGadget(MorphLoveDoctor.class), rarity, 40);
|
||||
|
||||
addGadgetReward(getGadget(ParticleFreedom.class), rarity, 15);
|
||||
addGadgetReward(getGadget(ParticleWingsAngel.class), rarity, 15);
|
||||
addGadgetReward(getGadget(ParticleBlood.class), rarity, 10);
|
||||
addGadgetReward(getGadget(ParticleWingsDemons.class), rarity, 15);
|
||||
addGadgetReward(getGadget(ParticleEnchant.class), rarity, 25);
|
||||
addGadgetReward(getGadget(ParticleFairy.class), rarity, 4);
|
||||
addGadgetReward(getGadget(ParticleFireRings.class), rarity, 17);
|
||||
addGadgetReward(getGadget(ParticleEmerald.class), rarity, 8);
|
||||
addGadgetReward(getGadget(ParticleHeart.class), rarity, 2);
|
||||
addGadgetReward(getGadget(ParticleWingsInfernal.class), rarity, 4);
|
||||
addGadgetReward(getGadget(ParticleMusic.class), rarity, 15);
|
||||
addGadgetReward(getGadget(ParticleWingsPixie.class), rarity, 4);
|
||||
addGadgetReward(getGadget(ParticleRain.class), rarity, 13);
|
||||
addGadgetReward(getGadget(ParticleFoot.class), rarity, 33);
|
||||
addGadgetReward(getGadget(ParticleYinYang.class), rarity, 20);
|
||||
addGadgetReward(getGadget(ParticleCoalFumes.class), rarity, 1);
|
||||
addGadgetReward(getGadget(ParticleFrostLord.class), rarity, 10);
|
||||
addGadgetReward(getGadget(ParticlePartyTime.class), rarity, 25);
|
||||
addGadgetReward(getGadget(ParticleSpringHalo.class), rarity, 8);
|
||||
addGadgetReward(getGadget(ParticleWingsLove.class), rarity, 10);
|
||||
addGadgetReward(getGadget(ParticleFreedomFireworks.class), rarity, 24);
|
||||
addGadgetReward(getGadget(ParticleAuraNiceness.class), rarity, 4);
|
||||
addGadgetReward(getGadget(ParticleCanadian.class), rarity, 1);
|
||||
addGadgetReward(getGadget(ParticleStarSpangled.class), rarity, 1);
|
||||
|
||||
addGadgetReward(getGadget(MountFreedomHorse.class), rarity, 5);
|
||||
addGadgetReward(getGadget(MountZombie.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MountSpider.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MountUndead.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MountValentinesSheep.class), rarity, 20);
|
||||
addGadgetReward(getGadget(MountBabyReindeer.class), rarity, 1);
|
||||
addGadgetReward(getGadget(MountNightmareSteed.class), rarity, 10);
|
||||
addGadgetReward(getGadget(MountChicken.class), rarity, 5);
|
||||
addGadgetReward(getGadget(MountCake.class), rarity, 10);
|
||||
addGadgetReward(getGadget(MountStPatricksHorse.class), rarity, 3);
|
||||
|
||||
addGadgetReward(getGadget(WinEffectBabyChicken.class), rarity, 10);
|
||||
addGadgetReward(getGadget(WinEffectLavaTrap.class), rarity, 20);
|
||||
addGadgetReward(getGadget(WinEffectRiseOfTheElderGuardian.class), rarity, 4);
|
||||
addGadgetReward(getGadget(WinEffectLightningStrike.class), rarity, 20);
|
||||
addGadgetReward(getGadget(WinEffectMrPunchMan.class), rarity, 33);
|
||||
addGadgetReward(getGadget(WinEffectHalloween.class), rarity, 75);
|
||||
|
||||
addGadgetReward(getGadget(DeathEnchant.class), rarity, 10);
|
||||
addGadgetReward(getGadget(DeathCupidsBrokenHeart.class), rarity, 25);
|
||||
addGadgetReward(getGadget(DeathFrostLord.class), rarity, 15);
|
||||
addGadgetReward(getGadget(DeathPresentDanger.class), rarity, 27);
|
||||
|
||||
addGadgetReward(getGadget(DoubleJumpEnchant.class), rarity, 10);
|
||||
addGadgetReward(getGadget(DoubleJumpCupidsWings.class), rarity, 5);
|
||||
addGadgetReward(getGadget(DoubleJumpFrostLord.class), rarity, 10);
|
||||
|
||||
addGadgetReward(getGadget(ArrowTrailEnchant.class), rarity, 10);
|
||||
addGadgetReward(getGadget(ArrowTrailFrostLord.class), rarity, 20);
|
||||
addGadgetReward(getGadget(ArrowTrailCupid.class), rarity, 15);
|
||||
|
||||
addHatReward(HatType.GRINCH, rarity, 25);
|
||||
|
||||
addGadgetReward(getGadget(OutfitStPatricksHat.class), rarity, 5);
|
||||
addGadgetReward(getGadget(OutfitFreezeSuitHelmet.class), rarity, 2);
|
||||
|
||||
addBalloonReward(BalloonType.SQUID, rarity, 10, 5000);
|
||||
addBalloonReward(BalloonType.SILVERFISH, rarity, 30, 5000);
|
||||
addBalloonReward(BalloonType.GUARDIAN, rarity, 30, 5000);
|
||||
addBalloonReward(BalloonType.EMERALD_BLOCK, rarity, 15, 5000);
|
||||
|
||||
addGadgetReward(getGadget(BlowAKissTaunt.class), rarity, 7);
|
||||
addGadgetReward(getGadget(RainbowTaunt.class), rarity, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addMythical(RewardRarity rarity)
|
||||
{
|
||||
}
|
||||
}
|
@ -13,6 +13,7 @@ import mineplex.core.Managers;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.balloons.BalloonType;
|
||||
import mineplex.core.gadget.gadgets.hat.HatType;
|
||||
import mineplex.core.gadget.gadgets.kitselector.SingleParticleKitSelector;
|
||||
import mineplex.core.gadget.types.Gadget;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
@ -51,7 +52,7 @@ public class Treasure
|
||||
return TREASURE_REWARD_MANAGER;
|
||||
}
|
||||
|
||||
private static final GadgetManager GADGET_MANAGER = Managers.require(GadgetManager.class);
|
||||
protected static final GadgetManager GADGET_MANAGER = Managers.require(GadgetManager.class);
|
||||
private static final TrackManager TRACK_MANAGER = Managers.require(TrackManager.class);
|
||||
|
||||
private final TreasureType _treasureType;
|
||||
@ -288,12 +289,22 @@ public class Treasure
|
||||
return reward;
|
||||
}
|
||||
|
||||
protected GadgetReward addHatReward(HatType type, RewardRarity rarity, int weight)
|
||||
{
|
||||
return addHatReward(type, rarity, weight, getShards(rarity));
|
||||
}
|
||||
|
||||
protected GadgetReward addHatReward(HatType type, RewardRarity rarity, int weight, int shards)
|
||||
{
|
||||
return addGadgetReward(GADGET_MANAGER.getHatGadget(type), rarity, weight, shards);
|
||||
}
|
||||
|
||||
protected SingleParticleKitSelector getKitSelector(SingleParticleKitSelector.SingleParticleSelectors singleParticleSelectors)
|
||||
{
|
||||
return GADGET_MANAGER.getSingleParticleKitSelector(singleParticleSelectors);
|
||||
}
|
||||
|
||||
private int getShards(RewardRarity rarity)
|
||||
protected int getShards(RewardRarity rarity)
|
||||
{
|
||||
return SHARD_WORTH.getOrDefault(rarity, 0);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package mineplex.core.treasure.types;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.C;
|
||||
|
||||
public enum TreasureType
|
||||
@ -50,6 +51,31 @@ public enum TreasureType
|
||||
"in the depths, always bringing a new",
|
||||
"treasure from the darkness."
|
||||
),
|
||||
OMEGA(
|
||||
C.cAqua + "Omega Chest",
|
||||
"Omega Chest",
|
||||
"Omega",
|
||||
SkinData.OMEGA_CHEST.getSkull(),
|
||||
"The most powerful of all chests,",
|
||||
"it is able to go back in time to find",
|
||||
"loot that has been lost..."
|
||||
),
|
||||
MINESTRIKE(
|
||||
C.cGold + "MineStrike Treasure",
|
||||
"Minestrike Chest",
|
||||
"MinestrikeChest",
|
||||
new ItemStack(Material.TNT),
|
||||
"The Minestrike Chest is the only place to get",
|
||||
"the unique skins for Minestrike weapons!"
|
||||
),
|
||||
MOBA(
|
||||
C.cAqua + "Heroes of GWEN Treasure",
|
||||
"HOG Chest",
|
||||
"HOGChest",
|
||||
new ItemStack(Material.PRISMARINE),
|
||||
"Heroes of GWEN exclusive cosmetics!",
|
||||
"Each chest contains 4 exclusive items to the game!"
|
||||
),
|
||||
TRICK_OR_TREAT(
|
||||
C.cGold + "Trick or Treat Box",
|
||||
"Trick or Treat Chest",
|
||||
|
@ -3,6 +3,8 @@ package mineplex.core.treasure.types;
|
||||
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailHalloween;
|
||||
import mineplex.core.gadget.gadgets.death.DeathHalloween;
|
||||
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween;
|
||||
import mineplex.core.gadget.gadgets.kitselector.HalloweenKitSelector;
|
||||
import mineplex.core.gadget.gadgets.kitselector.SingleParticleKitSelector.SingleParticleSelectors;
|
||||
import mineplex.core.gadget.gadgets.particle.ParticleHalloween;
|
||||
import mineplex.core.gadget.gadgets.taunts.InfernalTaunt;
|
||||
import mineplex.core.reward.RewardType;
|
||||
@ -30,6 +32,7 @@ public class TrickOrTreatTreasure extends Treasure
|
||||
addGadgetReward(getGadget(ArrowTrailHalloween.class), rarity, 10);
|
||||
addGadgetReward(getGadget(DeathHalloween.class), rarity, 10);
|
||||
addGadgetReward(getGadget(DoubleJumpHalloween.class), rarity, 10);
|
||||
addGadgetReward(getGadget(HalloweenKitSelector.class), rarity, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -63,10 +63,9 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
lore.add(C.cGray + description);
|
||||
}
|
||||
|
||||
lore.add("");
|
||||
|
||||
if (treasure.isPurchasable())
|
||||
{
|
||||
lore.add("");
|
||||
lore.addAll(treasure.getPurchaseMethods());
|
||||
}
|
||||
|
||||
@ -128,7 +127,7 @@ public class TreasurePage extends ShopPageBase<TreasureManager, TreasureShop>
|
||||
}
|
||||
}
|
||||
// Purchase
|
||||
else
|
||||
else if (_treasure.isPurchasable())
|
||||
{
|
||||
getShop().openPageForPlayer(player, new PurchaseTreasurePage(getPlugin(), getShop(), getPlayer(), _treasure, TreasurePage.this));
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class Hub extends JavaPlugin implements IRelation
|
||||
String boosterGroup = serverConfiguration.getServerGroup().getBoosterGroup();
|
||||
ThankManager thankManager = new ThankManager(this, clientManager, donationManager);
|
||||
BoosterManager boosterManager = new BoosterManager(this, boosterGroup, clientManager, donationManager, inventoryManager, thankManager);
|
||||
HubManager hubManager = new HubManager( blockRestore, clientManager, incognito, donationManager, inventoryManager, disguiseManager, portal, partyManager, preferenceManager, petManager, pollManager, statsManager, achievementManager, hologramManager, npcManager,packetHandler, punish, serverStatusManager, thankManager, boosterManager, castleManager);
|
||||
HubManager hubManager = new HubManager(clientManager, donationManager, inventoryManager, disguiseManager, portal, partyManager, preferenceManager, petManager, pollManager, statsManager, achievementManager, hologramManager, npcManager, punish, thankManager, boosterManager);
|
||||
|
||||
QueueManager queueManager = new QueueManager(this, clientManager, donationManager, eloManager, partyManager);
|
||||
new ServerManager(this, clientManager, donationManager, portal, partyManager, serverStatusManager, hubManager, queueManager, boosterManager);
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.EventHandler;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.newnpc.event.NPCInteractEvent;
|
||||
import mineplex.core.npc.event.NpcInteractEntityEvent;
|
||||
import mineplex.core.portal.Intent;
|
||||
import mineplex.core.portal.Portal;
|
||||
@ -70,9 +71,9 @@ public class TemporaryGemHuntersServerSender extends MiniPlugin
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onUseNPC(NpcInteractEntityEvent event)
|
||||
public void onUseNPC(NPCInteractEvent event)
|
||||
{
|
||||
if (event.getNpc().getName().contains("Gem Hunters"))
|
||||
if (event.getNpc().getMetadata().equals("GAME_Gem Hunters"))
|
||||
{
|
||||
java.util.Optional<ServerInfo> info = _servers.entrySet().stream()
|
||||
// Ignore the type noise here; it's temporary
|
||||
|
@ -58,26 +58,26 @@ public class ParkourManager extends MiniPlugin
|
||||
_attempts = new HashMap<>();
|
||||
_parkours = new HashSet<>();
|
||||
|
||||
_parkours.add(new ParkourData(this, "House"));
|
||||
_parkours.add(new WaterParkourData(this));
|
||||
|
||||
List<Snake> snakes = new ArrayList<>();
|
||||
List<Location> path = _worldData.getCustomLocation(String.valueOf(Material.QUARTZ_ORE.getId()));
|
||||
|
||||
for (Location head : _worldData.getDataLocation("LIGHT_BLUE"))
|
||||
{
|
||||
snakes.add(new Snake(head, path));
|
||||
}
|
||||
|
||||
_parkours.add(new SnakeParkourData(this, snakes));
|
||||
|
||||
NewNPCManager npcManager = require(NewNPCManager.class);
|
||||
|
||||
for (ParkourData data : _parkours)
|
||||
{
|
||||
npcManager.spawnNPCs(data.getKey() + " START", null);
|
||||
npcManager.spawnNPCs(data.getKey() + " END", null);
|
||||
}
|
||||
// _parkours.add(new ParkourData(this, "House"));
|
||||
// _parkours.add(new WaterParkourData(this));
|
||||
//
|
||||
// List<Snake> snakes = new ArrayList<>();
|
||||
// List<Location> path = _worldData.getCustomLocation(String.valueOf(Material.QUARTZ_ORE.getId()));
|
||||
//
|
||||
// for (Location head : _worldData.getDataLocation("LIGHT_BLUE"))
|
||||
// {
|
||||
// snakes.add(new Snake(head, path));
|
||||
// }
|
||||
//
|
||||
// _parkours.add(new SnakeParkourData(this, snakes));
|
||||
//
|
||||
// NewNPCManager npcManager = require(NewNPCManager.class);
|
||||
//
|
||||
// for (ParkourData data : _parkours)
|
||||
// {
|
||||
// npcManager.spawnNPCs(data.getKey() + " START", null);
|
||||
// npcManager.spawnNPCs(data.getKey() + " END", null);
|
||||
// }
|
||||
}
|
||||
|
||||
public boolean isParkourMode(Player player)
|
||||
|
@ -51,8 +51,8 @@ public class HubPlugin extends MiniPlugin
|
||||
|
||||
protected void addHubGames()
|
||||
{
|
||||
addHubGame(new Tron(_hubGameManager));
|
||||
addHubGame(new Duels(_hubGameManager));
|
||||
//addHubGame(new Tron(_hubGameManager));
|
||||
//addHubGame(new Duels(_hubGameManager));
|
||||
}
|
||||
|
||||
protected final void addHubGame(HubGame game)
|
||||
|
@ -19,7 +19,6 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityPortalEnterEvent;
|
||||
import org.bukkit.event.entity.EntityPortalEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerPortalEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -40,7 +39,8 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.newnpc.NewNPCManager;
|
||||
import mineplex.core.newnpc.event.NPCInteractEvent;
|
||||
import mineplex.core.party.PartyManager;
|
||||
import mineplex.core.party.event.PartySelectServerEvent;
|
||||
import mineplex.core.portal.Intent;
|
||||
@ -71,10 +71,10 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
private static final Random random = new Random();
|
||||
|
||||
public final int TOP_SERVERS = 3; // The number of top contending servers for auto-joining games
|
||||
public final int MIN_SLOTS_REQUIRED = 12; // The number of slots the max server must have for auto-join
|
||||
public final int TOP_SERVERS = 3; // The number of top contending servers for auto-joining games
|
||||
public final int MIN_SLOTS_REQUIRED = 12; // The number of slots the max server must have for auto-join
|
||||
|
||||
public final long QUEUE_COOLDOWN = 2000; // Cooldown (in milliseconds) between queueing again for players
|
||||
public final long QUEUE_COOLDOWN = 2000; // Cooldown (in milliseconds) between queueing again for players
|
||||
private CoreClientManager _clientManager;
|
||||
private DonationManager _donationManager;
|
||||
private Portal _portal;
|
||||
@ -123,6 +123,8 @@ public class ServerManager extends MiniPlugin
|
||||
// TODO: Find more appropriate place to initialize Clans server shop?
|
||||
_clansShop = new ClansServerShop(this, _clientManager, _donationManager);
|
||||
|
||||
require(NewNPCManager.class).spawnNPCs("GAME_", null);
|
||||
|
||||
generatePermissions();
|
||||
}
|
||||
|
||||
@ -134,6 +136,28 @@ public class ServerManager extends MiniPlugin
|
||||
PermissionGroup.BUILDER.setPermission(Perm.FEATURE_SERVER, true, true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void npcInteract(NPCInteractEvent event)
|
||||
{
|
||||
String metadata = event.getNpc().getMetadata();
|
||||
String[] split = metadata.split("_");
|
||||
|
||||
if (split.length < 2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
String group = split[1];
|
||||
|
||||
_serverNpcShopMap.entrySet().forEach(entry ->
|
||||
{
|
||||
if (group.equals(entry.getKey()))
|
||||
{
|
||||
entry.getValue().attemptShopOpen(event.getPlayer());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void playerPortalEvent(PlayerPortalEvent event)
|
||||
{
|
||||
@ -157,15 +181,17 @@ public class ServerManager extends MiniPlugin
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = (Player)event.getEntity();
|
||||
Player player = (Player) event.getEntity();
|
||||
|
||||
if(!player.getWorld().getName().equalsIgnoreCase("world"))
|
||||
if (!player.getWorld().getName().equalsIgnoreCase("world"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.teleport(_hubManager.GetSpawn());
|
||||
runSyncLater(() -> {_quickShop.attemptShopOpen(player);}, 3L);
|
||||
runSyncLater(() -> {
|
||||
_quickShop.attemptShopOpen(player);
|
||||
}, 3L);
|
||||
|
||||
}
|
||||
|
||||
@ -446,7 +472,8 @@ public class ServerManager extends MiniPlugin
|
||||
/**
|
||||
* Select a {@code serverType} for a {@code player} that wishes to automatically join the best server
|
||||
* available for that server type.
|
||||
* @param player - the player hoping to select a server
|
||||
*
|
||||
* @param player - the player hoping to select a server
|
||||
* @param serverType - the name of the type of server to be joined
|
||||
*/
|
||||
public void selectServer(Player player, String serverType)
|
||||
@ -484,7 +511,7 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
private void updateCooldowns()
|
||||
{
|
||||
for (Iterator<String> playerIterator = _queueCooldowns.keySet().iterator(); playerIterator.hasNext();)
|
||||
for (Iterator<String> playerIterator = _queueCooldowns.keySet().iterator(); playerIterator.hasNext(); )
|
||||
{
|
||||
Player player = Bukkit.getPlayer(playerIterator.next());
|
||||
|
||||
@ -505,7 +532,7 @@ public class ServerManager extends MiniPlugin
|
||||
if (serverList == null) return null;
|
||||
|
||||
List<ServerInfo> servers = new ArrayList<ServerInfo>(serverList);
|
||||
servers = fetchOpenServers(player, servers, servers.size()); // Removes all full servers from list
|
||||
servers = fetchOpenServers(player, servers, servers.size()); // Removes all full servers from list
|
||||
Collections.sort(servers, new ServerCountSorter());
|
||||
|
||||
int count = Math.min(servers.size(), TOP_SERVERS);
|
||||
@ -572,7 +599,7 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
for (ServerInfo serverNpc : _serverKeyInfoMap.get(serverNpcName))
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(getName(), C.cYellow + serverNpc.Name + C.cWhite + " - " + serverNpc.MOTD + " " + serverNpc.CurrentPlayers + "/" + serverNpc.MaxPlayers));
|
||||
UtilPlayer.message(caller, F.main(getName(), C.cYellow + serverNpc.Name + C.cWhite + " - " + serverNpc.MOTD + " " + serverNpc.CurrentPlayers + "/" + serverNpc.MaxPlayers));
|
||||
}
|
||||
}
|
||||
|
||||
@ -584,7 +611,7 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
if (serverNpc.MOTD.equalsIgnoreCase(ChatColor.DARK_RED + "OFFLINE"))
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(getName(), C.cYellow + serverNpc.Name + C.cWhite + " - " + F.time(UtilTime.convertString(System.currentTimeMillis() - _serverUpdate.get(serverNpc.Name), 0, TimeUnit.FIT))));
|
||||
UtilPlayer.message(caller, F.main(getName(), C.cYellow + serverNpc.Name + C.cWhite + " - " + F.time(UtilTime.convertString(System.currentTimeMillis() - _serverUpdate.get(serverNpc.Name), 0, TimeUnit.FIT))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -670,9 +697,9 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
public ServerNpcShop getServerNPCShopByName(String name)
|
||||
{
|
||||
for(String shop : _serverNpcShopMap.keySet())
|
||||
for (String shop : _serverNpcShopMap.keySet())
|
||||
{
|
||||
if(shop.equalsIgnoreCase(name))
|
||||
if (shop.equalsIgnoreCase(name))
|
||||
{
|
||||
return _serverNpcShopMap.get(shop);
|
||||
}
|
||||
@ -750,7 +777,7 @@ public class ServerManager extends MiniPlugin
|
||||
{
|
||||
Vector vector = new Vector();
|
||||
|
||||
String [] parts = vectorString.trim().split(" ");
|
||||
String[] parts = vectorString.trim().split(" ");
|
||||
|
||||
vector.setX(Double.parseDouble(parts[0]));
|
||||
vector.setY(Double.parseDouble(parts[1]));
|
||||
|
Loading…
Reference in New Issue
Block a user