Updated source code for CB 1.1-R6.
This commit is contained in:
Binary file not shown.
@@ -12,7 +12,6 @@ public class ShootArrow implements Ability
|
|||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void execute(Arena arena, MABoss boss) {
|
public void execute(Arena arena, MABoss boss) {
|
||||||
//boss.getEntity().launchProjectile(Arrow.class);
|
boss.getEntity().launchProjectile(Arrow.class);
|
||||||
boss.getEntity().shootArrow();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ public class ShootFireball implements Ability
|
|||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void execute(Arena arena, MABoss boss) {
|
public void execute(Arena arena, MABoss boss) {
|
||||||
//boss.getEntity().launchProjectile(Fireball.class);
|
boss.getEntity().launchProjectile(Fireball.class);
|
||||||
boss.getEntity().throwEgg();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
<property name="ability-dest" location="${res}/res/abilities" />
|
<property name="ability-dest" location="${res}/res/abilities" />
|
||||||
|
|
||||||
<!-- Dependency variables -->
|
<!-- Dependency variables -->
|
||||||
<property name="cbver" value="1.1-R4" />
|
<property name="cbver" value="1.1-R6" />
|
||||||
<property name="cbjar" value="craftbukkit-${cbver}.jar" />
|
<property name="cbjar" value="craftbukkit-${cbver}.jar" />
|
||||||
<property name="cburl" value="http://repo.bukkit.org/content/repositories/releases/org/bukkit/craftbukkit/${cbver}/${cbjar}" />
|
<property name="cburl" value="http://repo.bukkit.org/content/repositories/releases/org/bukkit/craftbukkit/${cbver}/${cbjar}" />
|
||||||
|
|
||||||
<property name="vltver" value="1.2.10" />
|
<property name="vltver" value="1.2.12" />
|
||||||
<property name="vltjar" value="Vault-${vltver}-SNAPSHOT.jar" />
|
<property name="vltjar" value="Vault-${vltver}-SNAPSHOT.jar" />
|
||||||
<property name="vlturl" value="http://ci.milkbowl.net/job/Vault/Recommended%20Build/artifact/target/${vltjar}" />
|
<property name="vlturl" value="http://ci.milkbowl.net/job/Vault/Recommended%20Build/artifact/target/${vltjar}" />
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<property name="spturl" value="http://ci.spout.org/job/SpoutPluginAPI/Recommended/artifact/target/${sptjar}" />
|
<property name="spturl" value="http://ci.spout.org/job/SpoutPluginAPI/Recommended/artifact/target/${sptjar}" />
|
||||||
|
|
||||||
<property name="msjar" value="MagicSpells.jar" />
|
<property name="msjar" value="MagicSpells.jar" />
|
||||||
<property name="msurl" value="http://dev.bukkit.org/media/files/575/866/${msjar}" />
|
<property name="msurl" value="http://dev.bukkit.org/media/files/577/281/${msjar}" />
|
||||||
|
|
||||||
|
|
||||||
<path id="classpath">
|
<path id="classpath">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: MobArena
|
name: MobArena
|
||||||
author: garbagemule
|
author: garbagemule
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.94.4.51
|
version: 0.94.4.52
|
||||||
softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
softdepend: [Spout,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells,Vault]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
|||||||
@@ -12,16 +12,15 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.ContainerBlock;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
//import org.bukkit.entity.EntityType; TODO USE THIS
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.CreatureType;
|
|
||||||
import org.bukkit.entity.ExperienceOrb;
|
import org.bukkit.entity.ExperienceOrb;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.Slime;
|
import org.bukkit.entity.Slime;
|
||||||
import org.bukkit.entity.Vehicle;
|
import org.bukkit.entity.Vehicle;
|
||||||
import org.bukkit.entity.Wolf;
|
import org.bukkit.entity.Wolf;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
import org.bukkit.permissions.PermissionAttachment;
|
import org.bukkit.permissions.PermissionAttachment;
|
||||||
@@ -670,8 +669,8 @@ public class ArenaImpl implements Arena
|
|||||||
p.getInventory().removeItem(new ItemStack(Material.BONE, petAmount));
|
p.getInventory().removeItem(new ItemStack(Material.BONE, petAmount));
|
||||||
|
|
||||||
for (int i = 0; i < petAmount; i++) {
|
for (int i = 0; i < petAmount; i++) {
|
||||||
//Wolf wolf = (Wolf) world.spawnCreature(p.getLocation(), EntityType.WOLF); TODO USE THIS
|
Wolf wolf = (Wolf) world.spawnCreature(p.getLocation(), EntityType.WOLF);
|
||||||
Wolf wolf = (Wolf) world.spawnCreature(p.getLocation(), CreatureType.WOLF);
|
//Wolf wolf = (Wolf) world.spawnCreature(p.getLocation(), CreatureType.WOLF);
|
||||||
wolf.setTamed(true);
|
wolf.setTamed(true);
|
||||||
wolf.setOwner(p);
|
wolf.setOwner(p);
|
||||||
wolf.setHealth(wolf.getMaxHealth());
|
wolf.setHealth(wolf.getMaxHealth());
|
||||||
@@ -775,7 +774,7 @@ public class ArenaImpl implements Arena
|
|||||||
public void run() {
|
public void run() {
|
||||||
for (Location loc : region.getContainers()) {
|
for (Location loc : region.getContainers()) {
|
||||||
BlockState state = world.getBlockAt(loc).getState();
|
BlockState state = world.getBlockAt(loc).getState();
|
||||||
if (state instanceof ContainerBlock) {
|
if (state instanceof InventoryHolder) {
|
||||||
containables.add(new RepairableContainer(state, false));
|
containables.add(new RepairableContainer(state, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.ContainerBlock;
|
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
@@ -53,6 +52,7 @@ import org.bukkit.event.player.PlayerPreLoginEvent;
|
|||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.Attachable;
|
import org.bukkit.material.Attachable;
|
||||||
import org.bukkit.material.Bed;
|
import org.bukkit.material.Bed;
|
||||||
@@ -148,7 +148,7 @@ public class ArenaListener
|
|||||||
BlockState state = b.getState();
|
BlockState state = b.getState();
|
||||||
|
|
||||||
Repairable r = null;
|
Repairable r = null;
|
||||||
if (state instanceof ContainerBlock)
|
if (state instanceof InventoryHolder)
|
||||||
r = new RepairableContainer(state);
|
r = new RepairableContainer(state);
|
||||||
else if (state instanceof Sign)
|
else if (state instanceof Sign)
|
||||||
r = new RepairableSign(state);
|
r = new RepairableSign(state);
|
||||||
@@ -289,7 +289,7 @@ public class ArenaListener
|
|||||||
|
|
||||||
// Create a Repairable from the block.
|
// Create a Repairable from the block.
|
||||||
Repairable r = null;
|
Repairable r = null;
|
||||||
if (state instanceof ContainerBlock)
|
if (state instanceof InventoryHolder)
|
||||||
r = new RepairableContainer(state);
|
r = new RepairableContainer(state);
|
||||||
else if (state instanceof Sign)
|
else if (state instanceof Sign)
|
||||||
r = new RepairableSign(state);
|
r = new RepairableSign(state);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.garbagemule.MobArena.commands.setup;
|
package com.garbagemule.MobArena.commands.setup;
|
||||||
|
|
||||||
import org.bukkit.block.ContainerBlock;
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
|
||||||
import com.garbagemule.MobArena.*;
|
import com.garbagemule.MobArena.*;
|
||||||
import com.garbagemule.MobArena.commands.*;
|
import com.garbagemule.MobArena.commands.*;
|
||||||
@@ -35,7 +35,7 @@ public class AddContainerCommand implements Command
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(p.getTargetBlock(null, 50).getState() instanceof ContainerBlock)) {
|
if (!(p.getTargetBlock(null, 50).getState() instanceof InventoryHolder)) {
|
||||||
Messenger.tellPlayer(sender, "You must look at container.");
|
Messenger.tellPlayer(sender, "You must look at container.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.garbagemule.MobArena.repairable;
|
package com.garbagemule.MobArena.repairable;
|
||||||
|
|
||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.ContainerBlock;
|
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
|
||||||
import com.garbagemule.MobArena.util.inventory.SerializableInventory;
|
import com.garbagemule.MobArena.util.inventory.SerializableInventory;
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ public class RepairableContainer extends RepairableBlock
|
|||||||
super(state);
|
super(state);
|
||||||
|
|
||||||
// Grab the inventory of the block
|
// Grab the inventory of the block
|
||||||
Inventory inv = ((ContainerBlock) state).getInventory();
|
Inventory inv = ((InventoryHolder) state).getInventory();
|
||||||
|
|
||||||
// Make a SerializableInventory
|
// Make a SerializableInventory
|
||||||
this.inv = new SerializableInventory(inv);
|
this.inv = new SerializableInventory(inv);
|
||||||
@@ -34,7 +34,7 @@ public class RepairableContainer extends RepairableBlock
|
|||||||
super.repair();
|
super.repair();
|
||||||
|
|
||||||
// Grab the inventory
|
// Grab the inventory
|
||||||
ContainerBlock cb = (ContainerBlock) getWorld().getBlockAt(getX(),getY(),getZ()).getState();
|
InventoryHolder cb = (InventoryHolder) getWorld().getBlockAt(getX(),getY(),getZ()).getState();
|
||||||
Inventory chestInv = cb.getInventory();
|
Inventory chestInv = cb.getInventory();
|
||||||
|
|
||||||
SerializableInventory.loadContents(chestInv, this.inv);
|
SerializableInventory.loadContents(chestInv, this.inv);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.garbagemule.MobArena.waves;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.Creature;
|
||||||
import org.bukkit.entity.CreatureType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Creeper;
|
import org.bukkit.entity.Creeper;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Slime;
|
import org.bukkit.entity.Slime;
|
||||||
@@ -15,61 +15,60 @@ import com.garbagemule.MobArena.framework.Arena;
|
|||||||
public enum MACreature
|
public enum MACreature
|
||||||
{
|
{
|
||||||
// Default creatures
|
// Default creatures
|
||||||
ZOMBIE(CreatureType.ZOMBIE), ZOMBIES(CreatureType.ZOMBIE),
|
ZOMBIE(EntityType.ZOMBIE), ZOMBIES(EntityType.ZOMBIE),
|
||||||
SKELETON(CreatureType.SKELETON), SKELETONS(CreatureType.SKELETON),
|
SKELETON(EntityType.SKELETON), SKELETONS(EntityType.SKELETON),
|
||||||
SPIDER(CreatureType.SPIDER), SPIDERS(CreatureType.SPIDER),
|
SPIDER(EntityType.SPIDER), SPIDERS(EntityType.SPIDER),
|
||||||
CREEPER(CreatureType.CREEPER), CREEPERS(CreatureType.CREEPER),
|
CREEPER(EntityType.CREEPER), CREEPERS(EntityType.CREEPER),
|
||||||
WOLF(CreatureType.WOLF), WOLVES(CreatureType.WOLF),
|
WOLF(EntityType.WOLF), WOLVES(EntityType.WOLF),
|
||||||
|
|
||||||
// Special creatures
|
// Special creatures
|
||||||
ZOMBIEPIGMAN(CreatureType.PIG_ZOMBIE), ZOMBIEPIGMEN(CreatureType.PIG_ZOMBIE),
|
ZOMBIEPIGMAN(EntityType.PIG_ZOMBIE), ZOMBIEPIGMEN(EntityType.PIG_ZOMBIE),
|
||||||
POWEREDCREEPER(CreatureType.CREEPER), POWEREDCREEPERS(CreatureType.CREEPER),
|
POWEREDCREEPER(EntityType.CREEPER), POWEREDCREEPERS(EntityType.CREEPER),
|
||||||
ANGRYWOLF(CreatureType.WOLF), ANGRYWOLVES(CreatureType.WOLF),
|
ANGRYWOLF(EntityType.WOLF), ANGRYWOLVES(EntityType.WOLF),
|
||||||
//HUMAN(CreatureType.VILLAGER), HUMANS(CreatureType.VILLAGER),
|
GIANT(EntityType.GIANT), GIANTS(EntityType.GIANT),
|
||||||
GIANT(CreatureType.GIANT), GIANTS(CreatureType.GIANT),
|
GHAST(EntityType.GHAST), GHASTS(EntityType.GHAST),
|
||||||
GHAST(CreatureType.GHAST), GHASTS(CreatureType.GHAST),
|
ENDERMAN(EntityType.ENDERMAN), ENDERMEN(EntityType.ENDERMAN),
|
||||||
ENDERMAN(CreatureType.ENDERMAN), ENDERMEN(CreatureType.ENDERMAN),
|
CAVESPIDER(EntityType.CAVE_SPIDER), CAVESPIDERS(EntityType.CAVE_SPIDER),
|
||||||
CAVESPIDER(CreatureType.CAVE_SPIDER), CAVESPIDERS(CreatureType.CAVE_SPIDER),
|
SILVERFISH(EntityType.SILVERFISH),
|
||||||
SILVERFISH(CreatureType.SILVERFISH),
|
|
||||||
|
|
||||||
// 1.0 creatures
|
// 1.0 creatures
|
||||||
BLAZE(CreatureType.BLAZE), BLAZES(CreatureType.BLAZE),
|
BLAZE(EntityType.BLAZE), BLAZES(EntityType.BLAZE),
|
||||||
ENDERDRAGON(CreatureType.ENDER_DRAGON), ENDERDRAGONS(CreatureType.ENDER_DRAGON),
|
ENDERDRAGON(EntityType.ENDER_DRAGON), ENDERDRAGONS(EntityType.ENDER_DRAGON),
|
||||||
SNOWMAN(CreatureType.SNOWMAN), SNOWMEN(CreatureType.SNOWMAN),
|
SNOWMAN(EntityType.SNOWMAN), SNOWMEN(EntityType.SNOWMAN),
|
||||||
MUSHROOMCOW(CreatureType.MUSHROOM_COW), MUSHROOMCOWS(CreatureType.MUSHROOM_COW),
|
MUSHROOMCOW(EntityType.MUSHROOM_COW), MUSHROOMCOWS(EntityType.MUSHROOM_COW),
|
||||||
VILLAGER(CreatureType.VILLAGER), VILLAGERS(CreatureType.VILLAGER),
|
VILLAGER(EntityType.VILLAGER), VILLAGERS(EntityType.VILLAGER),
|
||||||
|
|
||||||
// Passive creatures
|
// Passive creatures
|
||||||
CHICKEN(CreatureType.CHICKEN), CHICKENS(CreatureType.CHICKEN),
|
CHICKEN(EntityType.CHICKEN), CHICKENS(EntityType.CHICKEN),
|
||||||
COW(CreatureType.COW), COWS(CreatureType.COW),
|
COW(EntityType.COW), COWS(EntityType.COW),
|
||||||
PIG(CreatureType.PIG), PIGS(CreatureType.PIG),
|
PIG(EntityType.PIG), PIGS(EntityType.PIG),
|
||||||
SHEEP(CreatureType.SHEEP),
|
SHEEP(EntityType.SHEEP),
|
||||||
SQUID(CreatureType.SQUID), SQUIDS(CreatureType.SQUID),
|
SQUID(EntityType.SQUID), SQUIDS(EntityType.SQUID),
|
||||||
|
|
||||||
// Extended creatures
|
// Extended creatures
|
||||||
EXPLODINGSHEEP(CreatureType.SHEEP),
|
EXPLODINGSHEEP(EntityType.SHEEP),
|
||||||
|
|
||||||
// Slimes
|
// Slimes
|
||||||
SLIME(CreatureType.SLIME), SLIMES(CreatureType.SLIME),
|
SLIME(EntityType.SLIME), SLIMES(EntityType.SLIME),
|
||||||
SLIMETINY(CreatureType.SLIME), SLIMESTINY(CreatureType.SLIME),
|
SLIMETINY(EntityType.SLIME), SLIMESTINY(EntityType.SLIME),
|
||||||
SLIMESMALL(CreatureType.SLIME), SLIMESSMALL(CreatureType.SLIME),
|
SLIMESMALL(EntityType.SLIME), SLIMESSMALL(EntityType.SLIME),
|
||||||
SLIMEBIG(CreatureType.SLIME), SLIMESBIG(CreatureType.SLIME),
|
SLIMEBIG(EntityType.SLIME), SLIMESBIG(EntityType.SLIME),
|
||||||
SLIMEHUGE(CreatureType.SLIME), SLIMESHUGE(CreatureType.SLIME),
|
SLIMEHUGE(EntityType.SLIME), SLIMESHUGE(EntityType.SLIME),
|
||||||
|
|
||||||
// Magma cubes
|
// Magma cubes
|
||||||
MAGMACUBE(CreatureType.MAGMA_CUBE), MAGMACUBES(CreatureType.MAGMA_CUBE),
|
MAGMACUBE(EntityType.MAGMA_CUBE), MAGMACUBES(EntityType.MAGMA_CUBE),
|
||||||
MAGMACUBETINY(CreatureType.MAGMA_CUBE), MAGMACUBESTINY(CreatureType.MAGMA_CUBE),
|
MAGMACUBETINY(EntityType.MAGMA_CUBE), MAGMACUBESTINY(EntityType.MAGMA_CUBE),
|
||||||
MAGMACUBESMALL(CreatureType.MAGMA_CUBE),MAGMACUBESSMALL(CreatureType.MAGMA_CUBE),
|
MAGMACUBESMALL(EntityType.MAGMA_CUBE),MAGMACUBESSMALL(EntityType.MAGMA_CUBE),
|
||||||
MAGMACUBEBIG(CreatureType.MAGMA_CUBE), MAGMACUBESBIG(CreatureType.MAGMA_CUBE),
|
MAGMACUBEBIG(EntityType.MAGMA_CUBE), MAGMACUBESBIG(EntityType.MAGMA_CUBE),
|
||||||
MAGMACUBEHUGE(CreatureType.MAGMA_CUBE), MAGMACUBESHUGE(CreatureType.MAGMA_CUBE);
|
MAGMACUBEHUGE(EntityType.MAGMA_CUBE), MAGMACUBESHUGE(EntityType.MAGMA_CUBE);
|
||||||
|
|
||||||
private CreatureType type;
|
private EntityType type;
|
||||||
|
|
||||||
private MACreature(CreatureType type) {
|
private MACreature(EntityType type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CreatureType getType() {
|
public EntityType getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user