Deprecate spawnCreature and add spawnEntity. Addresses BUKKIT-1168
Dieser Commit ist enthalten in:
Ursprung
568fae2e86
Commit
ea4d3662be
@ -331,14 +331,14 @@ public class CraftWorld implements World {
|
|||||||
return spawnCreature(loc, creatureType.toEntityType());
|
return spawnCreature(loc, creatureType.toEntityType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public LivingEntity spawnCreature(Location loc, EntityType creatureType) {
|
public LivingEntity spawnCreature(Location loc, EntityType creatureType) {
|
||||||
Entity result = spawn(loc, creatureType.getEntityClass());
|
Validate.isTrue(!creatureType.isAlive(), "EntityType not instance of LivingEntity");
|
||||||
|
return (LivingEntity) spawnEntity(loc, creatureType);
|
||||||
|
}
|
||||||
|
|
||||||
if (result == null) {
|
public Entity spawnEntity(Location loc, EntityType entityType) {
|
||||||
return null;
|
return spawn(loc, entityType.getEntityClass());
|
||||||
}
|
|
||||||
|
|
||||||
return (LivingEntity) result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LightningStrike strikeLightning(Location loc) {
|
public LightningStrike strikeLightning(Location loc) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren