mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-31 03:50:36 +01:00
Fix null pointer in portal search config
This commit is contained in:
parent
53ea88badf
commit
0aa8d8f0e5
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
Location enter = this.getBukkitEntity().getLocation();
|
||||
Location exit = (worldserver == null) ? null : new Location(worldserver.getWorld(), d0, d1, d2, f1, f);
|
||||
- PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, 128, true, resourcekey == DimensionManager.THE_END ? 0 : 16);
|
||||
+ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, worldserver.paperConfig.portalSearchRadius, true, resourcekey == DimensionManager.THE_END ? 0 : worldserver.paperConfig.portalCreateRadius);
|
||||
+ com.destroystokyo.paper.PaperWorldConfig config = worldserver != null ? worldserver.paperConfig : worldserver1.paperConfig; // Paper - portal radius
|
||||
+ PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, config.portalSearchRadius, true, resourcekey == DimensionManager.THE_END ? 0 : config.portalCreateRadius); // Paper - portal radius
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled() || event.getTo() == null) {
|
||||
return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue