mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-23 16:49:10 +00:00
remove usages of TerraWorld#getConfig
This commit is contained in:
@@ -100,8 +100,8 @@ public class TerraBukkitPlugin extends JavaPlugin implements TerraPlugin {
|
||||
boolean succeed = registry.loadAll(this);
|
||||
Map<World, TerraWorld> newMap = new HashMap<>();
|
||||
worldMap.forEach((world, tw) -> {
|
||||
tw.getConfig().getSamplerCache().clear();
|
||||
String packID = tw.getConfig().getID();
|
||||
world.getConfig().getSamplerCache().clear();
|
||||
String packID = world.getConfig().getID();
|
||||
newMap.put(world, new TerraWorldImpl(world, registry.get(packID), this));
|
||||
});
|
||||
worldMap.clear();
|
||||
|
||||
@@ -43,8 +43,7 @@ public class CommonListener implements Listener {
|
||||
if(e.isCancelled()) return;
|
||||
World bukkit = BukkitAdapter.adapt(e.getWorld());
|
||||
if(!bukkit.isTerraWorld()) return;
|
||||
TerraWorld tw = main.getWorld(bukkit);
|
||||
WorldConfig c = tw.getConfig();
|
||||
WorldConfig c = bukkit.getConfig();
|
||||
if(c.isDisableSaplings()) return;
|
||||
e.setCancelled(true);
|
||||
Block block = e.getLocation().getBlock();
|
||||
|
||||
Reference in New Issue
Block a user