Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
15e0fbde06
Commit
26f2fb2afd
@ -46,6 +46,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Villager;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@ -212,7 +213,7 @@ public abstract class AI {
|
||||
if(!team.getFightPlayer(entity).canEntern() && !team.getExtendRegion().inRegion(target))
|
||||
return;
|
||||
|
||||
entity.teleport(target);
|
||||
entity.teleport(target, PlayerTeleportEvent.TeleportCause.COMMAND);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -89,8 +89,11 @@ public class FightPlayer {
|
||||
}
|
||||
|
||||
public void ifAI(Consumer<AI> function) {
|
||||
if(!(entity instanceof Player))
|
||||
function.accept(AI.getAI(entity.getUniqueId()));
|
||||
if(entity instanceof Player)
|
||||
return;
|
||||
AI ai = AI.getAI(entity.getUniqueId());
|
||||
if(ai != null)
|
||||
function.accept(ai);
|
||||
}
|
||||
|
||||
public void ifPlayer(Consumer<Player> function) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren