mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-12-24 18:17:39 +01:00
Game mode stuff
This commit is contained in:
parent
9f28c799ab
commit
8be674d8ec
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
name: MobArena
|
name: MobArena
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.94.3.2
|
version: 0.94.3.3
|
||||||
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
|
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
@ -22,6 +22,7 @@ import net.minecraft.server.WorldServer;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -107,6 +108,7 @@ public class Arena
|
|||||||
protected Map<Player,Location> locations = new HashMap<Player,Location>();
|
protected Map<Player,Location> locations = new HashMap<Player,Location>();
|
||||||
protected Map<Player,Integer> healthMap = new HashMap<Player,Integer>();
|
protected Map<Player,Integer> healthMap = new HashMap<Player,Integer>();
|
||||||
protected Map<Player,Integer> hungerMap = new HashMap<Player,Integer>();
|
protected Map<Player,Integer> hungerMap = new HashMap<Player,Integer>();
|
||||||
|
protected Map<Player,GameMode> modeMap = new HashMap<Player,GameMode>();
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
protected ArenaLog log;
|
protected ArenaLog log;
|
||||||
@ -562,6 +564,9 @@ public class Arena
|
|||||||
|
|
||||||
if (!hungerMap.containsKey(p))
|
if (!hungerMap.containsKey(p))
|
||||||
hungerMap.put(p, p.getFoodLevel());
|
hungerMap.put(p, p.getFoodLevel());
|
||||||
|
|
||||||
|
if (!modeMap.containsKey(p))
|
||||||
|
modeMap.put(p, p.getGameMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeContainerContents()
|
public void storeContainerContents()
|
||||||
@ -632,6 +637,9 @@ public class Arena
|
|||||||
|
|
||||||
if (hungerMap.containsKey(p))
|
if (hungerMap.containsKey(p))
|
||||||
p.setFoodLevel(hungerMap.remove(p));
|
p.setFoodLevel(hungerMap.remove(p));
|
||||||
|
|
||||||
|
if (modeMap.containsKey(p))
|
||||||
|
p.setGameMode(modeMap.remove(p));
|
||||||
|
|
||||||
// Put out fire.
|
// Put out fire.
|
||||||
p.setFireTicks(0);
|
p.setFireTicks(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user