A little bit o dem ol bug fixles. yknow what im sayin?

This commit is contained in:
Chiss 2014-03-13 16:32:48 +11:00
parent c4b7cd19c8
commit 82644002c5
19 changed files with 144 additions and 28 deletions

View File

@ -29,7 +29,7 @@ public class MobCommand extends MultiCommandBase<Creature>
{
public MobCommand(Creature plugin)
{
super(plugin, Rank.MODERATOR, "mob");
super(plugin, Rank.ADMIN, "mob");
AddCommand(new KillCommand(Plugin));
}

View File

@ -12,7 +12,7 @@ public class MessageCommand extends CommandBase<MessageManager>
{
public MessageCommand(MessageManager plugin)
{
super(plugin, Rank.ALL, "m","msg","message","tell","t","w","whisper");
super(plugin, Rank.ALL, "m","msg","message","tell","t","w","whisper","MSG");
}
@Override

View File

@ -485,6 +485,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation
((CraftEntity)player).getHandle().getDataWatcher().watch(0, Byte.valueOf((byte) 0));
player.setSprinting(false);
player.setFoodLevel(20);
player.setSaturation(3f);
player.setExhaustion(0f);

View File

@ -755,6 +755,9 @@ public class HideSeek extends TeamGame
if (!UtilGear.isMat(player.getItemInHand(), Material.FIREWORK))
return;
if (UtilBlock.usable(event.getClickedBlock()))
return;
if (!Recharge.Instance.use(player, "Firework", 15000, true))
{

View File

@ -1284,8 +1284,14 @@ public class HungerGames extends SoloGame
{
if (!event.getMessage().equalsIgnoreCase("/dm"))
return;
event.setCancelled(true);
if (!IsAlive(event.getPlayer()))
{
UtilPlayer.message(event.getPlayer(), F.main("Game", "You are not in the game."));
return;
}
if (!IsLive())
{

View File

@ -25,6 +25,7 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityRegainHealthEvent;
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
@ -74,6 +75,8 @@ public class Paintball extends TeamGame
"Revive/heal with Water Bombs",
"Last team alive wins!"
});
this.HungerSet = 20;
}
@EventHandler
@ -430,4 +433,11 @@ public class Paintball extends TeamGame
stack.setItemMeta(meta);
}
}
@EventHandler
public void InventoryClick(InventoryClickEvent event)
{
event.setCancelled(true);
event.getWhoClicked().closeInventory();
}
}

View File

@ -27,6 +27,8 @@ public class PlayerCopy
_ent = owner.getWorld().spawn(owner.getLocation(), Skeleton.class);
Host.CreatureAllowOverride = false;
UtilEnt.ghost(_ent, true, false);
UtilEnt.Vegetate(_ent);
//Armor

View File

@ -6,6 +6,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilServer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.Game.GameState;
@ -41,6 +43,18 @@ public class KitBrawler extends Kit
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
if (Manager.GetGame().GetState() == GameState.Live)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)1, 1, F.item("Super Arrow")));
final Player fPlayer = player;
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
{
public void run()
{
UtilInv.Update(fPlayer);
}
}, 10);
}
}
}

View File

@ -6,6 +6,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilServer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.Game.GameState;
@ -41,6 +43,18 @@ public class KitElementalist extends Kit
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
if (Manager.GetGame().GetState() == GameState.Live)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)1, 1, F.item("Super Arrow")));
final Player fPlayer = player;
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
{
public void run()
{
UtilInv.Update(fPlayer);
}
}, 10);
}
}
}

View File

@ -6,6 +6,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilServer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.game.Game.GameState;
@ -41,6 +43,18 @@ public class KitLeaper extends Kit
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
if (Manager.GetGame().GetState() == GameState.Live)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(262, (byte)1, 1, F.item("Super Arrow")));
final Player fPlayer = player;
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
{
public void run()
{
UtilInv.Update(fPlayer);
}
}, 10);
}
}
}

View File

@ -101,7 +101,7 @@ public class SheepGame extends TeamGame
"Return Sheep to your Team Pen!",
"Most sheep at 5 minutes wins!"
});
this.DeathOut = false;
this.DeathSpectateSecs = 8;

View File

@ -5,6 +5,8 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilServer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
@ -44,5 +46,17 @@ public class KitInfiltrator extends Kit
amount = 48;
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOL, Manager.GetGame().GetTeam(player).GetColorData(), amount));
//Update
final Player fPlayer = player;
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
{
public void run()
{
UtilInv.Update(fPlayer);
}
}, 10);
}
}

View File

@ -5,6 +5,8 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilServer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
@ -19,17 +21,17 @@ public class KitMarksman extends Kit
{
super(manager, "Marksman", KitAvailability.Free,
new String[]
{
"Unrivaled in archery. One hit kills anyone."
},
new Perk[]
{
{
"Unrivaled in archery. One hit kills anyone."
},
new Perk[]
{
new PerkConstructor("Constructor", 4, 8, Material.WOOL, "Wool", false),
new PerkFletcher(2, 2, false),
},
EntityType.ZOMBIE,
new ItemStack(Material.BOW));
},
EntityType.ZOMBIE,
new ItemStack(Material.BOW));
}
@ -37,11 +39,22 @@ public class KitMarksman extends Kit
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
int amount = 4;
if (!Manager.GetGame().IsLive())
amount = 48;
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOL, Manager.GetGame().GetTeam(player).GetColorData(), amount));
//Update
final Player fPlayer = player;
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
{
public void run()
{
UtilInv.Update(fPlayer);
}
}, 10);
}
}

View File

@ -5,6 +5,8 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilServer;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
@ -20,29 +22,40 @@ public class KitShredder extends Kit
{
super(manager, "Shredder", KitAvailability.Blue,
new String[]
{
"Arrows are weaker, but shred through forts."
},
new Perk[]
{
{
"Arrows are weaker, but shred through forts."
},
new Perk[]
{
new PerkConstructor("Constructor", 4, 6, Material.WOOL, "Wool", false),
new PerkFletcher(4, 2, false),
new PerkBarrage(5, 250, false, false),
},
EntityType.ZOMBIE,
new ItemStack(Material.BOW));
},
EntityType.ZOMBIE,
new ItemStack(Material.BOW));
}
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW));
int amount = 4;
if (!Manager.GetGame().IsLive())
amount = 48;
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.WOOL, Manager.GetGame().GetTeam(player).GetColorData(), amount));
//Update
final Player fPlayer = player;
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable()
{
public void run()
{
UtilInv.Update(fPlayer);
}
}, 10);
}
}

View File

@ -57,7 +57,7 @@ public class PerkAxeThrower extends Perk implements IThrown
org.bukkit.entity.Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(player.getItemInHand().getType()));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 1d);
Manager.GetProjectile().AddThrow(ent, player, this, -1, true, true, true, false, 2d);
//Remove Axe
player.setItemInHand(null);

View File

@ -56,7 +56,7 @@ public class PerkBarrage extends Perk
@EventHandler
public void BarrageDrawBow(PlayerInteractEvent event)
{
{
Player player = event.getPlayer();
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)

View File

@ -110,6 +110,9 @@ public class PerkDisruptor extends Perk
event.setCancelled(true);
if (!Manager.GetGame().IsAlive(event.getPlayer()))
return;
if (event.getItem().getTicksLived() < 40)
return;

View File

@ -60,6 +60,11 @@ public class PerkPigZombie extends Perk
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS));
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_BOOTS));
player.getInventory().remove(Material.DIAMOND_HELMET);
player.getInventory().remove(Material.DIAMOND_CHESTPLATE);
player.getInventory().remove(Material.DIAMOND_LEGGINGS);
player.getInventory().remove(Material.DIAMOND_BOOTS);
//Disguise
DisguisePig disguise = new DisguisePig(player);
disguise.SetName(C.cYellow + player.getName());

View File

@ -37,6 +37,9 @@ public class PerkTNTArrow extends Perk
@EventHandler
public void Fire(PlayerInteractEvent event)
{
if (!Manager.GetGame().IsLive())
return;
if (event.getAction() != Action.LEFT_CLICK_AIR && event.getAction() != Action.LEFT_CLICK_BLOCK)
return;