Skip to content

Commit

Permalink
クリエイティブなら試合中の持ち替えクールダウンを無効化
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisa9006 committed Aug 4, 2024
1 parent 7b53350 commit 083597e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import net.azisaba.lgw.core.LeonGunWar;
import net.azisaba.lgw.core.utils.Chat;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Sound;
import org.bukkit.boss.BossBar;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -57,6 +58,10 @@ public static ItemStack[] getHotbar(PlayerInventory inventory) {
public void onInventoryClick(InventoryClickEvent event) {
Inventory inventory = event.getClickedInventory();

if (event.getWhoClicked().getGameMode() == GameMode.CREATIVE) {
return;
}

if (inventory == null || inventory.getType() != InventoryType.PLAYER) {
return;
}
Expand Down

0 comments on commit 083597e

Please sign in to comment.