mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 16:35:50 +00:00
account for null ignored in StructureLocateEvent
This commit is contained in:
parent
3217d66c69
commit
f61a544a57
@ -19,7 +19,6 @@ public class PaperListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onStructureLocate(StructureLocateEvent e) {
|
public void onStructureLocate(StructureLocateEvent e) {
|
||||||
if(!BukkitAdapter.adapt(e.getWorld()).isTerraWorld()) return;
|
if(!BukkitAdapter.adapt(e.getWorld()).isTerraWorld()) return;
|
||||||
e.setResult(null); // Assume no result.
|
|
||||||
String name = "minecraft:" + e.getType().getName();
|
String name = "minecraft:" + e.getType().getName();
|
||||||
main.getDebugLogger().info("Overriding structure location for \"" + name + "\"");
|
main.getDebugLogger().info("Overriding structure location for \"" + name + "\"");
|
||||||
TerraWorld tw = main.getWorld(BukkitAdapter.adapt(e.getWorld()));
|
TerraWorld tw = main.getWorld(BukkitAdapter.adapt(e.getWorld()));
|
||||||
@ -32,10 +31,8 @@ public class PaperListener implements Listener {
|
|||||||
}, main);
|
}, main);
|
||||||
finder.run(); // Do this synchronously.
|
finder.run(); // Do this synchronously.
|
||||||
} else {
|
} else {
|
||||||
main.logger().warning("No overrides are defined for \"" + name + "\"");
|
e.setResult(e.getOrigin());
|
||||||
|
main.logger().warning("No overrides are defined for \"" + name + "\". Locating this structure will NOT work properly!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user