Merge branch 'master' of ssh://dev.mineplex.com:7999/min/Mineplex

This commit is contained in:
Jonathan Williams 2014-03-06 02:15:46 -08:00
commit 2cc50d5725
5 changed files with 27 additions and 11 deletions

View File

@ -189,7 +189,6 @@ public class SheepData
{
ent = ent.getVehicle();
}
return ent.getLocation().getBlock();
}

View File

@ -33,6 +33,7 @@ import org.bukkit.event.player.PlayerDropItemEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerToggleSneakEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
@ -43,6 +44,7 @@ import mineplex.core.common.util.UtilDisplay;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilGear;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilPlayer;
@ -95,9 +97,8 @@ public class SheepGame extends TeamGame
new String[]
{
"Right-Click with Saddle to Grab",
"Push Drop to Drop Sheep",
"Bring Sheep to your Team Pen!",
C.cYellow + "Right-Click" + C.cGray + " with Saddle to " + C.cGreen + "Grab Sheep",
"Return Sheep to your Team Pen!",
"Most sheep at 5 minutes wins!"
});
@ -242,7 +243,11 @@ public class SheepGame extends TeamGame
data.SetHolder(event.getPlayer());
}
}
//Put Wool in Inventory
player.getInventory().setItem(4 + count, ItemStackFactory.Instance.CreateStack(35, ((Sheep)event.getRightClicked()).getColor().getWoolData()));
UtilInv.Update(player);
//Effect
event.getRightClicked().getWorld().playEffect(event.getRightClicked().getLocation(), Effect.STEP_SOUND, 35);
@ -315,10 +320,10 @@ public class SheepGame extends TeamGame
boolean hadSheep = false;
Entity top = player;
while (top.getVehicle() != null)
while (top.getPassenger() != null)
{
top = top.getVehicle();
top.eject();
top = top.getPassenger();
top.leaveVehicle();
hadSheep = true;
}
@ -381,6 +386,14 @@ public class SheepGame extends TeamGame
}
player.setExp(0.33f * (float)count);
//Inventory Wool Clean
if (count <= 0 && UtilGear.isMat(player.getInventory().getItem(4), Material.WOOL))
player.getInventory().setItem(4, null);
if (count <= 1 && UtilGear.isMat(player.getInventory().getItem(5), Material.WOOL))
player.getInventory().setItem(5, null);
if (count <= 2 && UtilGear.isMat(player.getInventory().getItem(6), Material.WOOL))
player.getInventory().setItem(6, null);
if (count == 0)
continue;

View File

@ -70,6 +70,8 @@ public class KitArcher extends Kit
metaBoots.setColor(Manager.GetGame().GetTeam(player).GetColorBase());
boots.setItemMeta(metaBoots);
player.getInventory().setBoots(boots);
player.getInventory().setItem(8, armor.clone());
}
@Override

View File

@ -62,6 +62,8 @@ public class KitBeserker extends Kit
metaBoots.setColor(Manager.GetGame().GetTeam(player).GetColorBase());
boots.setItemMeta(metaBoots);
player.getInventory().setBoots(boots);
player.getInventory().setItem(8, armor.clone());
}
@Override

View File

@ -23,9 +23,7 @@ public class KitBrute extends Kit
new String[]
{
"Can throw sheep at enemies!",
"",
C.cYellow + "Right-Click" + C.cGray + " with Sword to " + C.cGreen + "Throw Sheep"
"Strong enough to throw things around!",
},
new Perk[]
@ -65,6 +63,8 @@ public class KitBrute extends Kit
metaBoots.setColor(Manager.GetGame().GetTeam(player).GetColorBase());
boots.setItemMeta(metaBoots);
player.getInventory().setBoots(boots);
player.getInventory().setItem(8, armor.clone());
}
@Override