handle case of server not having ChunkSnapshot#getBlockType
i.e. tell server owner to update and handle conservatively.
This commit is contained in:
parent
2a68fb9795
commit
fd0ddbf405
|
|
@ -32,13 +32,14 @@ class AutoExtendClaimTask implements Runnable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private int getLowestBuiltY()
|
private int getLowestBuiltY()
|
||||||
{
|
{
|
||||||
int y = this.claim.getLesserBoundaryCorner().getBlockY();
|
int y = this.claim.getLesserBoundaryCorner().getBlockY();
|
||||||
|
|
||||||
if(this.yTooSmall(y)) return y;
|
if(this.yTooSmall(y)) return y;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
for(ChunkSnapshot chunk : this.chunks)
|
for(ChunkSnapshot chunk : this.chunks)
|
||||||
{
|
{
|
||||||
Biome biome = chunk.getBiome(0, 0);
|
Biome biome = chunk.getBiome(0, 0);
|
||||||
|
|
@ -66,6 +67,14 @@ class AutoExtendClaimTask implements Runnable
|
||||||
|
|
||||||
if(this.yTooSmall(y)) return y;
|
if(this.yTooSmall(y)) return y;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (NoSuchMethodError e)
|
||||||
|
{
|
||||||
|
GriefPrevention.instance.getLogger().severe("You are running an outdated build of Craftbukkit/Spigot/Paper. Please update.");
|
||||||
|
GriefPrevention.instance.AddLogEntry("Claim " + claim.getID() + " was auto-extended to maximum depth.", CustomLogEntryTypes.Debug, false);
|
||||||
|
return GriefPrevention.instance.config_claims_maxDepth;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user