v0.87.2 Fixed players losing rewards when typing /ma leave after arena end.

This commit is contained in:
Garbage Mule
2011-06-02 22:55:10 +02:00
parent 9163c5eef7
commit bd0b311a60
4 changed files with 10 additions and 5 deletions
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
name: MobArena
main: com.garbagemule.MobArena.MobArena
version: 0.87.1
version: 0.87.2
commands:
mobarena:
description: Base command for MobArena
@@ -221,7 +221,8 @@ public class ArenaManager
return;
}
MAUtils.clearInventory(p);
if (ArenaManager.isRunning)
MAUtils.clearInventory(p);
if (playerSet.contains(p))
playerSet.remove(p);
+7 -3
View File
@@ -208,7 +208,7 @@ public class MAUtils
if (c.getKeys("classes") == null)
{
c.setProperty("classes.Archer.items", "wood_sword, bow, arrow:64, arrow:64, grilled_pork");
c.setProperty("classes.Archer.items", "wood_sword, bow, arrow:128, grilled_pork");
c.setProperty("classes.Archer.armor", "298,299,300,301");
c.setProperty("classes.Knight.items", "diamond_sword, grilled_pork");
c.setProperty("classes.Knight.armor", "306,307,308,309");
@@ -694,6 +694,10 @@ public class MAUtils
setCoords("spawnpoints.s4", new Location(ArenaManager.world, x2-3, y1+2, z2-3));
}
/**
* This fixes everything!
*/
@SuppressWarnings("unchecked")
public static void UnDoooooItHippieMonster()
{
HashMap<EntityPosition,Integer> preciousPatch;
@@ -701,13 +705,13 @@ public class MAUtils
{
FileInputStream fis = new FileInputStream("plugins/MobArena/precious.tmp");
ObjectInputStream ois = new ObjectInputStream(fis);
preciousPatch = (HashMap) ois.readObject();
Object o = ois.readObject();
preciousPatch = (HashMap<EntityPosition,Integer>) ois.readObject();
ois.close();
}
catch (Exception e)
{
System.out.println("Couldn't find backup file...");
e.printStackTrace();
return;
}