mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Moved last few hashmaps to mcMMO.java & killed off Misc.java
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user