Skip to content

Commit

Permalink
remove unnecessary force-close check on removing display
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Oct 15, 2023
1 parent 3ae80c7 commit d3b5147
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import me.hsgamer.hscore.minecraft.gui.event.CloseEvent;
import me.hsgamer.hscore.minecraft.gui.event.OpenEvent;
import org.bukkit.Bukkit;
import org.bukkit.entity.HumanEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.permissions.Permission;
Expand Down Expand Up @@ -71,14 +70,7 @@ protected BaseInventoryMenu(Config config) {
@Override
protected void onRemoveDisplay(@NotNull BukkitGUIDisplay display) {
argumentHandler.onClear(display.getUniqueId());

Optional.ofNullable(updateTasks.remove(display.getUniqueId())).ifPresent(Task::cancel);
for (HumanEntity humanEntity : display.getInventory().getViewers()) {
UUID uuid = humanEntity.getUniqueId();
if (uuid != display.getUniqueId()) {
forceClose.add(uuid);
}
}
super.onRemoveDisplay(display);
}
};
Expand Down

0 comments on commit d3b5147

Please sign in to comment.