Merge pull request #95 from Mineplex-LLC/develop
Merge develop into project-cosmetics
This commit is contained in:
commit
0160efb5ab
@ -4,8 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
@ -50,7 +48,6 @@ public class Quiver extends SoloGame
|
||||
private HashMap<Player, Integer> _combo = new HashMap<Player, Integer>();
|
||||
private HashMap<Player, Integer> _bestCombo = new HashMap<Player, Integer>();
|
||||
private HashMap<Player, Long> _deathTime = new HashMap<Player, Long>();
|
||||
private HashMap<UUID, Integer> _bowTime = new HashMap<>();
|
||||
|
||||
private Objective _scoreObj;
|
||||
|
||||
@ -119,26 +116,6 @@ public class Quiver extends SoloGame
|
||||
{
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)0, 1, F.item("Super Arrow")));
|
||||
player.playSound(player.getLocation(), Sound.PISTON_EXTEND, 3f, 2f);
|
||||
_bowTime.put(player.getUniqueId(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void onUpdate(UpdateEvent event)
|
||||
{
|
||||
if(event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
for(Player player : GetPlayers(true))
|
||||
{
|
||||
if(UtilPlayer.isChargingBow(player))
|
||||
{
|
||||
_bowTime.put(player.getUniqueId(), _bowTime.get(player.getUniqueId()) + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
_bowTime.put(player.getUniqueId(), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,14 +133,6 @@ public class Quiver extends SoloGame
|
||||
if (!(arrow.getShooter() instanceof Player))
|
||||
return;
|
||||
|
||||
Player shooter = (Player) arrow.getShooter();
|
||||
//If the player has a full charge but they haven't been holding the bow for more than 20 ticks
|
||||
if(_bowTime.get(shooter.getUniqueId()) < 20 && event.getForce() == 1)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_deathTime.containsKey(arrow.getShooter()))
|
||||
return;
|
||||
|
||||
|
@ -32,14 +32,14 @@ public class KitLeaper extends Kit
|
||||
new PerkDoubleJump("Double Jump", 0.9, 0.9, true)
|
||||
},
|
||||
EntityType.ZOMBIE,
|
||||
new ItemStack(Material.IRON_AXE));
|
||||
new ItemStack(Material.STONE_SWORD));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
{
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.STONE_SWORD));
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
|
||||
|
||||
if (Manager.GetGame().GetState() == GameState.Live)
|
||||
|
Loading…
Reference in New Issue
Block a user