Merge master
This commit is contained in:
commit
5be91de006
@ -87,7 +87,7 @@
|
||||
<fileset dir="../Mineplex.ServerData/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.PlayerCache/bin">
|
||||
<fileset dir="../Mineplex.Cache/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
||||
@ -161,7 +161,7 @@
|
||||
<fileset dir="../Mineplex.Database/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.PlayerCache/bin">
|
||||
<fileset dir="../Mineplex.Cache/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.ServerData/bin">
|
||||
@ -214,7 +214,7 @@
|
||||
<fileset dir="../Mineplex.ServerData/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.PlayerCache/bin">
|
||||
<fileset dir="../Mineplex.Cache/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
||||
@ -254,7 +254,7 @@
|
||||
<fileset dir="../Mineplex.ServerData/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<fileset dir="../Mineplex.PlayerCache/bin">
|
||||
<fileset dir="../Mineplex.Cache/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
||||
@ -335,7 +335,7 @@
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
||||
<fileset dir="../Mineplex.PlayerCache/bin">
|
||||
<fileset dir="../Mineplex.Cache/bin">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
17
Plugins/Mineplex.Cache/.project
Normal file
17
Plugins/Mineplex.Cache/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Mineplex.Cache</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -35,6 +35,8 @@ import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.PlayerVelocityEvent;
|
||||
@ -81,6 +83,15 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
|
||||
_loggedIn.remove(event.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void playerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
player.setCustomName("");
|
||||
player.setCustomNameVisible(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ncpExempt(final PlayerToggleFlightEvent event)
|
||||
{
|
||||
@ -140,7 +151,8 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
|
||||
{
|
||||
Entry<UUID, NautHashMap<CheckType, Long>> entry = iterator.next();
|
||||
|
||||
for (Iterator<Entry<CheckType, Long>> innerIterator = entry.getValue().entrySet().iterator(); innerIterator.hasNext();)
|
||||
for (Iterator<Entry<CheckType, Long>> innerIterator = entry.getValue().entrySet().iterator(); innerIterator
|
||||
.hasNext();)
|
||||
{
|
||||
final Entry<CheckType, Long> entry2 = innerIterator.next();
|
||||
|
||||
@ -247,7 +259,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
|
||||
_entityNameMap.get(owner.getName()).put(spawnPacket.a, entityName);
|
||||
_entityMap.get(owner.getName()).put(spawnPacket.a, new Integer[]
|
||||
{
|
||||
newId
|
||||
newId
|
||||
});
|
||||
|
||||
sendProtocolPackets(owner, spawnPacket.a, newId, entityName, verifier, true, -1);
|
||||
@ -349,7 +361,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
|
||||
{
|
||||
newId = new Integer[]
|
||||
{
|
||||
UtilEnt.getNewEntityId()
|
||||
UtilEnt.getNewEntityId()
|
||||
};
|
||||
|
||||
_entityMap.get(owner.getName()).put(metaPacket.a, newId);
|
||||
@ -469,8 +481,8 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
|
||||
|
||||
_entityRiding.get(owner.getName()).remove(attachPacket.b);
|
||||
|
||||
sendProtocolPackets(owner, vehicleId, ids[ids.length - 1],
|
||||
_entityNameMap.get(owner.getName()).get(vehicleId), verifier, true, ids.length > 1 ? ids[0] : -1);
|
||||
sendProtocolPackets(owner, vehicleId, ids[ids.length - 1], _entityNameMap.get(owner.getName()).get(vehicleId),
|
||||
verifier, true, ids.length > 1 ? ids[0] : -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ public enum AchievementCategory
|
||||
|
||||
ONE_IN_THE_QUIVER("One in the Quiver", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.BOW, 0, GameCategory.ARCADE, "Slam Shooter Kit"),
|
||||
Material.BOW, 0, GameCategory.ARCADE, "Ninja Kit"),
|
||||
|
||||
SUPER_PAINTBALL("Super Paintball", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
@ -137,7 +137,7 @@ public enum AchievementCategory
|
||||
|
||||
MICRO_BATTLE("Micro Battle", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.LAVA, 0, GameCategory.ARCADE, null),
|
||||
Material.LAVA_BUCKET, 0, GameCategory.ARCADE, null),
|
||||
|
||||
BOMB_LOBBERS("Bomb Lobbers", null,
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
|
@ -64,7 +64,16 @@ public class PetTagPage extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
{
|
||||
_tagName = ChatColor.stripColor(_tagName);
|
||||
_tagName = _tagName.replaceAll("[^A-Za-z0-9]", "");
|
||||
|
||||
System.out.println("Pet name: " + _tagName + ".");
|
||||
if (_tagName.length() == 0)
|
||||
{
|
||||
UtilPlayer.message(getPlayer(), F.main(getPlugin().getName(), ChatColor.RED + "Supplied pet name contains invalid characters."));
|
||||
playDenySound(getPlayer());
|
||||
|
||||
getShop().openPageForPlayer(getPlayer(), new PetPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), "Pets", getPlayer()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (_tagName.length() > 16)
|
||||
{
|
||||
UtilPlayer.message(getPlayer(), F.main(getPlugin().getName(), ChatColor.RED + "Pet name cannot be longer than 16 characters."));
|
||||
|
@ -21,7 +21,7 @@ public class ParticleLegend extends ParticleGadget
|
||||
{
|
||||
public ParticleLegend(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Legendary Aura",
|
||||
super(manager, "Legendary Aura",
|
||||
UtilText.splitLineToArray(C.cGray + "This particle will be updated soon! Yay!", LineFormat.LORE),
|
||||
-1,
|
||||
Material.ENDER_PORTAL_FRAME, (byte)0);
|
||||
|
@ -17,7 +17,7 @@ public class Ignore extends CommandBase<IgnoreManager>
|
||||
@Override
|
||||
public void Execute(final Player caller, final String[] args)
|
||||
{
|
||||
if (args == null)
|
||||
if (args == null || args.length < 1)
|
||||
{
|
||||
Plugin.showIgnores(caller);
|
||||
}
|
||||
|
@ -2,7 +2,9 @@ package mineplex.core.itemstack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -12,6 +14,7 @@ import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.FireworkEffectMeta;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -19,6 +22,8 @@ import org.bukkit.inventory.meta.LeatherArmorMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.potion.Potion;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
|
||||
public class ItemBuilder
|
||||
{
|
||||
|
||||
@ -48,20 +53,17 @@ public class ItemBuilder
|
||||
private final HashMap<Enchantment, Integer> _enchants = new HashMap<Enchantment, Integer>();
|
||||
private final List<String> _lore = new ArrayList<String>();
|
||||
private Material _mat;
|
||||
// private Potion potion;
|
||||
private String _title = null;
|
||||
private boolean _unbreakable;
|
||||
private String _playerHeadName = null;
|
||||
private HashSet<ItemFlag> _itemFlags = new HashSet<ItemFlag>();
|
||||
|
||||
public ItemBuilder(ItemStack item)
|
||||
{
|
||||
this(item.getType(), item.getDurability());
|
||||
_amount = item.getAmount();
|
||||
_enchants.putAll(item.getEnchantments());
|
||||
if (item.getType() == Material.POTION)
|
||||
{
|
||||
// setPotion(Potion.fromItemStack(item));
|
||||
}
|
||||
|
||||
if (item.hasItemMeta())
|
||||
{
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
@ -81,6 +83,8 @@ public class ItemBuilder
|
||||
setColor(((LeatherArmorMeta) meta).getColor());
|
||||
}
|
||||
|
||||
_itemFlags.addAll(meta.getItemFlags());
|
||||
|
||||
_unbreakable = meta.spigot().isUnbreakable();
|
||||
}
|
||||
}
|
||||
@ -107,13 +111,60 @@ public class ItemBuilder
|
||||
this(mat, 1, data);
|
||||
}
|
||||
|
||||
public HashSet<ItemFlag> getItemFlags()
|
||||
{
|
||||
return _itemFlags;
|
||||
}
|
||||
|
||||
public ItemBuilder addItemFlags(ItemFlag... flags)
|
||||
{
|
||||
getItemFlags().addAll(Arrays.asList(flags));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setItemFlags(ItemFlag... flags)
|
||||
{
|
||||
getItemFlags().clear();
|
||||
addItemFlags(flags);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setItemFlags(Collection<ItemFlag> flags)
|
||||
{
|
||||
getItemFlags().clear();
|
||||
addItemFlags(flags.toArray(new ItemFlag[0]));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setHideInfo(boolean hideInfo)
|
||||
{
|
||||
if (hideInfo)
|
||||
{
|
||||
for (ItemFlag flag : ItemFlag.values())
|
||||
{
|
||||
getItemFlags().add(flag);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
getItemFlags().clear();
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder addEnchantment(Enchantment enchant, int level)
|
||||
{
|
||||
if (_enchants.containsKey(enchant))
|
||||
{
|
||||
_enchants.remove(enchant);
|
||||
}
|
||||
|
||||
_enchants.put(enchant, level);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -121,20 +172,31 @@ public class ItemBuilder
|
||||
{
|
||||
for (String lore : lores)
|
||||
{
|
||||
_lore.add(ChatColor.GRAY + lore);
|
||||
_lore.add(C.cGray + lore);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setLore(String... lores)
|
||||
{
|
||||
_lore.clear();
|
||||
_lore.addAll(Arrays.asList(lores));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder addLore(String lore, int maxLength)
|
||||
{
|
||||
_lore.addAll(split(lore, maxLength));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder addLores(List<String> lores)
|
||||
{
|
||||
_lore.addAll(lores);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -144,6 +206,7 @@ public class ItemBuilder
|
||||
{
|
||||
addLore(lore, maxLength);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -155,6 +218,7 @@ public class ItemBuilder
|
||||
public ItemStack build()
|
||||
{
|
||||
Material mat = _mat;
|
||||
|
||||
if (mat == null)
|
||||
{
|
||||
mat = Material.AIR;
|
||||
@ -164,8 +228,10 @@ public class ItemBuilder
|
||||
{
|
||||
Bukkit.getLogger().warning("Air material!");
|
||||
}
|
||||
|
||||
ItemStack item = new ItemStack(mat, _amount, _data);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
if (meta != null)
|
||||
{
|
||||
if (_title != null)
|
||||
@ -189,14 +255,13 @@ public class ItemBuilder
|
||||
((FireworkEffectMeta) meta).setEffect(FireworkEffect.builder().withColor(_color).build());
|
||||
}
|
||||
|
||||
meta.addItemFlags(getItemFlags().toArray(new ItemFlag[0]));
|
||||
meta.spigot().setUnbreakable(isUnbreakable());
|
||||
item.setItemMeta(meta);
|
||||
}
|
||||
|
||||
item.addUnsafeEnchantments(_enchants);
|
||||
// if (potion != null) {
|
||||
// potion.apply(item);
|
||||
// }
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
@ -263,52 +328,6 @@ public class ItemBuilder
|
||||
return _enchants.containsKey(enchant);
|
||||
}
|
||||
|
||||
public boolean isItem(ItemStack item)
|
||||
{
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
|
||||
if (item.getType() != getType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!meta.hasDisplayName() && getTitle() != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!meta.getDisplayName().equals(getTitle()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!meta.hasLore() && !getLore().isEmpty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (meta.hasLore())
|
||||
{
|
||||
for (String lore : meta.getLore())
|
||||
{
|
||||
if (!getLore().contains(lore))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Enchantment enchant : item.getEnchantments().keySet())
|
||||
{
|
||||
if (!hasEnchantment(enchant))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isUnbreakable()
|
||||
{
|
||||
return _unbreakable;
|
||||
@ -317,17 +336,14 @@ public class ItemBuilder
|
||||
public ItemBuilder setAmount(int amount)
|
||||
{
|
||||
_amount = amount;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setColor(Color color)
|
||||
{
|
||||
/* (!_mat.name().contains("LEATHER_"))
|
||||
{
|
||||
throw new IllegalArgumentException("Can only dye leather armor!");
|
||||
}*/
|
||||
|
||||
_color = color;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -338,19 +354,10 @@ public class ItemBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setPotion(Potion potion)
|
||||
{
|
||||
if (_mat != Material.POTION)
|
||||
{
|
||||
_mat = Material.POTION;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setRawTitle(String title)
|
||||
{
|
||||
_title = title;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -378,24 +385,28 @@ public class ItemBuilder
|
||||
}
|
||||
|
||||
setTitle(title);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setType(Material mat)
|
||||
{
|
||||
_mat = mat;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setUnbreakable(boolean setUnbreakable)
|
||||
{
|
||||
_unbreakable = setUnbreakable;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemBuilder setPlayerHead(String playerName)
|
||||
{
|
||||
_playerHeadName = playerName;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -2,6 +2,7 @@ package mineplex.hub.profile.buttons;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.gui.GuiItem;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.hub.profile.gui.GUIProfile;
|
||||
|
||||
@ -17,7 +18,7 @@ public class ButtonPrefs implements GuiItem
|
||||
|
||||
private GUIProfile _profile;
|
||||
private Player _player;
|
||||
|
||||
|
||||
public ButtonPrefs(GUIProfile profile, Player player)
|
||||
{
|
||||
_profile = profile;
|
||||
@ -33,29 +34,27 @@ public class ButtonPrefs implements GuiItem
|
||||
@Override
|
||||
public ItemStack getObject()
|
||||
{
|
||||
return ItemStackFactory.Instance.CreateStack(Material.REDSTONE_COMPARATOR.getId(), (byte)0, 1,
|
||||
ChatColor.RESET + C.cYellow + "Preferences",
|
||||
new String[]
|
||||
{
|
||||
"",
|
||||
C.cWhite + "Set your preferences to your liking",
|
||||
C.cWhite + "so you can enjoy the game more!",
|
||||
|
||||
"",
|
||||
C.cWhite + "Type " + C.cGreen + "/prefs" + C.cWhite + " to access this anywhere!"
|
||||
});
|
||||
return new ItemBuilder(Material.REDSTONE_COMPARATOR).setTitle(C.Reset + C.cYellow + "Preferences").addLore(new String[]
|
||||
{
|
||||
"",
|
||||
C.cWhite + "Set your preferences to your liking",
|
||||
C.cWhite + "so you can enjoy the game more!",
|
||||
|
||||
"",
|
||||
C.cWhite + "Type " + C.cGreen + "/prefs" + C.cWhite + " to access this anywhere!"
|
||||
}).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup()
|
||||
public void setup()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,13 +4,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
import mineplex.hub.server.ServerManager;
|
||||
@ -34,17 +35,18 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
{
|
||||
private List<ItemStack> _superSmashCycle = new ArrayList<ItemStack>();
|
||||
private List<ItemStack> _minigameCycle = new ArrayList<ItemStack>();
|
||||
|
||||
|
||||
private int _ssmIndex;
|
||||
private int _minigameIndex;
|
||||
|
||||
public ServerGameMenu(ServerManager plugin, QuickShop quickShop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player)
|
||||
|
||||
public ServerGameMenu(ServerManager plugin, QuickShop quickShop, CoreClientManager clientManager,
|
||||
DonationManager donationManager, String name, Player player)
|
||||
{
|
||||
super(plugin, quickShop, clientManager, donationManager, name, player, 47);
|
||||
|
||||
|
||||
createSuperSmashCycle();
|
||||
createMinigameCycle();
|
||||
|
||||
|
||||
buildPage();
|
||||
}
|
||||
|
||||
@ -52,82 +54,93 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
@Override
|
||||
protected void buildPage()
|
||||
{
|
||||
setItem(0, ItemStackFactory.Instance.CreateStack(Material.IRON_PICKAXE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "The Bridges " + C.cGray + "4 Team Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "4 Teams get 10 minutes to prepare.",
|
||||
ChatColor.RESET + "Then the bridges drop, and all hell",
|
||||
ChatColor.RESET + "breaks loose as you battle to the",
|
||||
ChatColor.RESET + "death with the other teams.",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BR") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
setItem(2, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_SWORD.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Survival Games " + C.cGray + "Solo/Team Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Search for chests to find loot and ",
|
||||
ChatColor.RESET + "fight others to be the last man standing. ",
|
||||
ChatColor.RESET + "Stay away from the borders!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("HG") + getPlugin().getGroupTagPlayerCount("SG2")) + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
setItem(0, new ItemBuilder(Material.IRON_PICKAXE)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "The Bridges " + C.cGray + "4 Team Survival").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "4 Teams get 10 minutes to prepare.",
|
||||
C.Reset + "Then the bridges drop, and all hell",
|
||||
C.Reset + "breaks loose as you battle to the",
|
||||
C.Reset + "death with the other teams.",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BR") + C.Reset + " other players!"
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(4, ItemStackFactory.Instance.CreateStack(Material.FEATHER.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Skywars " + C.cGray + "Solo/Team Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "16 contenders fight for the right to rule the skies!",
|
||||
ChatColor.RESET + "Spawn on a sky island and build your path!",
|
||||
ChatColor.RESET + "Find weapons to take your enemies down!",
|
||||
ChatColor.RESET + "Way up there, death ever looming if you fall..",
|
||||
ChatColor.RESET + "Can you fight? Can you live? Can you win Skywars?",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("SKY") + getPlugin().getGroupTagPlayerCount("SKY2")) + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
setItem(2, new ItemBuilder(Material.DIAMOND_SWORD)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Survival Games " + C.cGray + "Solo/Team Survival").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Search for chests to find loot and ",
|
||||
C.Reset + "fight others to be the last man standing. ",
|
||||
C.Reset + "Stay away from the borders!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen
|
||||
+ (getPlugin().getGroupTagPlayerCount("HG") + getPlugin().getGroupTagPlayerCount("SG2")) + C.Reset
|
||||
+ " other players!"
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(6, ItemStackFactory.Instance.CreateStack(Material.GOLDEN_APPLE.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "UHC " + C.cGray + "Ultra Hardcore Mode", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Extremely hard team-based survival ",
|
||||
ChatColor.RESET + "Gather materials and fight your way",
|
||||
ChatColor.RESET + "to become the last team standing!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("UHC") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
setItem(4, new ItemBuilder(Material.FEATHER)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Skywars " + C.cGray + "Solo/Team Survival").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "16 contenders fight to rule the skies!",
|
||||
C.Reset + "Spawn on a sky island and build your path!",
|
||||
C.Reset + "Find weapons to take your enemies down!",
|
||||
C.Reset + "Up in the skies, death looming if you fall..",
|
||||
C.Reset + "Win! Fight! Send enemies flying in Skywars!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen
|
||||
+ (getPlugin().getGroupTagPlayerCount("SKY") + getPlugin().getGroupTagPlayerCount("SKY2")) + C.Reset
|
||||
+ " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(8, ItemStackFactory.Instance.CreateStack(Material.BLAZE_ROD.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Wizards " + C.cGray + "Last Man Standing", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Wield powerful spells to fight",
|
||||
ChatColor.RESET + "against other players in this",
|
||||
ChatColor.RESET + "exciting free-for-all brawl!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("WIZ") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
setItem(6, new ItemBuilder(Material.GOLDEN_APPLE)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "UHC " + C.cGray + "Ultra Hardcore Mode").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Extremely hard team-based survival ",
|
||||
C.Reset + "Gather materials and fight your way",
|
||||
C.Reset + "to become the last team standing!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("UHC") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(18, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_CHESTPLATE, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Castle Siege " + C.cGray + "Team Game", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Defenders must protect King Sparklez",
|
||||
ChatColor.RESET + "from the endless waves of Undead",
|
||||
ChatColor.RESET + "until the sun rises!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("CS") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
setItem(8, new ItemBuilder(Material.BLAZE_ROD)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Wizards " + C.cGray + "Last Man Standing").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Wield powerful spells to fight",
|
||||
C.Reset + "against other players in this",
|
||||
C.Reset + "exciting free-for-all brawl!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("WIZ") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(20, ItemStackFactory.Instance.CreateStack(Material.GRASS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Block Hunt " + C.cGray + "Cat and Mouse", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Hide as blocks/animals, upgrade your ",
|
||||
ChatColor.RESET + "weapon and fight to survive against",
|
||||
ChatColor.RESET + "the Hunters!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BH") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
setItem(18, new ItemBuilder(Material.DIAMOND_CHESTPLATE)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Castle Siege " + C.cGray + "Team Game").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Defenders must protect King Sparklez",
|
||||
C.Reset + "from the endless waves of Undead",
|
||||
C.Reset + "until the sun rises!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("CS") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(20, new ItemBuilder(Material.GRASS)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Block Hunt " + C.cGray + "Cat and Mouse").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Hide as blocks/animals, upgrade your ",
|
||||
C.Reset + "weapon and fight to survive against",
|
||||
C.Reset + "the Hunters!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BH") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(22, _superSmashCycle.get(_ssmIndex));
|
||||
|
||||
setItem(24, ItemStackFactory.Instance.CreateStack(Material.TNT.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Mine-Strike " + C.cGray + "Team Survival", new String[]
|
||||
setItem(24, ItemStackFactory.Instance.CreateStack(Material.TNT.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Mine-Strike" + C.cGray + "Team Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "One team must defend two bomb sites from",
|
||||
@ -177,23 +190,79 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("BLD") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
setItem(24, new ItemBuilder(Material.TNT)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Mine-Strike " + C.cGray + "Team Survival").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "One team must defend two bomb sites from",
|
||||
C.Reset + "the other team, who are trying to plant a bomb",
|
||||
C.Reset + "and blow them up!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("MS") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(26, new ItemBuilder(Material.BOOK_AND_QUILL)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Draw My Thing " + C.cGray + "Pictionary!").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Players take turns at drawing a random",
|
||||
C.Reset + "word. Whoever guesses it within the time",
|
||||
C.Reset + "limit gets some points!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("DMT") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(36, new ItemBuilder(Material.BEACON).setTitle(C.Reset + C.Bold + C.cYellow + "Dominate " + C.cGray + "Team Game")
|
||||
.addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Customize one of five exciting champions",
|
||||
C.Reset + "and battle with the opposing team for the",
|
||||
C.Reset + "control points on the map.",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("DOM") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(38, new ItemBuilder(Material.GOLD_SWORD)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Team Deathmatch " + C.cGray + "Team Game").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Customize one of five exciting champions",
|
||||
C.Reset + "and battle with the opposing team to the",
|
||||
C.Reset + "last man standing.",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("TDM") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(40, new ItemBuilder(Material.WOOD)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Master Builders " + C.cGray + "Creative Build").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Players are given a Build Theme and ",
|
||||
C.Reset + "must use blocks, monsters and more",
|
||||
C.Reset + "to create a masterpiece!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("BLD") + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
setItem(42, _minigameCycle.get(_minigameIndex));
|
||||
|
||||
setItem(44, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte) 3, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Player Servers " + C.cGray + "Player Hosted Games", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join your friends in their own ",
|
||||
ChatColor.RESET + "Mineplex Player Server. You can play",
|
||||
ChatColor.RESET + "the games you want, when you want.",
|
||||
ChatColor.RESET + "",
|
||||
}));
|
||||
setItem(44, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Player Servers " + C.cGray + "Player Hosted Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Join your friends in their own ",
|
||||
C.Reset + "Mineplex Player Server. You can play",
|
||||
C.Reset + "the games you want, when you want.",
|
||||
C.Reset + "",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
getButtonMap().put(0, new SelectBRButton(this));
|
||||
getButtonMap().put(2, new SelectSGButton(this));
|
||||
getButtonMap().put(4, new SelectSKYButton(this));
|
||||
getButtonMap().put(6, new SelectUHCButton(this));
|
||||
getButtonMap().put(8, new SelectWIZButton(this));
|
||||
|
||||
|
||||
getButtonMap().put(18, new SelectCSButton(this));
|
||||
getButtonMap().put(20, new SelectBHButton(this));
|
||||
getButtonMap().put(22, new SelectSSMButton(this));
|
||||
@ -204,271 +273,280 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
getButtonMap().put(40, new SelectBLDButton(this));
|
||||
getButtonMap().put(42, new SelectMINButton(this));
|
||||
getButtonMap().put(44, new SelectPLAYERButton(this));
|
||||
// getButtonMap().put(44, new SelectBETAButton(this));
|
||||
// getButtonMap().put(44, new SelectBETAButton(this));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void createMinigameCycle()
|
||||
{
|
||||
int playerCount = getPlugin().getGroupTagPlayerCount("MIN") +
|
||||
getPlugin().getGroupTagPlayerCount("DR") +
|
||||
getPlugin().getGroupTagPlayerCount("DE") +
|
||||
getPlugin().getGroupTagPlayerCount("PB") +
|
||||
getPlugin().getGroupTagPlayerCount("TF") +
|
||||
getPlugin().getGroupTagPlayerCount("RUN") +
|
||||
getPlugin().getGroupTagPlayerCount("SN") +
|
||||
getPlugin().getGroupTagPlayerCount("DT") +
|
||||
getPlugin().getGroupTagPlayerCount("SQ") +
|
||||
getPlugin().getGroupTagPlayerCount("SA") +
|
||||
getPlugin().getGroupTagPlayerCount("SS") +
|
||||
getPlugin().getGroupTagPlayerCount("OITQ");
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(98, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.GOLD_BOOTS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(122, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.LEATHER_BOOTS.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.MILK_BUCKET.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BARDING.getId(), (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(159, (byte)14, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(309, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Death Tag",
|
||||
ChatColor.RESET + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
_minigameCycle.add(ItemStackFactory.Instance.CreateStack(319, (byte)0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Arcade " + C.cGray + "Mixed Games", new String []
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Play all of these fun minigames:",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Super Spleef",
|
||||
ChatColor.RESET + "Runner",
|
||||
ChatColor.RESET + "Dragons",
|
||||
ChatColor.RESET + "One in the Quiver",
|
||||
ChatColor.RESET + "Dragon Escape",
|
||||
ChatColor.RESET + "Sneaky Assassins",
|
||||
ChatColor.RESET + "Micro Battle",
|
||||
ChatColor.RESET + "Super Paintball",
|
||||
ChatColor.RESET + "Turf Wars",
|
||||
ChatColor.RESET + "Death Tag",
|
||||
ChatColor.RESET + C.Bold + ChatColor.GREEN + "Bacon Brawl",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + playerCount + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
int playerCount = getPlugin().getGroupTagPlayerCount("MIN") + getPlugin().getGroupTagPlayerCount("DR")
|
||||
+ getPlugin().getGroupTagPlayerCount("DE") + getPlugin().getGroupTagPlayerCount("PB")
|
||||
+ getPlugin().getGroupTagPlayerCount("TF") + getPlugin().getGroupTagPlayerCount("RUN")
|
||||
+ getPlugin().getGroupTagPlayerCount("SN") + getPlugin().getGroupTagPlayerCount("DT")
|
||||
+ getPlugin().getGroupTagPlayerCount("SQ") + getPlugin().getGroupTagPlayerCount("SA")
|
||||
+ getPlugin().getGroupTagPlayerCount("SS") + getPlugin().getGroupTagPlayerCount("OITQ");
|
||||
_minigameCycle.add(new ItemBuilder(Material.SMOOTH_BRICK)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + C.Bold + C.cGreen + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.GOLD_BOOTS)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + C.Bold + C.cGreen + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.DRAGON_EGG)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + C.Bold + C.cGreen + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.BOW)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + C.Bold + C.cGreen + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.LEATHER_BOOTS)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + C.Bold + C.cGreen + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.MILK_BUCKET)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + C.Bold + C.cGreen + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.MILK_BUCKET)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + C.Bold + C.cGreen + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.DIAMOND_BARDING)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + C.Bold + C.cGreen + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.STAINED_CLAY, 1, (byte) 14)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + C.Bold + C.cGreen + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.IRON_BOOTS)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + C.Bold + C.cGreen + "Death Tag",
|
||||
C.Reset + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
|
||||
_minigameCycle.add(new ItemBuilder(Material.PORK)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Arcade " + C.cGray + "Mixed Games").addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Play all of these fun minigames:",
|
||||
C.Reset + "",
|
||||
C.Reset + "Super Spleef",
|
||||
C.Reset + "Runner",
|
||||
C.Reset + "Dragons",
|
||||
C.Reset + "One in the Quiver",
|
||||
C.Reset + "Dragon Escape",
|
||||
C.Reset + "Sneaky Assassins",
|
||||
C.Reset + "Micro Battle",
|
||||
C.Reset + "Super Paintball",
|
||||
C.Reset + "Turf Wars",
|
||||
C.Reset + "Death Tag",
|
||||
C.Reset + C.Bold + C.cGreen + "Bacon Brawl",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen + playerCount + C.Reset + " other players!",
|
||||
}).setHideInfo(true).build());
|
||||
}
|
||||
|
||||
private void createSuperSmashCycle()
|
||||
{
|
||||
String[] desc = new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Pick from a selection of monsters,",
|
||||
ChatColor.RESET + "then battle other players to the ",
|
||||
ChatColor.RESET + "death with your monsters skills!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + (getPlugin().getGroupTagPlayerCount("SSM") + getPlugin().getGroupTagPlayerCount("SSM2")) + ChatColor.RESET + " other players!",
|
||||
};
|
||||
|
||||
_superSmashCycle.add(ItemStackFactory.Instance.CreateStack(397, (byte)4, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch", desc));
|
||||
String[] desc = new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + "Pick from a selection of monsters,",
|
||||
C.Reset + "then battle other players to the ",
|
||||
C.Reset + "death with your monsters skills!",
|
||||
C.Reset + "",
|
||||
C.Reset + "Join " + C.cGreen
|
||||
+ (getPlugin().getGroupTagPlayerCount("SSM") + getPlugin().getGroupTagPlayerCount("SSM2")) + C.Reset
|
||||
+ " other players!",
|
||||
};
|
||||
|
||||
_superSmashCycle.add(new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 4)
|
||||
.setTitle(C.Reset + C.Bold + C.cYellow + "Super Smash Mobs " + C.cGray + "Solo/Team Deathmatch").addLore(desc)
|
||||
.setHideInfo(true).build());
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
_ssmIndex++;
|
||||
_minigameIndex++;
|
||||
|
||||
|
||||
if (_ssmIndex >= _superSmashCycle.size())
|
||||
_ssmIndex = 0;
|
||||
|
||||
|
||||
if (_minigameIndex >= _minigameCycle.size())
|
||||
_minigameIndex = 0;
|
||||
|
||||
|
||||
buildPage();
|
||||
}
|
||||
|
||||
@ -491,12 +569,12 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
{
|
||||
getPlugin().getCastleSiegeShop().attemptShopOpen(player);
|
||||
}
|
||||
|
||||
|
||||
public void OpenBR(Player player)
|
||||
{
|
||||
getPlugin().getBridgesShop().attemptShopOpen(player);
|
||||
}
|
||||
|
||||
|
||||
public void OpenBH(Player player)
|
||||
{
|
||||
getPlugin().getBlockHuntShop().attemptShopOpen(player);
|
||||
|
@ -15,7 +15,9 @@ import org.bukkit.inventory.meta.SkullMeta;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.game.GameDisplay;
|
||||
@ -78,17 +80,8 @@ public class ServerNpcPage extends ShopPageInventory<ServerManager, ServerNpcSho
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
if (_onMainPage)
|
||||
{
|
||||
addButton(4, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BLOCK, (byte) 0, 1, C.cGreen + "Click to join instantly!"), new IButton() {
|
||||
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType) {
|
||||
getPlugin().selectServer(player, _serverGroupName);
|
||||
}
|
||||
});
|
||||
|
||||
buildAvailableServerPage(serverList, slotsNeeded);
|
||||
}
|
||||
else
|
||||
@ -108,7 +101,7 @@ public class ServerNpcPage extends ShopPageInventory<ServerManager, ServerNpcSho
|
||||
ChatColor.RESET + timeLeft + " Remaining...",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + C.cGreen + "Do you love playing on Mineplex?",
|
||||
ChatColor.RESET + "If you do, please consider purchasing Ultra or Hero",
|
||||
ChatColor.RESET + "If you do, please consider purchasing a premium rank",
|
||||
ChatColor.RESET + "from the store! Money goes towards running servers",
|
||||
ChatColor.RESET + "and creating exciting new games for everyone!",
|
||||
ChatColor.RESET + "",
|
||||
@ -297,15 +290,25 @@ public class ServerNpcPage extends ShopPageInventory<ServerManager, ServerNpcSho
|
||||
}
|
||||
}
|
||||
|
||||
addButton(40, new ShopItem(Material.GOLD_BLOCK, C.cAqua + yellowCount + " Game" + (yellowCount == 1 ? "" : "s") + " In Progress", new String[]{MESSAGE_SPECTATE}, yellowCount > 64 ? 64 : yellowCount, false), new IButton()
|
||||
{
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
if(showGreen) {
|
||||
addButton(40, new ShopItem(Material.GOLD_BLOCK, C.cAqua + yellowCount + " Game" + (yellowCount == 1 ? "" : "s") + " In Progress", new String[]{MESSAGE_SPECTATE}, yellowCount > 64 ? 64 : yellowCount, false), new IButton()
|
||||
{
|
||||
_onMainPage = false;
|
||||
}
|
||||
});
|
||||
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType)
|
||||
{
|
||||
_onMainPage = false;
|
||||
}
|
||||
});
|
||||
|
||||
addButton(4, ItemStackFactory.Instance.CreateStack(Material.DIAMOND_BLOCK, (byte) 0, 1, C.cGreen + "Click to join instantly!"), new IButton() {
|
||||
|
||||
@Override
|
||||
public void onClick(Player player, ClickType clickType) {
|
||||
getPlugin().selectServer(player, _serverGroupName);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Clear empty slots
|
||||
if (showGreen)
|
||||
{
|
||||
|
@ -18,6 +18,7 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.game.GameDisplay;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
@ -35,11 +36,11 @@ public class ServerTypePage extends ShopPageBase<ServerManager, ServerNpcShop>
|
||||
|
||||
private ServerGroup _serverGroup;
|
||||
|
||||
public ServerTypePage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager, DonationManager donationManager,
|
||||
Player player, ServerGroup serverGroup)
|
||||
public ServerTypePage(ServerManager plugin, ServerNpcShop shop, CoreClientManager clientManager,
|
||||
DonationManager donationManager, Player player, ServerGroup serverGroup)
|
||||
{
|
||||
super(plugin, shop, clientManager, donationManager, serverGroup.getServerNpcName(), player, 27);
|
||||
|
||||
|
||||
_serverGroup = serverGroup;
|
||||
|
||||
buildPage();
|
||||
@ -49,23 +50,25 @@ public class ServerTypePage extends ShopPageBase<ServerManager, ServerNpcShop>
|
||||
protected void buildPage()
|
||||
{
|
||||
String friendlyName = _serverGroup.getServerNpcName();
|
||||
|
||||
setItem(12, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte)3, 1, ChatColor.RESET + C.cYellow + "Solo " + friendlyName, new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + C.cRed + C.Bold + "WARNING: " + ChatColor.RESET + "Teaming in Solo Mode is bannable!",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + C.cGreen + "Click to Play",
|
||||
}));
|
||||
|
||||
setItem(14, ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM.getId(), (byte)3, 2, ChatColor.RESET + C.cYellow + "Team " + friendlyName, new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + C.cGray + "2 Player Teams",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + C.cGreen + "Click to Play"
|
||||
}));
|
||||
|
||||
|
||||
setItem(12, new ItemBuilder(Material.SKULL_ITEM, 1, (byte) 3).setTitle(C.Reset + C.cYellow + "Solo " + friendlyName)
|
||||
.addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + C.cRed + C.Bold + "WARNING: " + C.Reset + "Teaming in Solo Mode is bannable!",
|
||||
C.Reset + "",
|
||||
C.Reset + C.cGreen + "Click to Play",
|
||||
}).build());
|
||||
|
||||
setItem(14, new ItemBuilder(Material.SKULL_ITEM, 2, (byte) 3).setTitle(C.Reset + C.cYellow + "Team " + friendlyName)
|
||||
.addLore(new String[]
|
||||
{
|
||||
C.Reset + "",
|
||||
C.Reset + C.cGray + "2 Player Teams",
|
||||
C.Reset + "",
|
||||
C.Reset + C.cGreen + "Click to Play"
|
||||
}).build());
|
||||
|
||||
getButtonMap().put(12, new SelectTypeButton(this, false));
|
||||
getButtonMap().put(14, new SelectTypeButton(this, true));
|
||||
}
|
||||
@ -77,14 +80,16 @@ public class ServerTypePage extends ShopPageBase<ServerManager, ServerNpcShop>
|
||||
}
|
||||
|
||||
public void selectServer(Player player, boolean team)
|
||||
{
|
||||
{
|
||||
if (team)
|
||||
{
|
||||
getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), _serverGroup.getServerNpcName() + " Teams", player, _serverGroup.getTeamServerKey()));
|
||||
getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(),
|
||||
getDonationManager(), _serverGroup.getServerNpcName() + " Teams", player, _serverGroup.getTeamServerKey()));
|
||||
}
|
||||
else
|
||||
{
|
||||
getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), _serverGroup.getServerNpcName() + " Solo", player, _serverGroup.getPrefix()));
|
||||
getShop().openPageForPlayer(player, new ServerNpcPage(getPlugin(), getShop(), getClientManager(),
|
||||
getDonationManager(), _serverGroup.getServerNpcName() + " Solo", player, _serverGroup.getPrefix()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -134,9 +134,30 @@ public class Flash extends SkillActive
|
||||
while (curRange <= maxRange)
|
||||
{
|
||||
Location newTarget = player.getLocation().add(new Vector(0,0.2,0)).add(player.getLocation().getDirection().multiply(curRange));
|
||||
|
||||
if (!UtilBlock.airFoliage(newTarget.getBlock()) ||
|
||||
!UtilBlock.airFoliage(newTarget.getBlock().getRelative(BlockFace.UP)))
|
||||
Location aboveTarget = newTarget.getBlock().getRelative(BlockFace.UP).getLocation();
|
||||
|
||||
// half-slab
|
||||
boolean newTargetIsSlab = newTarget.getBlock().getType() == Material.STEP || newTarget.getBlock().getType() == Material.WOOD_STEP;
|
||||
boolean aboveTargetIsSlab = aboveTarget.getBlock().getType() == Material.STEP || aboveTarget.getBlock().getType() == Material.WOOD_STEP;
|
||||
|
||||
boolean newTargetSlabIsBottom = false;
|
||||
boolean aboveTargetSlabIsBottom = false;
|
||||
|
||||
if(newTargetIsSlab && curRange < 0.5)
|
||||
{
|
||||
int newTargetData = (int) newTarget.getBlock().getData();
|
||||
|
||||
if(newTargetData <= 7) newTargetSlabIsBottom = true;
|
||||
}
|
||||
|
||||
if(aboveTargetIsSlab && curRange < 0.25)
|
||||
{
|
||||
int aboveTargetData = (int) aboveTarget.getBlock().getData();
|
||||
|
||||
if(aboveTargetData <= 7) aboveTargetSlabIsBottom = true;
|
||||
}
|
||||
|
||||
if ((!newTargetSlabIsBottom && UtilBlock.fullSolid(newTarget.getBlock())) || (!aboveTargetSlabIsBottom && UtilBlock.fullSolid(aboveTarget.getBlock())))
|
||||
break;
|
||||
|
||||
//Progress Forwards
|
||||
|
@ -84,6 +84,9 @@ public class ShieldSmash extends SkillActive
|
||||
|
||||
if (cur.equals(player))
|
||||
continue;
|
||||
|
||||
if (UtilPlayer.isSpectator(cur))
|
||||
continue;
|
||||
|
||||
if (UtilMath.offset(loc, cur.getLocation()) > 2.5)
|
||||
continue;
|
||||
|
@ -94,13 +94,16 @@ public class FissureData
|
||||
_loc.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, block.getTypeId());
|
||||
|
||||
//Slow
|
||||
for (Player cur : block.getWorld().getPlayers())
|
||||
for (Player cur : block.getWorld().getPlayers()) {
|
||||
if(UtilPlayer.isSpectator(cur)) continue;
|
||||
|
||||
if (!cur.equals(_player))
|
||||
if (UtilMath.offset(block.getLocation().add(0.5, 0.5, 0.5), cur.getLocation()) < 1.5)
|
||||
{
|
||||
//Condition
|
||||
Host.Factory.Condition().Factory().Slow("Fissure", cur, _player, 1 + _level, 1, false, true, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,7 +149,10 @@ public class FissureData
|
||||
up.getWorld().playEffect(up.getLocation(), Effect.STEP_SOUND, block.getTypeId());
|
||||
|
||||
//Damage
|
||||
for (Player cur : up.getWorld().getPlayers())
|
||||
for (Player cur : up.getWorld().getPlayers()) {
|
||||
if (UtilPlayer.isSpectator(cur))
|
||||
continue;
|
||||
|
||||
if (!cur.equals(_player))
|
||||
{
|
||||
//Teleport
|
||||
@ -172,7 +178,7 @@ public class FissureData
|
||||
UtilPlayer.message(cur, F.main(Host.GetClassType().name(), F.name(_player.getName()) +" hit you with " + F.skill(Host.GetName(_level)) + "."));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//Next Column
|
||||
if (_height >= Math.min(3, _handled/2 + 1))
|
||||
{
|
||||
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,11 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Mineplex.ServerData" />
|
||||
</component>
|
||||
</module>
|
@ -1,15 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
|
@ -921,6 +921,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
|
||||
((CraftEntity) player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 0));
|
||||
|
||||
player.setCustomName("");
|
||||
player.setCustomNameVisible(false);
|
||||
|
||||
player.setSprinting(false);
|
||||
player.setSneaking(false);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@ -36,7 +35,6 @@ import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakEvent;
|
||||
import org.bukkit.event.hanging.HangingPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerLoginEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.world.WorldLoadEvent;
|
||||
@ -54,8 +52,8 @@ import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTabTitle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
@ -72,18 +70,24 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerGameRespawnEvent;
|
||||
import nautilus.game.arcade.events.PlayerStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.gametutorial.GameTutorial;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.managers.GameLobbyManager;
|
||||
import nautilus.game.arcade.scoreboard.GameScoreboard;
|
||||
import nautilus.game.arcade.stats.*;
|
||||
import nautilus.game.arcade.stats.AssistsStatTracker;
|
||||
import nautilus.game.arcade.stats.DamageDealtStatTracker;
|
||||
import nautilus.game.arcade.stats.DamageTakenStatTracker;
|
||||
import nautilus.game.arcade.stats.DeathsStatTracker;
|
||||
import nautilus.game.arcade.stats.ExperienceStatTracker;
|
||||
import nautilus.game.arcade.stats.GamesPlayedStatTracker;
|
||||
import nautilus.game.arcade.stats.KillsStatTracker;
|
||||
import nautilus.game.arcade.stats.LoseStatTracker;
|
||||
import nautilus.game.arcade.stats.StatTracker;
|
||||
import nautilus.game.arcade.stats.WinStatTracker;
|
||||
import nautilus.game.arcade.world.WorldData;
|
||||
import net.minecraft.server.v1_8_R3.EntityItem;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayInUseEntity;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardTeam;
|
||||
import net.minecraft.server.v1_8_R3.ScoreboardTeam;
|
||||
import net.minecraft.server.v1_8_R3.WorldServer;
|
||||
|
||||
public abstract class Game implements Listener
|
||||
@ -124,6 +128,7 @@ public abstract class Game implements Listener
|
||||
private boolean _countdownForce = false;
|
||||
|
||||
private String _customWinLine = "";
|
||||
private NautHashMap<Player, String> _customWinMessages = new NautHashMap<Player, String>();
|
||||
|
||||
// Kits
|
||||
private Kit[] _kits;
|
||||
@ -492,6 +497,11 @@ public abstract class Game implements Listener
|
||||
{
|
||||
_customWinLine = line;
|
||||
}
|
||||
|
||||
public void SetCustomWinMessage(Player player, String message)
|
||||
{
|
||||
_customWinMessages.put(player, message);
|
||||
}
|
||||
|
||||
public GameScoreboard GetScoreboard()
|
||||
{
|
||||
@ -1156,7 +1166,20 @@ public abstract class Game implements Listener
|
||||
UtilPlayer.message(player, "Nobody won the game!");
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, _customWinLine);
|
||||
if (_customWinMessages.containsKey(player))
|
||||
{
|
||||
if (!_customWinLine.trim().equalsIgnoreCase(""))
|
||||
{
|
||||
UtilPlayer.message(player, _customWinLine);
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, _customWinMessages.get(player));
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, _customWinLine);
|
||||
}
|
||||
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, "§aMap - §f§l" + WorldData.MapName + C.cGray + " created by " + "§f§l"
|
||||
+ WorldData.MapAuthor);
|
||||
|
@ -1,8 +1,9 @@
|
||||
package nautilus.game.arcade.game;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -13,8 +14,6 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
|
||||
public abstract class SoloGame extends Game
|
||||
@ -36,6 +35,11 @@ public abstract class SoloGame extends Game
|
||||
_players.SetColor(ChatColor.YELLOW);
|
||||
_players.SetName("Players");
|
||||
}
|
||||
|
||||
public GameTeam getPlayersTeam()
|
||||
{
|
||||
return _players;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void EndCheck()
|
||||
|
@ -1,6 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.christmas;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@ -8,9 +7,8 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftHorse;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -18,13 +16,16 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.BlockFadeEvent;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.MapUtil;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
@ -34,7 +35,6 @@ import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.reward.rewards.PetReward;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -45,14 +45,22 @@ import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.games.christmas.kits.KitPlayer;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.*;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part1;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part2;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part3;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part4;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutAttachEntity;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedSoundEffect;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
|
||||
|
||||
public class Christmas extends SoloGame
|
||||
{
|
||||
private GameTeam _badGuys;
|
||||
|
||||
private Sleigh _sleigh;
|
||||
|
||||
private Location _sleighSpawn;
|
||||
@ -201,7 +209,7 @@ public class Christmas extends SoloGame
|
||||
for (Location loc : WorldData.GetCustomLocs("129"))
|
||||
{
|
||||
_barrier.add(loc.getBlock().getLocation());
|
||||
MapUtil.QuickChangeBlockAt(loc, 65, (byte)3);
|
||||
MapUtil.QuickChangeBlockAt(loc, 166, (byte)0);
|
||||
}
|
||||
|
||||
//Parts
|
||||
@ -250,7 +258,8 @@ public class Christmas extends SoloGame
|
||||
if (event.GetState() != GameState.Live)
|
||||
return;
|
||||
|
||||
GetTeamList().add(new GameTeam(this, "Christmas Thieves", ChatColor.RED, WorldData.GetDataLocs("RED")));
|
||||
_badGuys = new GameTeam(this, "Christmas Thieves", ChatColor.RED, WorldData.GetDataLocs("RED"));
|
||||
AddTeam(_badGuys);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -366,7 +375,7 @@ public class Christmas extends SoloGame
|
||||
|
||||
for (Location loc : _barrier)
|
||||
{
|
||||
if (UtilMath.offset(GetSleigh().GetLocation(), loc) > 15)
|
||||
if (UtilMath.offset(GetSleigh().GetLocation(), loc) > 20)
|
||||
continue;
|
||||
|
||||
breakAt = loc;
|
||||
@ -458,14 +467,39 @@ public class Christmas extends SoloGame
|
||||
|
||||
for (Player player : GetPlayers(false))
|
||||
{
|
||||
Manager.rewardPet(player, "Christmas Elf", EntityType.VILLAGER);
|
||||
if (Manager.IsRewardItems())
|
||||
{
|
||||
if (Manager.GetTaskManager().hasCompletedTask(player, "CC Reward 2015"))
|
||||
{
|
||||
SetCustomWinMessage(player, "You already earned your reward");
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCustomWinMessage(player, "You earned " + C.cYellow + "2x Winter Holiday Treasure");
|
||||
|
||||
Manager.GetTaskManager().completedTask(new Callback<Boolean>()
|
||||
{
|
||||
@Override
|
||||
public void run(Boolean data)
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
Manager.getInventoryManager().addItemToInventory(player, "Winter Chest", 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Inventory", "An error occured while giving you " + C.cRed + "2x Winter Holiday Treasure" + C.cGray + "."));
|
||||
}
|
||||
}
|
||||
}, player, "CC Reward 2015");
|
||||
}
|
||||
}
|
||||
|
||||
Manager.GetGame().AddGems(player, 30, "Slaying the Pumpkin King", false, false);
|
||||
Manager.GetGame().AddGems(player, 10, "Participation", false, false);
|
||||
}
|
||||
|
||||
SetCustomWinLine("You earned Christmas Elf Pet!");
|
||||
AnnounceEnd(this.GetTeamList().get(0));
|
||||
AnnounceEnd(getPlayersTeam());
|
||||
SetState(GameState.End);
|
||||
}
|
||||
else if (GetPlayers(true).size() == 0)
|
||||
@ -476,7 +510,7 @@ public class Christmas extends SoloGame
|
||||
}
|
||||
|
||||
SetCustomWinLine("You all died...");
|
||||
AnnounceEnd(this.GetTeamList().get(1));
|
||||
AnnounceEnd(_badGuys);
|
||||
SetState(GameState.End);
|
||||
}
|
||||
else if (UtilTime.elapsed(GetStateTime(), _gameTime))
|
||||
@ -487,7 +521,7 @@ public class Christmas extends SoloGame
|
||||
}
|
||||
|
||||
SetCustomWinLine("You did not save Christmas in time.");
|
||||
AnnounceEnd(this.GetTeamList().get(1));
|
||||
AnnounceEnd(_badGuys);
|
||||
SetState(GameState.End);
|
||||
}
|
||||
|
||||
@ -504,7 +538,7 @@ public class Christmas extends SoloGame
|
||||
}
|
||||
|
||||
SetCustomWinLine("Santa Claus was killed by the Giant!");
|
||||
AnnounceEnd(this.GetTeamList().get(1));
|
||||
AnnounceEnd(_badGuys);
|
||||
SetState(GameState.End);
|
||||
}
|
||||
|
||||
@ -572,30 +606,60 @@ public class Christmas extends SoloGame
|
||||
return;
|
||||
|
||||
if (!IsLive())
|
||||
{
|
||||
Scoreboard.Reset();
|
||||
|
||||
String line = "";
|
||||
for (int i = 0 ; i < 20 ; i++)
|
||||
line += ((i % 2 == 0 ? C.cRed : C.cDGreen) + "█");
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(line);
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
Scoreboard.Write(C.cWhiteB + "May your winter");
|
||||
Scoreboard.Write(C.cWhiteB + "be filled with");
|
||||
Scoreboard.Write(C.cYellowB + "joy" + C.cWhiteB + " and " + C.cYellowB + "cheer.");
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
Scoreboard.Write(C.cAquaB + "Happy Holidays!");
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
|
||||
Scoreboard.Write(C.cWhiteB + "- Your friends at");
|
||||
Scoreboard.Write(C.cGoldB + "MINEPLEX");
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(line);
|
||||
|
||||
Scoreboard.Draw();
|
||||
return;
|
||||
}
|
||||
|
||||
//Wipe Last
|
||||
Scoreboard.Reset();
|
||||
|
||||
//Rounds
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cWhite + "Challenge:");
|
||||
Scoreboard.Write(C.cYellow + (5 - _parts.size()) + " of " + 5);
|
||||
Scoreboard.Write(C.cGoldB + "Challenge");
|
||||
Scoreboard.Write(C.cWhite + (5 - _parts.size()) + " of " + 5);
|
||||
|
||||
//Presents
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cWhite + "Presents:");
|
||||
Scoreboard.Write(C.cYellow + GetSleigh().GetPresents().size() + " of " + 10);
|
||||
Scoreboard.Write(C.cGreenB + "Presents");
|
||||
Scoreboard.Write(C.cWhite + GetSleigh().GetPresents().size() + " of " + 10);
|
||||
|
||||
//Players
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cWhite + "Players:");
|
||||
Scoreboard.Write(C.cYellow + GetPlayers(true).size());
|
||||
Scoreboard.Write(C.cYellowB + "Players");
|
||||
Scoreboard.Write(C.cWhite + GetPlayers(true).size());
|
||||
|
||||
//Time
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cWhite + "Time Left:");
|
||||
Scoreboard.Write(C.cYellow + UtilTime.MakeStr(_gameTime - (System.currentTimeMillis() - GetStateTime())));
|
||||
Scoreboard.Write(C.cYellowB + "Time Left");
|
||||
Scoreboard.Write(C.cWhite + UtilTime.MakeStr(_gameTime - (System.currentTimeMillis() - GetStateTime())));
|
||||
|
||||
Scoreboard.Draw();
|
||||
}
|
||||
@ -679,4 +743,37 @@ public class Christmas extends SoloGame
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void updateReigns(UpdateEvent event)
|
||||
{
|
||||
if (!InProgress())
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.FASTER)
|
||||
return;
|
||||
|
||||
if (_sleigh == null)
|
||||
return;
|
||||
|
||||
if (_sleigh.getSanta() == null)
|
||||
return;
|
||||
|
||||
for (SleighHorse horse : _sleigh.getHorses())
|
||||
{
|
||||
if (horse.Ent == null || !horse.Ent.isValid())
|
||||
continue;
|
||||
|
||||
PacketPlayOutAttachEntity packet = new PacketPlayOutAttachEntity(1, ((CraftHorse) horse.Ent).getHandle(), (((CraftEntity) _sleigh.getSanta()).getHandle()));
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void preventStand(PlayerInteractAtEntityEvent event)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
@ -2,30 +2,28 @@ package nautilus.game.arcade.game.games.christmas;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class Sleigh
|
||||
{
|
||||
@ -41,6 +39,8 @@ public class Sleigh
|
||||
private ArrayList<Location> PresentsCollected = new ArrayList<Location>();;
|
||||
|
||||
private Location Target;
|
||||
|
||||
private Entity Santa;
|
||||
|
||||
public void setupSleigh(Christmas host, Location loc)
|
||||
{
|
||||
@ -52,24 +52,25 @@ public class Sleigh
|
||||
|
||||
CentralEntity = loc.getWorld().spawn(loc, Chicken.class);
|
||||
UtilEnt.Vegetate(CentralEntity, true);
|
||||
UtilEnt.ghost(CentralEntity, true, true);
|
||||
UtilEnt.ghost(CentralEntity, true, false);
|
||||
Host.Manager.GetCondition().Factory().Invisible("Sleigh", (LivingEntity) CentralEntity, null, Double.MAX_VALUE, 3, false, false, true);
|
||||
|
||||
//Presents
|
||||
PresentSlots = new ArrayList<SleighPart>();
|
||||
|
||||
PresentSlots.add(new SleighPart(2, 0, 0, loc.clone(), -1, -2));
|
||||
PresentSlots.add(new SleighPart(2, 0, 0, loc.clone(), 0, -2));
|
||||
PresentSlots.add(new SleighPart(2, 0, 0, loc.clone(), 1, -2));
|
||||
PresentSlots.add(new SleighPart(2, 0, 0, loc.clone(), -1, -1));
|
||||
PresentSlots.add(new SleighPart(2, 0, 0, loc.clone(), 0, -1));
|
||||
PresentSlots.add(new SleighPart(2, 0, 0, loc.clone(), 1, -1));
|
||||
PresentSlots.add(new SleighPart(this, 2, 0, 0, loc.clone(), -1, -2));
|
||||
PresentSlots.add(new SleighPart(this, 2, 0, 0, loc.clone(), 0, -2));
|
||||
PresentSlots.add(new SleighPart(this, 2, 0, 0, loc.clone(), 1, -2));
|
||||
PresentSlots.add(new SleighPart(this, 2, 0, 0, loc.clone(), -1, -1));
|
||||
PresentSlots.add(new SleighPart(this, 2, 0, 0, loc.clone(), 0, -1));
|
||||
PresentSlots.add(new SleighPart(this, 2, 0, 0, loc.clone(), 1, -1));
|
||||
|
||||
PresentSlots.add(new SleighPart(6, 0, 0, loc.clone(), -1, -2));
|
||||
PresentSlots.add(new SleighPart(6, 0, 0, loc.clone(), 0, -2));
|
||||
PresentSlots.add(new SleighPart(6, 0, 0, loc.clone(), 1, -2));
|
||||
PresentSlots.add(new SleighPart(6, 0, 0, loc.clone(), -1, -1));
|
||||
PresentSlots.add(new SleighPart(6, 0, 0, loc.clone(), 0, -1));
|
||||
PresentSlots.add(new SleighPart(6, 0, 0, loc.clone(), 1, -1));
|
||||
PresentSlots.add(new SleighPart(this, 6, 0, 0, loc.clone(), -1, -2));
|
||||
PresentSlots.add(new SleighPart(this, 6, 0, 0, loc.clone(), 0, -2));
|
||||
PresentSlots.add(new SleighPart(this, 6, 0, 0, loc.clone(), 1, -2));
|
||||
PresentSlots.add(new SleighPart(this, 6, 0, 0, loc.clone(), -1, -1));
|
||||
PresentSlots.add(new SleighPart(this, 6, 0, 0, loc.clone(), 0, -1));
|
||||
PresentSlots.add(new SleighPart(this, 6, 0, 0, loc.clone(), 1, -1));
|
||||
|
||||
//Sleigh
|
||||
SleighEnts = new ArrayList<SleighPart>();
|
||||
@ -77,65 +78,71 @@ public class Sleigh
|
||||
for (SleighPart part : PresentSlots)
|
||||
SleighEnts.add(part);
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 0, -3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -1, -3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -2, -3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 1, -3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, -3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 0, -3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -1, -3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -2, -3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 1, -3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 2, -3));
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -2, -2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), -1, -2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 0, -2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 1, -2));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, -2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -2, -2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), -1, -2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 0, -2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 1, -2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 2, -2));
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -2, -1));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), -1, -1));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 0, -1));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 1, -1));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, -1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -2, -1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), -1, -1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 0, -1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 1, -1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 2, -1));
|
||||
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -2, 0));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -1, 0));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 0, 0));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 1, 0));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, 0));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -2, 0));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -1, 0));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 0, 0));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 1, 0));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 2, 0));
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -2, 1));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), -1, 1));
|
||||
SleighEnts.add(new SleighPart(0, 159, 15, loc.clone(), 0, 1));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 1, 1));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, 1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -2, 1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), -1, 1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 15, loc.clone(), 0, 1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 1, 1));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 2, 1));
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), -2, 2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), -1, 2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 0, 2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 1, 2));
|
||||
SleighEnts.add(new SleighPart(0, 44, 7, loc.clone(), 2, 2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), -2, 2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), -1, 2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 0, 2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 1, 2));
|
||||
SleighEnts.add(new SleighPart(this, 0, 44, 7, loc.clone(), 2, 2));
|
||||
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -2, 3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), -1, 3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 0, 3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 1, 3));
|
||||
SleighEnts.add(new SleighPart(0, 159, 14, loc.clone(), 2, 3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -2, 3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), -1, 3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 0, 3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 1, 3));
|
||||
SleighEnts.add(new SleighPart(this, 0, 159, 14, loc.clone(), 2, 3));
|
||||
|
||||
//Santa
|
||||
SleighPart santa = new SleighPart(3, 0, 0, loc.clone(), 0, 1);
|
||||
santa.AddSanta();
|
||||
SleighPart santa = new SleighPart(this, 3, 0, 0, loc.clone(), 0, 1);
|
||||
Santa = santa.AddSanta();
|
||||
SleighEnts.add(santa);
|
||||
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), -1.5, 8));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), 1.5, 8));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Dasher", -1.5, 8));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Dancer", 1.5, 8));
|
||||
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Prancer", -1.5, 11));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Vixen", 1.5, 11));
|
||||
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Comet", -1.5, 14));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Cupid", 1.5, 14));
|
||||
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), -1.5, 11));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), 1.5, 11));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Donner", -1.5, 17));
|
||||
SleighHorses.add(new SleighHorse(loc.clone(), "Blitzen", 1.5, 17));
|
||||
|
||||
for (SleighHorse horse : SleighHorses)
|
||||
horse.spawnHorse();
|
||||
|
||||
for (SleighHorse horse : SleighHorses)
|
||||
UtilEnt.Leash(horse.Ent, santa.GetTop(), false, false);
|
||||
// for (SleighHorse horse : SleighHorses)
|
||||
// UtilEnt.Leash(horse.Ent, santa.GetTop(), true, false);
|
||||
}
|
||||
|
||||
public Location GetLocation()
|
||||
@ -157,6 +164,8 @@ public class Sleigh
|
||||
|
||||
Move(CentralEntity, Target, 1);
|
||||
|
||||
Santa.setTicksLived(1);
|
||||
|
||||
//Move Sleigh
|
||||
for (SleighPart part : SleighEnts)
|
||||
{
|
||||
@ -184,24 +193,6 @@ public class Sleigh
|
||||
{
|
||||
for (Player player : Host.GetPlayers(true))
|
||||
{
|
||||
if (!Recharge.Instance.usable(player, "Sleigh Bump"))
|
||||
continue;
|
||||
|
||||
for (SleighPart part : SleighEnts)
|
||||
if (UtilMath.offset(player, part.Ent) < 1)
|
||||
{
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory2d(CentralEntity, player), 0.4, true, 0.2, 0, 0, true);
|
||||
Recharge.Instance.useForce(player, "Sleigh Bump", 400);
|
||||
}
|
||||
|
||||
|
||||
for (SleighHorse part : SleighHorses)
|
||||
if (UtilMath.offset(player, part.Ent) < 1)
|
||||
{
|
||||
UtilAction.velocity(player, UtilAlg.getTrajectory2d(CentralEntity, player), 0.4, true, 0.2, 0, 0, true);
|
||||
Recharge.Instance.useForce(player, "Sleigh Bump", 400);
|
||||
}
|
||||
|
||||
if (player.getLocation().getZ() < CentralEntity.getLocation().getZ() - 24)
|
||||
{
|
||||
player.damage(1);
|
||||
@ -211,6 +202,44 @@ public class Sleigh
|
||||
Recharge.Instance.useForce(player, "Sleigh Bump", 400);
|
||||
}
|
||||
}
|
||||
|
||||
for (SleighPart part : SleighEnts)
|
||||
{
|
||||
for (Entity ent : UtilEnt.getInRadius(part.Ent.getLocation(), 1).keySet())
|
||||
{
|
||||
if (isPart(ent))
|
||||
continue;
|
||||
|
||||
if (ent instanceof Player)
|
||||
{
|
||||
if (!Recharge.Instance.usable((Player) ent, "Sleigh Bump"))
|
||||
continue;
|
||||
|
||||
Recharge.Instance.useForce((Player) ent, "Sleigh Bump", 400);
|
||||
}
|
||||
|
||||
UtilAction.velocity(ent, UtilAlg.getTrajectory2d(CentralEntity, ent), 0.4, true, 0.2, 0, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
for (SleighHorse part : SleighHorses)
|
||||
{
|
||||
for (Entity ent : UtilEnt.getInRadius(part.Ent.getLocation(), 1).keySet())
|
||||
{
|
||||
if (isPart(ent))
|
||||
continue;
|
||||
|
||||
if (ent instanceof Player)
|
||||
{
|
||||
if (!Recharge.Instance.usable((Player) ent, "Sleigh Bump"))
|
||||
continue;
|
||||
|
||||
Recharge.Instance.useForce((Player) ent, "Sleigh Bump", 400);
|
||||
}
|
||||
|
||||
UtilAction.velocity(ent, UtilAlg.getTrajectory2d(CentralEntity, ent), 0.4, true, 0.2, 0, 0, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean HasPresent(Location loc)
|
||||
@ -222,6 +251,7 @@ public class Sleigh
|
||||
{
|
||||
PresentsCollected.add(loc);
|
||||
loc.getBlock().setType(Material.AIR);
|
||||
loc.getBlock().getRelative(BlockFace.DOWN).getRelative(BlockFace.DOWN).setType(Material.IRON_BLOCK);
|
||||
loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.GLASS);
|
||||
UtilFirework.launchFirework(loc.clone().add(0.5, 0.5, 0.5), FireworkEffect.builder().flicker(false).withColor(Color.YELLOW).with(Type.BALL).trail(true).build(), new Vector(0,1,0), 0);
|
||||
|
||||
@ -267,4 +297,35 @@ public class Sleigh
|
||||
{
|
||||
return SleighHorses;
|
||||
}
|
||||
|
||||
public Entity getSanta()
|
||||
{
|
||||
return Santa;
|
||||
}
|
||||
|
||||
public boolean isPart(Entity ent)
|
||||
{
|
||||
if (ent == null)
|
||||
return false;
|
||||
|
||||
if (ent == CentralEntity)
|
||||
return true;
|
||||
|
||||
if (ent == Santa)
|
||||
return true;
|
||||
|
||||
for (SleighPart part : SleighEnts)
|
||||
if (part.Block == ent || part.Ent == ent || (ent instanceof LivingEntity && part.HasEntity((LivingEntity) ent)))
|
||||
return true;
|
||||
|
||||
for (SleighHorse horse : SleighHorses)
|
||||
if (horse.Ent == ent || (ent instanceof LivingEntity && horse.HasEntity((LivingEntity) ent)))
|
||||
return true;
|
||||
|
||||
for (SleighPart part : PresentSlots)
|
||||
if (part.Block == ent || part.Ent == ent || (ent instanceof LivingEntity && part.HasEntity((LivingEntity) ent)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,19 @@ package nautilus.game.arcade.game.games.christmas;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Horse.Color;
|
||||
import org.bukkit.entity.Horse.Style;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
@ -14,19 +27,6 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
|
||||
import net.minecraft.server.v1_8_R3.Vector3f;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Horse.Color;
|
||||
import org.bukkit.entity.Horse.Style;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class SleighHorse
|
||||
{
|
||||
private Location _lastFacing;
|
||||
@ -40,9 +40,11 @@ public class SleighHorse
|
||||
public int horseId;
|
||||
public double OffsetX;
|
||||
public double OffsetZ;
|
||||
public String Name;
|
||||
|
||||
public SleighHorse(Location loc, double x, double z)
|
||||
public SleighHorse(Location loc, String name, double x, double z)
|
||||
{
|
||||
Name = name;
|
||||
OffsetX = x;
|
||||
OffsetZ = z;
|
||||
_lastFacing = loc.add(x, 0.5, z);
|
||||
@ -182,6 +184,10 @@ public class SleighHorse
|
||||
Ent = _lastFacing.getWorld().spawn(_lastFacing.subtract(0, 0.5, 0), Horse.class);
|
||||
UtilEnt.Vegetate(Ent);
|
||||
UtilEnt.ghost(Ent, true, false);
|
||||
Ent.setRemoveWhenFarAway(false);
|
||||
|
||||
Ent.setCustomName(C.cWhiteB + Name);
|
||||
Ent.setCustomNameVisible(true);
|
||||
|
||||
Ent.setStyle(Style.BLACK_DOTS);
|
||||
Ent.setColor(Color.BROWN);
|
||||
|
@ -1,9 +1,5 @@
|
||||
package nautilus.game.arcade.game.games.christmas;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -16,6 +12,10 @@ import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.LeatherArmorMeta;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
|
||||
public class SleighPart
|
||||
{
|
||||
public Chicken Ent;
|
||||
@ -23,38 +23,32 @@ public class SleighPart
|
||||
public double OffsetX;
|
||||
public double OffsetZ;
|
||||
|
||||
public SleighPart(int rise, int id, int data, Location loc, double x, double z)
|
||||
public int Rise;
|
||||
public int Id;
|
||||
public int Data;
|
||||
public Location Location;
|
||||
|
||||
public SleighPart(Sleigh sleigh, int rise, int id, int data, Location loc, double x, double z)
|
||||
{
|
||||
//Base
|
||||
Ent = loc.getWorld().spawn(loc.add(x, 0, z), Chicken.class);
|
||||
Ent.setBaby();
|
||||
Ent.setAgeLock(true);
|
||||
Ent.setRemoveWhenFarAway(false);
|
||||
|
||||
UtilEnt.Vegetate(Ent, true);
|
||||
UtilEnt.ghost(Ent, true, true);
|
||||
|
||||
UtilEnt.ghost(Ent, true, false);
|
||||
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", Ent, null, Double.MAX_VALUE, 3, false, false, true);
|
||||
|
||||
//Height
|
||||
Chicken top = Ent;
|
||||
for (int i=0 ; i<rise ; i++)
|
||||
{
|
||||
Chicken newTop = loc.getWorld().spawn(loc.add(x, 0, z), Chicken.class);
|
||||
newTop.setBaby();
|
||||
newTop.setAgeLock(true);
|
||||
UtilEnt.Vegetate(newTop, true);
|
||||
UtilEnt.ghost(newTop, true, true);
|
||||
|
||||
top.setPassenger(newTop);
|
||||
top = newTop;
|
||||
}
|
||||
|
||||
//Block
|
||||
if (id != 0)
|
||||
{
|
||||
Block = loc.getWorld().spawnFallingBlock(loc.add(0, 1, 0), id, (byte)data);
|
||||
top.setPassenger(Block);
|
||||
}
|
||||
|
||||
Rise = rise;
|
||||
Id = id;
|
||||
Data = data;
|
||||
Location = loc;
|
||||
OffsetX = x;
|
||||
OffsetZ = z;
|
||||
|
||||
addRise(sleigh);
|
||||
}
|
||||
|
||||
public void RefreshBlocks()
|
||||
@ -70,7 +64,7 @@ public class SleighPart
|
||||
|
||||
if (ent instanceof FallingBlock)
|
||||
((CraftFallingSand)ent).getHandle().ticksLived = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetPresent()
|
||||
@ -87,10 +81,10 @@ public class SleighPart
|
||||
top.setPassenger(Block);
|
||||
}
|
||||
|
||||
public void AddSanta()
|
||||
public Entity AddSanta()
|
||||
{
|
||||
if (Ent == null)
|
||||
return;
|
||||
return null;
|
||||
|
||||
Skeleton skel = Ent.getWorld().spawn(Ent.getLocation().add(0, 1, 0), Skeleton.class);
|
||||
UtilEnt.Vegetate(skel);
|
||||
@ -99,6 +93,7 @@ public class SleighPart
|
||||
ItemStack head = new ItemStack(Material.LEATHER_HELMET);
|
||||
LeatherArmorMeta meta = (LeatherArmorMeta)head.getItemMeta();
|
||||
meta.setColor(Color.RED);
|
||||
meta.spigot().setUnbreakable(true);
|
||||
head.setItemMeta(meta);
|
||||
skel.getEquipment().setHelmet(head);
|
||||
|
||||
@ -116,18 +111,22 @@ public class SleighPart
|
||||
|
||||
ItemStack boots = new ItemStack(Material.LEATHER_BOOTS);
|
||||
meta = (LeatherArmorMeta)boots.getItemMeta();
|
||||
meta.setColor(Color.RED);
|
||||
meta.setColor(Color.BLACK);
|
||||
boots.setItemMeta(meta);
|
||||
skel.getEquipment().setBoots(boots);
|
||||
|
||||
skel.setCustomName(C.Bold + "Santa Claus");
|
||||
skel.setCustomNameVisible(true);
|
||||
|
||||
Entity top = Ent;
|
||||
while (top.getPassenger() != null)
|
||||
top = top.getPassenger();
|
||||
|
||||
top.setPassenger(skel);
|
||||
|
||||
skel.setCustomName(C.Bold + "Santa Claus");
|
||||
skel.setCustomNameVisible(true);
|
||||
|
||||
skel.setRemoveWhenFarAway(false);
|
||||
|
||||
return skel;
|
||||
}
|
||||
|
||||
public boolean HasEntity(LivingEntity ent)
|
||||
@ -159,4 +158,30 @@ public class SleighPart
|
||||
|
||||
return ent;
|
||||
}
|
||||
|
||||
private void addRise(Sleigh sleigh)
|
||||
{
|
||||
Chicken top = Ent;
|
||||
for (int i=0 ; i<Rise ; i++)
|
||||
{
|
||||
Chicken newTop = Location.getWorld().spawn(Ent.getLocation(), Chicken.class);
|
||||
newTop.setBaby();
|
||||
newTop.setAgeLock(true);
|
||||
newTop.setRemoveWhenFarAway(false);
|
||||
|
||||
UtilEnt.Vegetate(newTop, true);
|
||||
UtilEnt.ghost(newTop, true, false);
|
||||
sleigh.Host.Manager.GetCondition().Factory().Invisible("Sleigh", newTop, null, Double.MAX_VALUE, 3, false, false, true);
|
||||
|
||||
top.setPassenger(newTop);
|
||||
top = newTop;
|
||||
}
|
||||
|
||||
//Block
|
||||
if (Id != 0)
|
||||
{
|
||||
Block = Location.getWorld().spawnFallingBlock(Ent.getLocation().add(0, 1, 0), Id, (byte) Data);
|
||||
top.setPassenger(Block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,21 +3,20 @@ package nautilus.game.arcade.game.games.christmas.content;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.MapUtil;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.MapUtil;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
|
||||
public class BossFloor
|
||||
{
|
||||
private Part5 Host;
|
||||
@ -114,9 +113,10 @@ public class BossFloor
|
||||
_restoreLoc = Host.GetBoss().GetEntity().getLocation().getBlock().getLocation().add(0.5, 0, 0.5);
|
||||
|
||||
//Give Wool
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
for (int i=3 ; i<9 ; i++)
|
||||
player.getInventory().setItem(i, ItemStackFactory.Instance.CreateStack(Material.WOOL, _color));
|
||||
for (Player player : Host.Host.GetPlayers(true))
|
||||
for (int i=0 ; i<9 ; i++)
|
||||
if (player.getInventory().getItem(i) == null || player.getInventory().getItem(i).getType() == Material.AIR)
|
||||
player.getInventory().setItem(i, ItemStackFactory.Instance.CreateStack(Material.WOOL, _color));
|
||||
}
|
||||
//Countdown
|
||||
else if (_state == 1)
|
||||
|
@ -32,8 +32,8 @@ public class CaveGiant
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(_ent);
|
||||
|
||||
_ent.setMaxHealth(200);
|
||||
_ent.setHealth(200);
|
||||
_ent.setMaxHealth(300);
|
||||
_ent.setHealth(300);
|
||||
|
||||
_tpLoc = _ent.getLocation();
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
package nautilus.game.arcade.game.games.christmas.content;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
|
||||
public class IceMaze
|
||||
{
|
||||
private Christmas Host;
|
||||
@ -22,6 +23,18 @@ public class IceMaze
|
||||
|
||||
private Location _present;
|
||||
|
||||
private Comparator<Block> _heightComparator = new Comparator<Block>()
|
||||
{
|
||||
@Override
|
||||
public int compare(Block o1, Block o2)
|
||||
{
|
||||
if (o1.getLocation().getBlockY() == o2.getLocation().getBlockY())
|
||||
return 0;
|
||||
|
||||
return o1.getLocation().getBlockY() > o2.getLocation().getBlockY() ? 1 : -1;
|
||||
}
|
||||
};
|
||||
|
||||
public IceMaze(Christmas host, ArrayList<Location> mazeCorners, ArrayList<Location> mazeExits, Location[] presents)
|
||||
{
|
||||
Host = host;
|
||||
@ -71,6 +84,8 @@ public class IceMaze
|
||||
if (_blocks.isEmpty())
|
||||
return;
|
||||
|
||||
Collections.sort(_blocks, _heightComparator);
|
||||
|
||||
for (int i=0 ; i<20 ; i++)
|
||||
{
|
||||
if (_blocks.isEmpty())
|
||||
|
@ -1,17 +1,15 @@
|
||||
package nautilus.game.arcade.game.games.christmas.content;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.entity.Snowball;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
@ -51,8 +49,8 @@ public class SnowmanBoss
|
||||
_minions.add(new SnowmanMinion(_spawn.getWorld().spawn(_spawn, Snowman.class)));
|
||||
|
||||
_heart = _spawn.getWorld().spawn(_spawn, IronGolem.class);
|
||||
_heart.setMaxHealth(1000);
|
||||
_heart.setHealth(1000);
|
||||
_heart.setMaxHealth(1400);
|
||||
_heart.setHealth(1400);
|
||||
UtilEnt.Vegetate(_heart);
|
||||
|
||||
Host.CreatureAllowOverride = false;
|
||||
@ -147,7 +145,17 @@ public class SnowmanBoss
|
||||
else
|
||||
{
|
||||
if ((minion.Target == null || !minion.Target.isValid() || !Host.IsAlive(minion.Target)) && !Host.GetPlayers(true).isEmpty())
|
||||
minion.Target = UtilAlg.Random(Host.GetPlayers(true));
|
||||
{
|
||||
List<Player> valid = new ArrayList<Player>();
|
||||
for (Player player : Host.GetPlayers(true))
|
||||
if (UtilMath.offset(player, minion.Ent) <= 25 && player.getLocation().getBlockY() >= minion.Ent.getLocation().getBlockY())
|
||||
valid.add(player);
|
||||
|
||||
minion.Target = UtilAlg.Random(valid);
|
||||
}
|
||||
|
||||
if (minion.Target == null)
|
||||
continue;
|
||||
|
||||
//Move
|
||||
UtilEnt.CreatureMoveFast(minion.Ent, minion.Target.getLocation(), 1.6f);
|
||||
|
@ -6,17 +6,6 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilWorld;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -28,6 +17,16 @@ import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.content.SnowmanWaypoint.CardinalDirection;
|
||||
|
||||
public class SnowmanMaze
|
||||
{
|
||||
private Christmas Host;
|
||||
@ -163,48 +162,90 @@ public class SnowmanMaze
|
||||
if (south != null) nextBlock.add(south);
|
||||
if (east != null) nextBlock.add(east);
|
||||
if (west != null) nextBlock.add(west);
|
||||
|
||||
//Random Direction
|
||||
if (!nextBlock.isEmpty())
|
||||
|
||||
if(nextBlock.isEmpty())
|
||||
{
|
||||
data.getValue().Target = UtilAlg.Random(nextBlock).getLocation().add(0.5, 0, 0.5);
|
||||
UtilEnt.CreatureMove(data.getKey(), data.getValue().Target, 1.4f);
|
||||
entIterator.remove();
|
||||
data.getKey().remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
if(nextBlock.size() > 1 && data.getValue().Direction != CardinalDirection.NULL) // they can do a uturn if they're stuck
|
||||
{
|
||||
if(data.getValue().Direction == CardinalDirection.NORTH)
|
||||
{
|
||||
nextBlock.remove(south);
|
||||
}
|
||||
else if(data.getValue().Direction == CardinalDirection.SOUTH)
|
||||
{
|
||||
nextBlock.remove(north);
|
||||
}
|
||||
else if(data.getValue().Direction == CardinalDirection.WEST)
|
||||
{
|
||||
nextBlock.remove(east);
|
||||
}
|
||||
else if(data.getValue().Direction == CardinalDirection.EAST)
|
||||
{
|
||||
nextBlock.remove(west);
|
||||
}
|
||||
}
|
||||
|
||||
if (nextBlock.isEmpty())
|
||||
{
|
||||
entIterator.remove();
|
||||
data.getKey().remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
//Random Direction
|
||||
Location nextLoc = UtilAlg.Random(nextBlock).getLocation();
|
||||
data.getValue().Target = nextLoc.clone().add(0.5, 0, 0.5);
|
||||
if(north != null && nextLoc.equals(north.getLocation()))
|
||||
{
|
||||
data.getValue().Direction = CardinalDirection.NORTH;
|
||||
}
|
||||
else if(south != null && nextLoc.equals(south.getLocation()))
|
||||
{
|
||||
data.getValue().Direction = CardinalDirection.SOUTH;
|
||||
}
|
||||
else if(east != null && nextLoc.equals(east.getLocation()))
|
||||
{
|
||||
data.getValue().Direction = CardinalDirection.EAST;
|
||||
}
|
||||
else if(west != null && nextLoc.equals(west.getLocation()))
|
||||
{
|
||||
data.getValue().Direction = CardinalDirection.WEST;
|
||||
}
|
||||
}
|
||||
|
||||
//Timeout Move
|
||||
if (UtilMath.offset(data.getKey().getLocation(), data.getValue().Last) > 0.1)
|
||||
data.getValue().Time = System.currentTimeMillis();
|
||||
|
||||
if (UtilTime.elapsed(data.getValue().Time, 2000))
|
||||
UtilEnt.CreatureMove(data.getKey(), data.getValue().Target, 1.4f);
|
||||
|
||||
UtilEnt.CreatureMoveFast(data.getKey(), data.getValue().Target, 1.4f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Block getTarget(Block start, Block cur, BlockFace face)
|
||||
{
|
||||
if (cur == null)
|
||||
cur = start;
|
||||
|
||||
|
||||
while (_waypoints.contains(cur.getRelative(face)))
|
||||
{
|
||||
cur = cur.getRelative(face);
|
||||
|
||||
|
||||
//Stop at intersection
|
||||
int count = 0;
|
||||
|
||||
|
||||
if (face != BlockFace.NORTH && _waypoints.contains(cur.getRelative(BlockFace.NORTH))) count++;
|
||||
if (face != BlockFace.SOUTH && _waypoints.contains(cur.getRelative(BlockFace.SOUTH))) count++;
|
||||
if (face != BlockFace.EAST && _waypoints.contains(cur.getRelative(BlockFace.EAST))) count++;
|
||||
if (face != BlockFace.WEST && _waypoints.contains(cur.getRelative(BlockFace.WEST))) count++;
|
||||
|
||||
|
||||
if (count > 1)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (cur.equals(start))
|
||||
return null;
|
||||
|
||||
|
||||
return cur;
|
||||
}
|
||||
|
||||
@ -213,7 +254,7 @@ public class SnowmanMaze
|
||||
//Spawn
|
||||
if (!Host.GetSleigh().HasPresent(_present))
|
||||
{
|
||||
while (_ents.size() < 36)
|
||||
while (_ents.size() < 44)
|
||||
{
|
||||
Location loc = UtilAlg.Random(_spawns);
|
||||
|
||||
|
@ -6,6 +6,7 @@ public class SnowmanWaypoint
|
||||
{
|
||||
public Location Last;
|
||||
public Location Target;
|
||||
public CardinalDirection Direction = CardinalDirection.NULL;
|
||||
public long Time;
|
||||
|
||||
public SnowmanWaypoint(Location last)
|
||||
@ -14,4 +15,9 @@ public class SnowmanWaypoint
|
||||
Target = null;
|
||||
Time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static enum CardinalDirection
|
||||
{
|
||||
NORTH, SOUTH, EAST, WEST, NULL // such order much not care
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,15 @@
|
||||
package nautilus.game.arcade.game.games.christmas.kits;
|
||||
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
@ -21,15 +24,23 @@ public class KitPlayer extends Kit
|
||||
|
||||
new String[]
|
||||
{
|
||||
"Help Santa retreive the lost presents!"
|
||||
"Help Santa retrieve the lost presents!"
|
||||
},
|
||||
|
||||
new Perk[]
|
||||
{
|
||||
},
|
||||
EntityType.ZOMBIE,
|
||||
EntityType.SKELETON,
|
||||
new ItemStack(Material.IRON_SWORD));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void SpawnCustom(LivingEntity ent)
|
||||
{
|
||||
ent.getEquipment().setHelmet(new ItemBuilder(Material.LEATHER_HELMET).setColor(Color.RED).setUnbreakable(true).build());
|
||||
ent.getEquipment().setChestplate(new ItemBuilder(Material.LEATHER_CHESTPLATE).setColor(Color.RED).build());
|
||||
ent.getEquipment().setLeggings(new ItemBuilder(Material.LEATHER_LEGGINGS).setColor(Color.RED).build());
|
||||
ent.getEquipment().setBoots(new ItemBuilder(Material.LEATHER_BOOTS).setColor(Color.BLACK).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -43,7 +54,7 @@ public class KitPlayer extends Kit
|
||||
item = ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, C.cGreen + C.Bold + "Toy Bow");
|
||||
item.addEnchantment(Enchantment.ARROW_INFINITE, 1);
|
||||
player.getInventory().setItem(1, item);
|
||||
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
|
||||
player.getInventory().setItem(9, ItemStackFactory.Instance.CreateStack(Material.ARROW));
|
||||
|
||||
//Axe
|
||||
item = ItemStackFactory.Instance.CreateStack(Material.STONE_PICKAXE, (byte)0, 1, C.cGreen + C.Bold + "Coal Digger");
|
||||
|
@ -1,35 +1,42 @@
|
||||
package nautilus.game.arcade.game.games.christmas.parts;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextTop;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.SkullType;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.Skull;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
public abstract class Part implements Listener
|
||||
{
|
||||
public Christmas Host;
|
||||
@ -42,6 +49,7 @@ public abstract class Part implements Listener
|
||||
protected double _objectiveHealth = 1;
|
||||
|
||||
protected HashMap<Creature, Player> _creatures = new HashMap<Creature, Player>();
|
||||
protected NautHashMap<Entity, Location> _spawnedPresents = new NautHashMap<Entity, Location>();
|
||||
|
||||
public Part(Christmas host, Location sleigh, Location[] presents)
|
||||
{
|
||||
@ -53,38 +61,63 @@ public abstract class Part implements Listener
|
||||
loc.getBlock().setType(Material.AIR);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void Prepare()
|
||||
{
|
||||
Activate();
|
||||
|
||||
for (Location loc : _presents)
|
||||
{
|
||||
Block present = loc.getBlock();
|
||||
present.setTypeIdAndData(Material.SKULL.getId(), (byte)1, true);
|
||||
|
||||
Skull skull = (Skull) present.getState();
|
||||
skull.setSkullType(SkullType.PLAYER);
|
||||
{
|
||||
Location standLoc = loc.clone().add(0, -1.45, 0);
|
||||
standLoc.setYaw(UtilMath.r(100));
|
||||
|
||||
//Present Type
|
||||
double r = Math.random();
|
||||
if (r > 0.75) skull.setOwner("CruXXx");
|
||||
else if (r > 0.5) skull.setOwner("CruXXx");
|
||||
else if (r > 0.25) skull.setOwner("CruXXx");
|
||||
else skull.setOwner("CruXXx");
|
||||
Host.CreatureAllowOverride = true;
|
||||
ArmorStand stand = loc.getWorld().spawn(standLoc, ArmorStand.class);
|
||||
Host.CreatureAllowOverride = false;
|
||||
|
||||
//Angle
|
||||
BlockFace face = BlockFace.UP;
|
||||
while (face == BlockFace.UP || face == BlockFace.DOWN || face == BlockFace.SELF)
|
||||
face = BlockFace.values()[UtilMath.r(BlockFace.values().length)];
|
||||
skull.setRotation(face);
|
||||
|
||||
skull.update();
|
||||
stand.setVisible(false);
|
||||
stand.setGravity(false);
|
||||
|
||||
ItemStack stack = ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM, (byte) 3);
|
||||
SkullMeta meta = (SkullMeta) stack.getItemMeta();
|
||||
meta.setOwner("CruXXx");
|
||||
stack.setItemMeta(meta);
|
||||
|
||||
stand.setHelmet(stack);
|
||||
//
|
||||
// present.setTypeIdAndData(Material.SKULL.getId(), (byte)1, true);
|
||||
//
|
||||
// Skull skull = (Skull) present.getState();
|
||||
// skull.setSkullType(SkullType.PLAYER);
|
||||
//
|
||||
// //Present Type
|
||||
// double r = Math.random();
|
||||
// if (r > 0.75) skull.setOwner("CruXXx");
|
||||
// else if (r > 0.5) skull.setOwner("CruXXx");
|
||||
// else if (r > 0.25) skull.setOwner("CruXXx");
|
||||
// else skull.setOwner("CruXXx");
|
||||
//
|
||||
// //Angle
|
||||
// BlockFace face = BlockFace.UP;
|
||||
// while (face == BlockFace.UP || face == BlockFace.DOWN || face == BlockFace.SELF)
|
||||
// face = BlockFace.values()[UtilMath.r(BlockFace.values().length)];
|
||||
// skull.setRotation(face);
|
||||
//
|
||||
// skull.update();
|
||||
|
||||
_spawnedPresents.put(stand, loc);
|
||||
|
||||
//Beacon
|
||||
present.getRelative(BlockFace.DOWN).setType(Material.BEACON);
|
||||
for (int x=-1 ; x<=1 ; x++)
|
||||
for (int z=-1 ; z<=1 ; z++)
|
||||
present.getRelative(x, -2, z).setType(Material.IRON_BLOCK);
|
||||
{
|
||||
loc.getBlock().getRelative(x, -2, z).setType(Material.IRON_BLOCK);
|
||||
loc.getBlock().getRelative(x, -3, z).setType(Material.IRON_BLOCK);
|
||||
}
|
||||
|
||||
loc.getBlock().getRelative(BlockFace.DOWN).getRelative(BlockFace.DOWN).setType(Material.BEACON);
|
||||
loc.getBlock().getRelative(BlockFace.DOWN).setType(Material.STAINED_GLASS);
|
||||
loc.getBlock().getRelative(BlockFace.DOWN).setData(UtilMath.randomElement(new Byte[]{14, 5, 13}));
|
||||
}
|
||||
|
||||
}
|
||||
@ -157,35 +190,38 @@ public abstract class Part implements Listener
|
||||
return true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void PresentCollect(PlayerInteractEvent event)
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = false)
|
||||
public void PresentCollect(PlayerInteractAtEntityEvent event)
|
||||
{
|
||||
if (event.getClickedBlock() == null)
|
||||
Location present = _spawnedPresents.get(event.getRightClicked());
|
||||
if (present == null)
|
||||
return;
|
||||
|
||||
|
||||
boolean contains = false;
|
||||
for (Location loc : _presents)
|
||||
if (loc.getBlock().equals(event.getClickedBlock()))
|
||||
if (loc.getBlock().equals(present.getBlock()))
|
||||
contains = true;
|
||||
|
||||
if (!contains)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
if (!Host.IsLive())
|
||||
return;
|
||||
|
||||
if (!Host.IsAlive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (Host.GetSleigh().HasPresent(event.getClickedBlock().getLocation()))
|
||||
if (Host.GetSleigh().HasPresent(present.getBlock().getLocation()))
|
||||
return;
|
||||
|
||||
if (UtilMath.offset(event.getPlayer().getLocation(), event.getClickedBlock().getLocation().add(0.5, 0.5, 0.5)) > 2)
|
||||
if (UtilMath.offset(event.getPlayer().getLocation(), present.clone().add(0.5, 0.5, 0.5)) > 2)
|
||||
return;
|
||||
|
||||
Host.GetSleigh().AddPresent(event.getClickedBlock().getLocation());
|
||||
_spawnedPresents.remove(event.getRightClicked());
|
||||
|
||||
event.getRightClicked().remove();
|
||||
|
||||
Host.GetSleigh().AddPresent(present.getBlock().getLocation());
|
||||
|
||||
Host.SantaSay("Well done " + event.getPlayer().getName() + "! You collected a present!", null);
|
||||
}
|
||||
@ -276,4 +312,21 @@ public abstract class Part implements Listener
|
||||
_creatures.clear();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onDamagePresent(EntityDamageEvent event)
|
||||
{
|
||||
event.setCancelled(_spawnedPresents.containsKey(event.getEntity()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void PresentParticles(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
for (Entity ent : _spawnedPresents.keySet())
|
||||
{
|
||||
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, ent.getLocation().clone().add(0, 1.5, 0), .3F, .3F, .3F, 0F, 1, ViewDist.LONG, UtilServer.getPlayers());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,41 +1,33 @@
|
||||
package nautilus.game.arcade.game.games.christmas.parts;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
|
||||
public class Part1 extends Part
|
||||
{
|
||||
private ArrayList<Location> _skeletons;
|
||||
@ -145,7 +137,7 @@ public class Part1 extends Part
|
||||
|
||||
_presents = System.currentTimeMillis();
|
||||
|
||||
Host.SantaSay("Theres some of the presents up ahead!", ChristmasAudio.P1_B);
|
||||
Host.SantaSay("There are some of the presents up ahead!", ChristmasAudio.P1_B);
|
||||
SetObjectivePresents();
|
||||
}
|
||||
|
||||
@ -189,7 +181,7 @@ public class Part1 extends Part
|
||||
}
|
||||
|
||||
Host.SantaSay("Clear the path! Watch out for the undead!", ChristmasAudio.P1_D);
|
||||
SetObjectiveText("Clear a path for Santas Sleigh!", 1);
|
||||
SetObjectiveText("Clear a path for Santa's Sleigh!", 1);
|
||||
}
|
||||
|
||||
private void UpdateClear()
|
||||
|
@ -3,10 +3,22 @@ package nautilus.game.arcade.game.games.christmas.parts;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -17,24 +29,6 @@ import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.content.CaveGiant;
|
||||
import nautilus.game.arcade.game.games.christmas.content.Snake;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Giant;
|
||||
import org.bukkit.entity.Spider;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Part4 extends Part
|
||||
{
|
||||
private ArrayList<Location> _roofIce;
|
||||
@ -51,6 +45,13 @@ public class Part4 extends Part
|
||||
private boolean _b = false;
|
||||
private HologramManager _holoManager;
|
||||
|
||||
private String[] _evilElfNames = new String[]
|
||||
{ "Bing", "Bling", "Blitz", "Larry", "Buddy", "Buster", "Cedar", "Dash", "Eggnog", "Elfie", "Elm", "Elvis",
|
||||
"Evergreen", "Figgy", "Flake", "Frank", "Frost", "Gabriel", "George", "Henry", "Hermey", "Ice", "Jangle",
|
||||
"Jingle", "Jinx", "Kringle", "Kris", "Louie", "Max", "Mistletoe", "Nat", "Nick", "Noel", "Pax", "Peppermin",
|
||||
"Pine", "Ralphie", "Rudy", "Snow", "Snowball", "Star", "Tinsel", "Tiny", "Topper", "Trinket", "Wayne",
|
||||
"Wink", "Yule", "Zippy" };
|
||||
|
||||
public Part4(HologramManager holoManager, Christmas host, Location sleigh, Location[] presents, ArrayList<Location> roofIce, ArrayList<Location> mobs,
|
||||
ArrayList<Location> snakeHead, ArrayList<Location> snakeTrail, ArrayList<Location> gate, ArrayList<Location> checkpoints, Location giant)
|
||||
{
|
||||
@ -85,7 +86,7 @@ public class Part4 extends Part
|
||||
@EventHandler
|
||||
public void GateUpdate(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.SEC)
|
||||
if (event.getType() != UpdateType.FAST)
|
||||
return;
|
||||
|
||||
if (_gate.isEmpty())
|
||||
@ -187,6 +188,8 @@ public class Part4 extends Part
|
||||
ent.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));
|
||||
ent.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));
|
||||
ent.setVillager(true);
|
||||
|
||||
ent.setCustomName("Evil Elf " + UtilMath.randomElement(_evilElfNames));
|
||||
|
||||
ent.setHealth(9);
|
||||
|
||||
|
@ -2,41 +2,37 @@ package nautilus.game.arcade.game.games.christmas.parts;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.content.*;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.BlockBurnEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.content.BossFloor;
|
||||
import nautilus.game.arcade.game.games.christmas.content.BossMobs;
|
||||
import nautilus.game.arcade.game.games.christmas.content.BossSnowmanPattern;
|
||||
import nautilus.game.arcade.game.games.christmas.content.PumpkinKing;
|
||||
|
||||
public class Part5 extends Part
|
||||
{
|
||||
private ArrayList<Location> _spawn;
|
||||
@ -385,6 +381,9 @@ public class Part5 extends Part
|
||||
@EventHandler
|
||||
public void Damage(CustomDamageEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (_boss == null)
|
||||
return;
|
||||
|
||||
|
@ -258,8 +258,23 @@ public class Arena
|
||||
|
||||
public void closeDoor()
|
||||
{
|
||||
for (Location loc : _doorBlocks)
|
||||
loc.getBlock().setType(Material.OBSIDIAN);
|
||||
_host.Manager.getScheduler().scheduleSyncDelayedTask(_host.Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
for (Location loc : _doorBlocks)
|
||||
loc.getBlock().setType(Material.OBSIDIAN);
|
||||
|
||||
// Lag exploit check
|
||||
for (Player p : getPastPlayers())
|
||||
{
|
||||
Arena closest = _host.getArenaByMid(UtilAlg.findClosest(p.getLocation(), _host.getAllArenaMids()));
|
||||
if (closest != _host.getPlayerArenas().get(p))
|
||||
p.teleport(UtilAlg.findClosest(p.getLocation(), getSpawns()));
|
||||
}
|
||||
}
|
||||
}, 5L);
|
||||
}
|
||||
|
||||
public boolean isOpenDoor()
|
||||
|
@ -1,8 +1,10 @@
|
||||
package nautilus.game.arcade.game.games.gladiators;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
@ -23,7 +25,6 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.entity.EntityShootBowEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutAnimation;
|
||||
|
||||
@ -107,6 +108,10 @@ public class Gladiators extends SoloGame
|
||||
DontAllowOverfill = true;
|
||||
EnableTutorials = false;
|
||||
|
||||
BlockBreakAllow.add(Material.SUGAR_CANE_BLOCK.getId());
|
||||
BlockBreakAllow.add(Material.GRASS.getId());
|
||||
BlockBreakAllow.add(Material.LONG_GRASS.getId());
|
||||
|
||||
registerStatTrackers(
|
||||
new BrawlerTracker(this),
|
||||
//new UntouchableTracker(this),
|
||||
@ -464,6 +469,11 @@ public class Gladiators extends SoloGame
|
||||
return mids;
|
||||
}
|
||||
|
||||
public HashMap<Player, Arena> getPlayerArenas()
|
||||
{
|
||||
return _playerArenas;
|
||||
}
|
||||
|
||||
public ArrayList<Location> getAllArenaMids()
|
||||
{
|
||||
ArrayList<Location> mids = new ArrayList<>();
|
||||
@ -671,9 +681,15 @@ public class Gladiators extends SoloGame
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_playerArenas.get(p).isOpenDoor())
|
||||
return;
|
||||
|
||||
//p.sendMessage("ARENA MOVE CHECK METHOD!");
|
||||
Manager.getPluginManager().callEvent(new PlayerChangeArenaEvent(e.getPlayer(), closest, _playerArenas.get(p)));
|
||||
_playerArenas.put(p, closest);
|
||||
|
||||
// Push player a little
|
||||
UtilAction.velocity(p, UtilAlg.getTrajectory2d(p.getLocation(), closest.getMid()), 1.7, false, 0.2, 0, 3, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -892,8 +908,8 @@ public class Gladiators extends SoloGame
|
||||
|
||||
if (e.getEntity() instanceof Player)
|
||||
{
|
||||
((Player)e.getEntity()).getInventory().addItem(new ItemStack(Material.ARROW, 1)); // Arrow fix.
|
||||
((Player)e.getEntity()).updateInventory();
|
||||
// ((Player)e.getEntity()).getInventory().addItem(new ItemStack(Material.ARROW, 1)); // Arrow fix.
|
||||
// ((Player)e.getEntity()).updateInventory();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1007,6 +1023,9 @@ public class Gladiators extends SoloGame
|
||||
{
|
||||
if (_playerArenas.containsKey(e.getPlayer()))
|
||||
{
|
||||
if (_playerArenas.get(e.getPlayer()).getState() != ArenaState.FIGHTING)
|
||||
return;
|
||||
|
||||
for (Player p : _playerArenas.get(e.getPlayer()).getPastPlayers())
|
||||
{
|
||||
if (p.equals(e.getPlayer()))
|
||||
@ -1019,4 +1038,39 @@ public class Gladiators extends SoloGame
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void deathHealth(CombatDeathEvent e)
|
||||
{
|
||||
if (!(e.GetEvent().getEntity() instanceof Player))
|
||||
return;
|
||||
|
||||
if (e.GetLog().GetKiller().IsPlayer())
|
||||
{
|
||||
Player killer = UtilPlayer.searchExact(e.GetLog().GetKiller().GetName());
|
||||
((Player)e.GetEvent().getEntity()).sendMessage(F.main("Game", "Your killer had " + C.cRed + new DecimalFormat("#").format(killer.getHealth()) + "❤" + C.cGray + " left."));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void scoreboardEnd(GameStateChangeEvent e)
|
||||
{
|
||||
if (e.GetState() != GameState.End)
|
||||
return;
|
||||
|
||||
Scoreboard.Reset();
|
||||
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cGreen + C.Bold + "Status");
|
||||
Scoreboard.Write(C.cWhite + "Ended");
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cAqua + C.Bold + "Matches Left");
|
||||
Scoreboard.Write(C.cWhite + "0");
|
||||
Scoreboard.WriteBlank();
|
||||
Scoreboard.Write(C.cYellow + C.Bold + "Players");
|
||||
if (getWinners() != null && !getWinners().isEmpty())
|
||||
Scoreboard.Write(C.cWhite + getWinners().get(0).getName());
|
||||
|
||||
Scoreboard.Draw();
|
||||
}
|
||||
}
|
||||
|
@ -358,27 +358,6 @@ public class MonsterMaze extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
private boolean _announced = false;
|
||||
@EventHandler
|
||||
public void sendF5Message(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() != UpdateType.FASTEST)
|
||||
return;
|
||||
|
||||
if (GetState() != GameState.Prepare)
|
||||
return;
|
||||
|
||||
if (_announced)
|
||||
return;
|
||||
|
||||
if (!UtilTime.elapsed(GetStateTime(), 4000))
|
||||
return;
|
||||
|
||||
_announced = true;
|
||||
UtilTextMiddle.display(C.cYellow + C.Bold + "Press F5", C.cAqua + C.Bold + "Monster Maze is best in 3rd person!");
|
||||
Announce(C.cYellow + C.Scramble + "@@" + C.cAqua + C.Bold + " Monster Maze is best played in 3rd Person! (Push F5) " + C.cYellow + C.Scramble + "@@");
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventHandler
|
||||
public void ScoreboardUpdate(UpdateEvent event)
|
||||
|
@ -61,7 +61,7 @@ public class KitCreeper extends SmashKit
|
||||
}));
|
||||
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SPADE, (byte)0, 1,
|
||||
C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Explosive Leap",
|
||||
C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Explode",
|
||||
new String[]
|
||||
{
|
||||
ChatColor.RESET + "You freeze in location and charge up",
|
||||
|
@ -13,10 +13,10 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -37,10 +37,13 @@ public class PerkEndermanTeleport extends SmashPerk
|
||||
|
||||
@EventHandler
|
||||
public void update(UpdateEvent event)
|
||||
{
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
if(!Manager.GetGame().IsLive())
|
||||
return;
|
||||
|
||||
for (Player player : UtilServer.getPlayers())
|
||||
{
|
||||
if (!Kit.HasKit(player))
|
||||
@ -88,7 +91,7 @@ public class PerkEndermanTeleport extends SmashPerk
|
||||
}
|
||||
|
||||
player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 0.5f);
|
||||
player.teleport(block.getLocation().add(0.5, 1, 0.5));
|
||||
player.teleport(block.getLocation().add(0.5, 1, 0.5).setDirection(player.getLocation().getDirection()));
|
||||
player.playSound(player.getLocation(), Sound.ENDERMAN_TELEPORT, 1f, 0.5f);
|
||||
|
||||
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, player.getLocation().add(0, 1, 0), 1f, 1f, 1f, 0.1f, 100, ViewDist.LONG, UtilServer.getPlayers());
|
||||
|
@ -941,7 +941,7 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
for (Player alive : GetPlayers(true))
|
||||
{
|
||||
if (alive != player)
|
||||
if (alive != player && getArcadeManager().canHurt(player, alive))
|
||||
{
|
||||
double distance = alive.getLocation().distance(
|
||||
player.getLocation());
|
||||
@ -1838,6 +1838,9 @@ public abstract class SurvivalGames extends Game
|
||||
|
||||
if (!UtilInv.IsItem(player.getItemInHand(), Material.TNT, (byte) 0))
|
||||
return;
|
||||
|
||||
if(!IsAlive(player))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
|
||||
|
@ -11,7 +11,7 @@ public class GiveAdminPage extends PlayerPage
|
||||
{
|
||||
public GiveAdminPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Give Admin", player);
|
||||
super(plugin, shop, "Give Co-Host", player);
|
||||
buildPage();
|
||||
}
|
||||
|
||||
@ -26,12 +26,12 @@ public class GiveAdminPage extends PlayerPage
|
||||
{
|
||||
removeButton(slot);
|
||||
_manager.giveAdmin(player);
|
||||
UtilPlayer.message(getPlayer(), F.main("Server", "You gave " + F.name(player.getName()) + " admin power."));
|
||||
UtilPlayer.message(getPlayer(), F.main("Server", "You gave " + F.name(player.getName()) + " Co-Host power."));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayString(Player player)
|
||||
{
|
||||
return "Click to Make Admin";
|
||||
return "Click to Make Co-Host";
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ public class RemoveAdminPage extends BasePage
|
||||
{
|
||||
public RemoveAdminPage(ArcadeManager plugin, PrivateServerShop shop, Player player)
|
||||
{
|
||||
super(plugin, shop, "Remove Admin", player);
|
||||
super(plugin, shop, "Remove Co-Host", player);
|
||||
|
||||
buildPage();
|
||||
}
|
||||
@ -36,7 +36,7 @@ public class RemoveAdminPage extends BasePage
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
String name = iterator.next();
|
||||
ItemStack head = getPlayerHead(name, C.cGreen + C.Bold + name, new String[] {ChatColor.RESET + C.cGray + "Click to Remove Admin"});
|
||||
ItemStack head = getPlayerHead(name, C.cGreen + C.Bold + name, new String[] {ChatColor.RESET + C.cGray + "Click to Remove Co-Host"});
|
||||
addButton(slot, head, getRemoveAdminButton(slot, name));
|
||||
|
||||
slot++;
|
||||
@ -52,7 +52,7 @@ public class RemoveAdminPage extends BasePage
|
||||
{
|
||||
_manager.removeAdmin(playerName);
|
||||
removeButton(slot);
|
||||
UtilPlayer.message(getPlayer(), F.main("Server", "You removed admin power from " + F.name(playerName) + "."));
|
||||
UtilPlayer.message(getPlayer(), F.main("Server", "You removed Co-Host power from " + F.name(playerName) + "."));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package nautilus.game.arcade.kit.perks;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
@ -109,7 +110,9 @@ public class PerkBaconBlast extends Perk implements IThrown
|
||||
|
||||
public void Explode(ProjectileUser data)
|
||||
{
|
||||
data.GetThrown().getWorld().createExplosion(data.GetThrown().getLocation(), 0.5f);
|
||||
// for whatever reason, you can't put a location in createExplosion if you don't want it to break blocks >.>
|
||||
Location loc = data.GetThrown().getLocation();
|
||||
data.GetThrown().getWorld().createExplosion(loc.getX(), loc.getY(), loc.getZ(), 0.5f, false, false);
|
||||
data.GetThrown().remove();
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,10 @@ public class PerkBladeVortex extends Perk
|
||||
|
||||
if (!UtilGear.isWeapon(event.getPlayer().getItemInHand()))
|
||||
return;
|
||||
|
||||
//Dont allow usage in early game
|
||||
if (!UtilTime.elapsed(Manager.GetGame().GetStateTime(), 30000))
|
||||
return;
|
||||
|
||||
final Player player = event.getPlayer();
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class PerkDoubleJump extends Perk
|
||||
if (!Recharge.Instance.usable(player, "Double Jump"))
|
||||
continue;
|
||||
|
||||
if (UtilEnt.isGrounded(player) || UtilBlock.solid(player.getLocation().getBlock().getRelative(BlockFace.DOWN)))
|
||||
if (player.isOnGround() || (UtilBlock.solid(player.getLocation().getBlock().getRelative(BlockFace.DOWN)) && UtilBlock.solid(player.getLocation().getBlock())))
|
||||
player.setAllowFlight(true);
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,8 @@ public class PerkFlameDash extends Perk
|
||||
|
||||
_data.add(new FireflyData(player));
|
||||
|
||||
Manager.GetCondition().Factory().Invisible(GetName(), player, player, 2.5, 0, false, false, true);
|
||||
Manager.GetCondition().Factory().Cloak(GetName(), player, player, 2.5, false, false);
|
||||
//Manager.GetCondition().Factory().Invisible(GetName(), player, player, 2.5, 0, false, false, true);
|
||||
|
||||
UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + "."));
|
||||
}
|
||||
|
@ -109,6 +109,8 @@ public class PerkWitchPotion extends SmashPerk
|
||||
Manager.GetDamage().NewDamageEvent(player, thrower, null,
|
||||
DamageCause.CUSTOM, 5, true, true, false,
|
||||
UtilEnt.getName((LivingEntity)event.getEntity().getShooter()), GetName());
|
||||
|
||||
Manager.GetCondition().Factory().Slow("Witch Potion", player, null, 3, 1, true, false, false, false);
|
||||
}
|
||||
//Super Effect
|
||||
else
|
||||
@ -121,6 +123,7 @@ public class PerkWitchPotion extends SmashPerk
|
||||
DamageCause.CUSTOM, 5 + bonus, true, true, false,
|
||||
UtilEnt.getName((LivingEntity)event.getEntity().getShooter()), GetName());
|
||||
|
||||
Manager.GetCondition().Factory().Slow("Witch Potion", player, null, 7, 2, true, false, false, false);
|
||||
//Manager.GetCondition().Factory().Confuse(reason, ent, source, duration, mult, extend, showIndicator, ambient)
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ public class GameHostManager implements Listener
|
||||
|
||||
if (!isAdmin(event.getPlayer(), true))
|
||||
{
|
||||
event.getPlayer().sendMessage(F.main("Broadcast", "Only MPS admins can use this command."));
|
||||
event.getPlayer().sendMessage(F.main("Broadcast", "Only Co-Hosts can use this command."));
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
@ -304,14 +304,16 @@ public class HolidayManager implements Listener
|
||||
if (Manager.GetGame() != null && !Manager.GetGame().IsAlive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (!_active.contains(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
specialBlockBreak(event.getPlayer(), event.getClickedBlock());
|
||||
}
|
||||
|
||||
private void specialBlockBreak(Player player, final Block block)
|
||||
{
|
||||
if (!_active.contains(block))
|
||||
return;
|
||||
|
||||
_active.remove(block);
|
||||
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, type.getBlockType());
|
||||
block.setType(Material.AIR);
|
||||
|
||||
|
@ -46,6 +46,11 @@ public class DeathBomberStatTracker extends StatTracker<Game>
|
||||
|
||||
if (!event.GetLog().GetPlayer().IsPlayer())
|
||||
return;
|
||||
|
||||
Player killed = UtilPlayer.searchExact(event.GetLog().GetPlayer().GetName());
|
||||
|
||||
if(killer.equals(killed))
|
||||
return;
|
||||
|
||||
if (event.GetLog().GetKiller() != null && event.GetLog().GetKiller().GetReason().contains("Throwing TNT"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user