Skip to content

Commit bad9915

Browse files
committed
probably fix massive ping spiking
1 parent faeb678 commit bad9915

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • src/main/java/dev/dfonline/codeclient/location

src/main/java/dev/dfonline/codeclient/location/Plot.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public abstract class Plot extends Location {
3333
protected Boolean hasBuild;
3434
protected Boolean hasDev;
3535
protected Size size;
36-
protected HashMap<BlockPos, SignText> lineStarterCache = new HashMap<>();
36+
protected @Nullable HashMap<BlockPos, SignText> lineStarterCache = new HashMap<>();
3737
protected HashMap<BlockPos, SignText> actionCache = new HashMap<>();
3838

3939
public void setOrigin(int x, int z) {
@@ -198,7 +198,7 @@ public HashMap<BlockPos, SignText> scanForActionSigns(Pattern scan) {
198198
}
199199

200200
public void clearLineStarterCache() {
201-
lineStarterCache.clear();
201+
lineStarterCache = null;
202202
}
203203

204204
private void fillLineStarterCache() {
@@ -207,7 +207,7 @@ private void fillLineStarterCache() {
207207
}
208208

209209
public Map<BlockPos, SignText> getLineStartCache() {
210-
if (lineStarterCache.isEmpty()) fillLineStarterCache();
210+
if (lineStarterCache == null) fillLineStarterCache();
211211
return lineStarterCache;
212212
}
213213

0 commit comments

Comments
 (0)