Moved last few hashmaps to mcMMO.java & killed off Misc.java

This commit is contained in:
GJ
2012-03-20 18:36:47 -04:00
parent 9e604aed5e
commit 0fa39c4ace
5 changed files with 15 additions and 30 deletions

View File

@ -28,12 +28,12 @@ public class Archery {
final int MAX_BONUS_LEVEL = 1000;
int skillLevel = PPa.getSkillLevel(SkillType.ARCHERY);
if (!plugin.misc.arrowTracker.containsKey(entity)) {
plugin.misc.arrowTracker.put(entity, 0);
if (!plugin.arrowTracker.containsKey(entity)) {
plugin.arrowTracker.put(entity, 0);
}
if (skillLevel > MAX_BONUS_LEVEL || (Math.random() * 1000 <= skillLevel)) {
plugin.misc.arrowTracker.put(entity, 1);
plugin.arrowTracker.put(entity, 1);
}
}
@ -115,10 +115,10 @@ public class Archery {
* @param plugin mcMMO plugin instance
*/
public static void arrowRetrievalCheck(Entity entity, mcMMO plugin) {
if (plugin.misc.arrowTracker.containsKey(entity)) {
m.mcDropItems(entity.getLocation(), new ItemStack(Material.ARROW), plugin.misc.arrowTracker.get(entity));
if (plugin.arrowTracker.containsKey(entity)) {
m.mcDropItems(entity.getLocation(), new ItemStack(Material.ARROW), plugin.arrowTracker.get(entity));
}
plugin.misc.arrowTracker.remove(entity);
plugin.arrowTracker.remove(entity);
}
}

View File

@ -274,7 +274,7 @@ public class BlastMining {
/* Create the TNT entity */
TNTPrimed tnt = player.getWorld().spawn(block.getLocation(), TNTPrimed.class);
plugin.misc.tntTracker.put(tnt.getEntityId(), player);
plugin.tntTracker.put(tnt.getEntityId(), player);
block.setType(Material.AIR);
tnt.setFuseTicks(0);