mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Change mobspawn track list to use entity id
This commit is contained in:
parent
95da5a4535
commit
0c8b46acee
@ -18,6 +18,7 @@ Version 1.3.00-dev
|
|||||||
+ Re-added mcMMO reporting damage events
|
+ Re-added mcMMO reporting damage events
|
||||||
= Fixed /mcability not respecting permissions
|
= Fixed /mcability not respecting permissions
|
||||||
= Prettied up new config files
|
= Prettied up new config files
|
||||||
|
! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object
|
||||||
! Changed stats command name to mcstats for better plugin compatibility
|
! Changed stats command name to mcstats for better plugin compatibility
|
||||||
! Changed god mode to turn off if player enters world where he does not have mcgod permission
|
! Changed god mode to turn off if player enters world where he does not have mcgod permission
|
||||||
! Changed Taming to also gain XP from shearing
|
! Changed Taming to also gain XP from shearing
|
||||||
|
@ -131,7 +131,7 @@ public class Combat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!pluginx.misc.mobSpawnerList.contains(event.getEntity()))
|
if(!pluginx.misc.mobSpawnerList.contains(event.getEntity().getEntityId()))
|
||||||
{
|
{
|
||||||
int xp = getXp(event.getEntity(), event);
|
int xp = getXp(event.getEntity(), event);
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ public class Combat
|
|||||||
|
|
||||||
master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$
|
master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity()))
|
if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity().getEntityId()))
|
||||||
{
|
{
|
||||||
int xp = getXp(event.getEntity(), event);
|
int xp = getXp(event.getEntity(), event);
|
||||||
Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master);
|
Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master);
|
||||||
@ -336,7 +336,7 @@ public class Combat
|
|||||||
/*
|
/*
|
||||||
* Defender is Monster
|
* Defender is Monster
|
||||||
*/
|
*/
|
||||||
if(!pluginx.misc.mobSpawnerList.contains(x))
|
if(!pluginx.misc.mobSpawnerList.contains(x.getEntityId()))
|
||||||
{
|
{
|
||||||
int xp = getXp(event.getEntity(), event);
|
int xp = getXp(event.getEntity(), event);
|
||||||
PPa.addXP(SkillType.ARCHERY, xp*10, attacker);
|
PPa.addXP(SkillType.ARCHERY, xp*10, attacker);
|
||||||
|
@ -31,7 +31,7 @@ public class Misc
|
|||||||
|
|
||||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||||
|
|
||||||
public ArrayList<Entity> mobSpawnerList = new ArrayList<Entity>();
|
public ArrayList<Integer> mobSpawnerList = new ArrayList<Integer>();
|
||||||
public HashSet<Block> blockWatchList = new HashSet<Block>();
|
public HashSet<Block> blockWatchList = new HashSet<Block>();
|
||||||
public HashMap<Entity, Integer> arrowTracker = new HashMap<Entity, Integer>();
|
public HashMap<Entity, Integer> arrowTracker = new HashMap<Entity, Integer>();
|
||||||
public ArrayList<LivingEntity> bleedTracker = new ArrayList<LivingEntity>();
|
public ArrayList<LivingEntity> bleedTracker = new ArrayList<LivingEntity>();
|
||||||
|
@ -207,7 +207,7 @@ public class mcEntityListener implements Listener
|
|||||||
|
|
||||||
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
||||||
{
|
{
|
||||||
plugin.misc.mobSpawnerList.add(event.getEntity());
|
plugin.misc.mobSpawnerList.add(event.getEntity().getEntityId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user