Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.

Commit c154139

Browse files
scorninpcybw0014
andauthored
fix: network remote when break grid (#133)
Co-authored-by: ybw0014 <i@guizhanss.com>
1 parent c372592 commit c154139

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/io/github/sefiraat/networks/slimefun/tools/NetworkRemote.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ public static void tryOpenGrid(@Nonnull ItemStack itemStack, @Nonnull Player pla
101101

102102
public static void openGrid(@Nonnull Location location, @Nonnull Player player) {
103103
SlimefunBlockData blockData = StorageCacheUtils.getBlock(location);
104+
105+
if (blockData == null) {
106+
player.sendMessage(Theme.ERROR + "无法找到绑定的网格");
107+
return;
108+
}
109+
104110
StorageCacheUtils.executeAfterLoad(blockData, () -> {
105111
if (SlimefunItem.getById(blockData.getSfId()) instanceof NetworkGrid
106112
&& Slimefun.getProtectionManager().hasPermission(player, location, Interaction.INTERACT_BLOCK)) {

0 commit comments

Comments
 (0)