mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Exempt players from calling CreatureSpawn
This commit is contained in:
@@ -720,7 +720,7 @@ public class World implements IBlockAccess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
|
||||||
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1578,7 +1578,7 @@ public class World implements IBlockAccess {
|
|||||||
for (int i = 0; i < list.size(); ++i) {
|
for (int i = 0; i < list.size(); ++i) {
|
||||||
entity = (Entity) list.get(i);
|
entity = (Entity) list.get(i);
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
|
||||||
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
CreatureSpawnEvent event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user