mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-26 04:25:21 +01:00
Monsters no longer target pet wolves in the arena.
This commit is contained in:
parent
c298607b56
commit
6c0af886b1
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -15,9 +15,9 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
|
||||
import com.garbagemule.ArenaPlugin.Master;
|
||||
//import com.garbagemule.ArenaPlugin.Master;
|
||||
|
||||
public class ArenaMaster implements Master
|
||||
public class ArenaMaster //implements Master
|
||||
{
|
||||
private MobArena plugin;
|
||||
private Configuration config;
|
||||
@ -392,9 +392,4 @@ public class ArenaMaster implements Master
|
||||
public void updateClasses() { update(false, true, false); }
|
||||
public void updateArenas() { update(false, false, true); }
|
||||
public void updateAll() { update(true, true, true); }
|
||||
|
||||
public Map<Player, com.garbagemule.ArenaPlugin.Arena> getArenaMap()
|
||||
{
|
||||
return null;//arenaMap;
|
||||
}
|
||||
}
|
||||
|
@ -396,27 +396,23 @@ public class MAListener implements ArenaListener
|
||||
|
||||
// If the target is a player, cancel.
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (arena.monsters.contains(event.getEntity()))
|
||||
else if (arena.monsters.contains(event.getEntity()))
|
||||
{
|
||||
if (event.getReason() == TargetReason.FORGOT_TARGET)
|
||||
{
|
||||
event.setTarget(MAUtils.getClosestPlayer(event.getEntity(), arena));
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getReason() == TargetReason.TARGET_DIED)
|
||||
{
|
||||
else if (event.getReason() == TargetReason.TARGET_DIED)
|
||||
event.setTarget(MAUtils.getClosestPlayer(event.getEntity(), arena));
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getReason() == TargetReason.CLOSEST_PLAYER)
|
||||
else if (event.getReason() == TargetReason.TARGET_ATTACKED_ENTITY)
|
||||
if (arena.pets.contains(event.getTarget()))
|
||||
event.setCancelled(true);
|
||||
|
||||
else if (event.getReason() == TargetReason.CLOSEST_PLAYER)
|
||||
if (!arena.arenaPlayers.contains(event.getTarget()))
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,13 @@ public class MASpawnThread implements Runnable
|
||||
{
|
||||
List<Entity> tmp = new LinkedList<Entity>(arena.monsters);
|
||||
for (Entity e : tmp)
|
||||
{
|
||||
if (e.isDead() || !arena.inRegion(e.getLocation()))
|
||||
{
|
||||
arena.monsters.remove(e);
|
||||
e.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void grantRewards(int wave)
|
||||
|
@ -21,14 +21,14 @@ import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
import com.garbagemule.MobArena.util.FileUtils;
|
||||
import com.garbagemule.register.payment.Method;
|
||||
import com.garbagemule.register.payment.Methods;
|
||||
import com.garbagemule.ArenaPlugin.ArenaPlugin;
|
||||
import com.garbagemule.ArenaPlugin.Master;
|
||||
//import com.garbagemule.ArenaPlugin.ArenaPlugin;
|
||||
//import com.garbagemule.ArenaPlugin.Master;
|
||||
|
||||
/**
|
||||
* MobArena
|
||||
* @author garbagemule
|
||||
*/
|
||||
public class MobArena extends JavaPlugin implements ArenaPlugin
|
||||
public class MobArena extends JavaPlugin// implements ArenaPlugin
|
||||
{
|
||||
private Configuration config;
|
||||
private ArenaMaster am;
|
||||
@ -181,11 +181,6 @@ public class MobArena extends JavaPlugin implements ArenaPlugin
|
||||
public ArenaMaster getAM() { return am; } // More convenient.
|
||||
public ArenaMaster getArenaMaster() { return am; }
|
||||
|
||||
public Master getMaster()
|
||||
{
|
||||
return am;
|
||||
}
|
||||
|
||||
private String getHeader()
|
||||
{
|
||||
String sep = System.getProperty("line.separator");
|
||||
|
Loading…
Reference in New Issue
Block a user