mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
Exempt players from calling CreatureSpawn
This commit is contained in:
parent
7eeb0d8f4a
commit
c0a78fa6c6
1 changed files with 2 additions and 2 deletions
|
@ -720,7 +720,7 @@ public class World implements IBlockAccess {
|
|||
}
|
||||
|
||||
// CraftBukkit start
|
||||
if (entity instanceof EntityLiving) {
|
||||
if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
|
||||
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
|
@ -1578,7 +1578,7 @@ public class World implements IBlockAccess {
|
|||
for (int i = 0; i < list.size(); ++i) {
|
||||
entity = (Entity) list.get(i);
|
||||
// CraftBukkit start
|
||||
if (entity instanceof EntityLiving) {
|
||||
if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
|
||||
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
||||
if (event.isCancelled()) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue