Skip to content

Commit

Permalink
fix: add online check to plobby chest analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
AsoDesu committed Sep 19, 2023
1 parent cd7f804 commit e7e8ec1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.sun.net.httpserver.HttpServer;
import net.asodev.islandutils.modules.plobby.Plobby;
import net.asodev.islandutils.modules.plobby.PlobbyFeatures;
import net.asodev.islandutils.state.MccIslandState;
import net.asodev.islandutils.util.ChatUtils;
import net.asodev.islandutils.util.Utils;
import net.minecraft.client.gui.screens.Screen;
Expand All @@ -29,6 +30,7 @@ protected PlobbyChestMixin(Component component) {

@Inject(method = "slotClicked", at = @At("HEAD"))
private void slotClicked(Slot slot, int index, int j, ClickType clickType, CallbackInfo ci) {
if (!MccIslandState.isOnline()) return;
if (!this.getTitle().contains(Plobby.getTitleComponent())) return;
if (slot == null) return;
if (index != 8 && slot.hasItem()) return;
Expand Down

0 comments on commit e7e8ec1

Please sign in to comment.