mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
IWorld:
-Undid previous commit, not implemented correctly.
This commit is contained in:
1 parent
43e41a0e95
commit
a4585fdf4d
2 files changed
-13
No files matched your search
@@ -589,20 +589,9 @@ public class ScriptWorld implements IWorld {
|
||||
* @return Returns the entity which was spawned
|
||||
*/
|
||||
public IEntity spawnClone(int x, int y, int z, int tab, String name){
|
||||
return spawnClone(x,y,z,tab,name,true);
|
||||
}
|
||||
|
||||
public IEntity spawnClone(int x, int y, int z, int tab, String name, boolean ignoreProtection){
|
||||
NBTTagCompound compound = ServerCloneController.Instance.getCloneData(null, name, tab);
|
||||
if(compound == null)
|
||||
return null;
|
||||
|
||||
if (!ignoreProtection) {
|
||||
FakePlayer fakePlayer = new FakePlayer(world, new GameProfile(null, "NpcAPI"));
|
||||
if (!CustomNpcsPermissions.hasPermission(fakePlayer, EnumPacketServer.SpawnMob.permission))
|
||||
return null;
|
||||
}
|
||||
|
||||
Entity entity = NoppesUtilServer.spawnClone(compound, x, y, z, world);
|
||||
if(entity == null)
|
||||
return null;
|
||||
|
||||
@@ -350,8 +350,6 @@ public interface IWorld {
|
||||
*/
|
||||
IEntity spawnClone(int x, int y, int z, int tab, String name);
|
||||
|
||||
IEntity spawnClone(int x, int y, int z, int tab, String name, boolean ignoreProtection);
|
||||
|
||||
ScriptScoreboard getScoreboard();
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user