Skip to content

Commit

Permalink
Fixed possible error on insight mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao-MoMi committed Sep 8, 2024
1 parent 884f793 commit c00df16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static class InsightPlayer implements Runnable {

public InsightPlayer(UUID uuid) {
this.uuid = uuid;
this.task = BukkitCustomCropsPlugin.getInstance().getScheduler().asyncRepeating(this, 50, 50, TimeUnit.MILLISECONDS);
this.task = BukkitCustomCropsPlugin.getInstance().getScheduler().asyncRepeating(this, 50, 500, TimeUnit.MILLISECONDS);
}

@Override
Expand Down Expand Up @@ -159,8 +159,10 @@ public void run() {
}
for (ChunkPos pos : chunksToRemove) {
HighlightBlocks[] blocks = highlightCache.remove(pos);
for (HighlightBlocks block : blocks) {
block.destroy(player);
if (blocks != null) {
for (HighlightBlocks block : blocks) {
block.destroy(player);
}
}
}
for (ChunkPos pos : nearbyChunks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ public BukkitWorldManager(BukkitCustomCropsPlugin plugin) {
try {
Class.forName("com.infernalsuite.aswm.api.SlimePlugin");
adaptors.add(new SlimeWorldAdaptorR1(1));
plugin.getPluginLogger().info("SlimeWorldManager support enabled");
plugin.getPluginLogger().info("SlimeWorldManager hooked!");
} catch (ClassNotFoundException ignored) {
}
if (Bukkit.getPluginManager().isPluginEnabled("SlimeWorldPlugin")) {
adaptors.add(new SlimeWorldAdaptorR1(2));
plugin.getPluginLogger().info("AdvancedSlimePaper support enabled");
plugin.getPluginLogger().info("AdvancedSlimePaper hooked!");
}
this.adaptors.add(new BukkitWorldAdaptor());
this.seasonProvider = new SeasonProvider() {
Expand Down

0 comments on commit c00df16

Please sign in to comment.