-Undid previous commit, not implemented correctly.
This commit is contained in:
c0508383 committed 2022-07-06 00:24:14 -07:00
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();
/**