expose Npc#setWorld in the api
This commit is contained in:
parent
d7c0870546
commit
5c99681561
2 changed files with 17 additions and 0 deletions
|
@ -38,6 +38,18 @@ public interface Npc extends PropertyHolder {
|
||||||
*/
|
*/
|
||||||
void setLocation(NpcLocation location);
|
void setLocation(NpcLocation location);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the world of this NPC
|
||||||
|
* @param world The bukkit world to set
|
||||||
|
*/
|
||||||
|
void setWorld(World world);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the world of this NPC
|
||||||
|
* @param name The name world to set
|
||||||
|
*/
|
||||||
|
void setWorld(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the hologram of this NPC
|
* Gets the hologram of this NPC
|
||||||
* @return The {@link Hologram} of this NPC
|
* @return The {@link Hologram} of this NPC
|
||||||
|
|
|
@ -236,6 +236,11 @@ public class NpcImpl extends Viewable implements Npc {
|
||||||
this.worldName = world.getName();
|
this.worldName = world.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWorld(String name) {
|
||||||
|
delete();
|
||||||
|
this.worldName = name;
|
||||||
|
}
|
||||||
|
|
||||||
public void swingHand(boolean offHand) {
|
public void swingHand(boolean offHand) {
|
||||||
for (Player viewer : getViewers()) entity.swingHand(viewer, offHand);
|
for (Player viewer : getViewers()) entity.swingHand(viewer, offHand);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue