geforkt von Mirrors/Paper
SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
4377eb6edb
Commit
71bc2b07ed
@ -861,7 +861,7 @@
|
||||
+ org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
|
||||
+ Location enter = bukkitEntity.getLocation();
|
||||
+
|
||||
+ EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius);
|
||||
+ EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius, true, creationRadius);
|
||||
+ event.getEntity().getServer().getPluginManager().callEvent(event);
|
||||
+ if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !entity.isAlive()) {
|
||||
+ return null;
|
||||
|
@ -19,8 +19,8 @@ public class CraftPortalEvent {
|
||||
to = portalEvent.getTo();
|
||||
searchRadius = portalEvent.getSearchRadius();
|
||||
cancelled = portalEvent.isCancelled();
|
||||
creationRadius = 0;
|
||||
canCreatePortal = false;
|
||||
creationRadius = portalEvent.getCreationRadius();
|
||||
canCreatePortal = portalEvent.getCanCreatePortal();
|
||||
}
|
||||
|
||||
public CraftPortalEvent(PlayerPortalEvent portalEvent) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren