Fix Absorption in OP MB, add more arrows to OP MB, fix not being able to purchase primary weapon in MS, fix skin bug in MS and fix helmet drop when scoping in Strike Games
This commit is contained in:
parent
ac8a920484
commit
9cf5a6fb9e
@ -1,5 +1,7 @@
|
||||
package nautilus.game.arcade;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import mineplex.core.common.MinecraftVersion;
|
||||
import mineplex.core.common.Pair;
|
||||
import mineplex.core.game.GameCategory;
|
||||
@ -50,7 +52,6 @@ import nautilus.game.arcade.game.games.micro.modes.TinySmash;
|
||||
import nautilus.game.arcade.game.games.micro.modes.TinyWinners;
|
||||
import nautilus.game.arcade.game.games.milkcow.MilkCow;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.MinecraftLeague;
|
||||
import nautilus.game.arcade.game.games.minestrike.GunModule;
|
||||
import nautilus.game.arcade.game.games.minestrike.Minestrike;
|
||||
import nautilus.game.arcade.game.games.mineware.MineWare;
|
||||
import nautilus.game.arcade.game.games.monsterleague.MonsterLeague;
|
||||
@ -104,7 +105,6 @@ import nautilus.game.arcade.game.games.valentines.Valentines;
|
||||
import nautilus.game.arcade.game.games.wither.WitherGame;
|
||||
import nautilus.game.arcade.game.games.wizards.Wizards;
|
||||
import nautilus.game.arcade.game.games.zombiesurvival.ZombieSurvival;
|
||||
import org.bukkit.Material;
|
||||
|
||||
public enum GameType
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ public class KitOverlord extends ProgressingKit
|
||||
};
|
||||
|
||||
private static final Perk[] PERKS = {
|
||||
new PerkFletcher(4, 10, true)
|
||||
new PerkFletcher(3, 16, true)
|
||||
};
|
||||
|
||||
private static final ItemStack IN_HAND = new ItemStack(Material.GOLDEN_APPLE);
|
||||
|
@ -53,7 +53,7 @@ public class HighExplosive extends Grenade
|
||||
|
||||
// Damage Event
|
||||
Player damager = null;
|
||||
if (game.IsAlive(_thrower))
|
||||
if (game.getHost().IsAlive(_thrower))
|
||||
{
|
||||
damager = _thrower;
|
||||
}
|
||||
|
@ -1,16 +1,12 @@
|
||||
package nautilus.game.arcade.game.games.survivalgames.modes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Chest;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -20,21 +16,19 @@ import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerItemDamageEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilItem;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.loot.RandomItem;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -71,6 +65,8 @@ public class StrikeGames extends SoloSurvivalGames
|
||||
|
||||
private long _peacePhase;
|
||||
|
||||
private HashMap<Player, ItemStack> _helmets;
|
||||
|
||||
public StrikeGames(ArcadeManager manager)
|
||||
{
|
||||
super(manager, new Kit[]
|
||||
@ -78,7 +74,9 @@ public class StrikeGames extends SoloSurvivalGames
|
||||
new KitPlayer(manager)
|
||||
}, GameType.Brawl);
|
||||
|
||||
DamagePvP = false;
|
||||
Damage = false;
|
||||
|
||||
_helmets = new HashMap<>();
|
||||
|
||||
_peacePhase = 20000;
|
||||
|
||||
@ -100,11 +98,11 @@ public class StrikeGames extends SoloSurvivalGames
|
||||
if (!UtilTime.elapsed(GetStateTime(), _peacePhase))
|
||||
return;
|
||||
|
||||
if (DamagePvP)
|
||||
if (Damage)
|
||||
return;
|
||||
|
||||
Announce(F.main("Game", "The Peace Phase has ended! You can now fight each other!"));
|
||||
DamagePvP = true;
|
||||
Damage = true;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -116,6 +114,22 @@ public class StrikeGames extends SoloSurvivalGames
|
||||
Announce(F.main("Game", "A Peace Phase of " + F.time((_peacePhase/1000) + "") + " seconds has started!"));
|
||||
}
|
||||
|
||||
@EventHandler(priority=EventPriority.HIGHEST)
|
||||
public void addHelmet(PlayerToggleSneakEvent event)
|
||||
{
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (!IsAlive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (_gunModule.getScoped().containsKey(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (event.getPlayer().getInventory().getHelmet() != null)
|
||||
_helmets.put(event.getPlayer(), event.getPlayer().getInventory().getHelmet());
|
||||
}
|
||||
|
||||
@EventHandler(priority=EventPriority.HIGHEST)
|
||||
public void pumpkinDrop(PlayerDeathEvent event)
|
||||
{
|
||||
@ -129,10 +143,8 @@ public class StrikeGames extends SoloSurvivalGames
|
||||
itemIterator.remove();
|
||||
}
|
||||
}
|
||||
if (_gunModule.getScoped().containsKey(event.getEntity()))
|
||||
{
|
||||
event.getDrops().add(_gunModule.getScoped().get(event.getEntity()));
|
||||
}
|
||||
if (_helmets.containsKey(event.getEntity()))
|
||||
event.getDrops().add(_helmets.get(event.getEntity()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -502,19 +514,6 @@ public class StrikeGames extends SoloSurvivalGames
|
||||
event.getPlayer().setItemInHand(null);
|
||||
return;
|
||||
}
|
||||
}@EventHandler
|
||||
public void giveStartEquipment(PlayerKitGiveEvent event)
|
||||
{
|
||||
GameTeam team = GetTeam(event.getPlayer());
|
||||
if (team == null)
|
||||
return;
|
||||
|
||||
Material mat = Material.IRON_SWORD;
|
||||
byte data = 0;
|
||||
String name = "Knife";
|
||||
|
||||
ItemStack knife = ItemStackFactory.Instance.CreateStack(mat, data, 1, name);
|
||||
event.getPlayer().getInventory().setItem(0, knife);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user