Potions are now supported as class items. The effects do not wear off upon leaving. Waiting for a relevant cancellation method in Bukkit API.

This commit is contained in:
Garbage Mule
2011-12-03 20:28:38 +01:00
parent 8a0c76c23f
commit f7e8cc2a83
3 changed files with 14 additions and 7 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
name: MobArena name: MobArena
main: com.garbagemule.MobArena.MobArena main: com.garbagemule.MobArena.MobArena
version: 0.94.4 version: 0.94.4.1
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells] softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
commands: commands:
ma: ma:
@@ -597,6 +597,8 @@ public class MAUtils
if (material == Material.INK_SACK) if (material == Material.INK_SACK)
offset = 15; offset = 15;
if (material == Material.INK_SACK || material == Material.WOOL)
{
DyeColor dye = (data.matches("[0-9]+")) ? DyeColor dye = (data.matches("[0-9]+")) ?
DyeColor.getByData((byte) Math.abs(offset - Integer.parseInt(data))) : DyeColor.getByData((byte) Math.abs(offset - Integer.parseInt(data))) :
DyeColor.valueOf(data.toUpperCase()); DyeColor.valueOf(data.toUpperCase());
@@ -604,6 +606,11 @@ public class MAUtils
//return new ItemStack(material, amount, (byte) Math.abs((offset - dye.getData()))); //return new ItemStack(material, amount, (byte) Math.abs((offset - dye.getData())));
return new ItemStack(material, amount, (byte) Math.abs(offset - dye.getData())); return new ItemStack(material, amount, (byte) Math.abs(offset - dye.getData()));
} }
else
{
return new ItemStack(material, amount, (byte) Integer.parseInt(data));
}
}
catch (Exception e) catch (Exception e)
{ {
MobArena.warning("Could not create item \"" + name + "\". Check config.yml"); MobArena.warning("Could not create item \"" + name + "\". Check config.yml");