Update RandomListeners.java
This commit is contained in:
parent
a9007dcccb
commit
9b061317a7
@ -1,5 +1,6 @@
|
||||
package rip.tilly.bedwars.listeners;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -90,6 +91,10 @@ public class RandomListeners implements Listener {
|
||||
@EventHandler
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
if (player.getGameMode() == GameMode.CREATIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
|
||||
if (playerData.getPlayerState() != PlayerState.PLAYING) {
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user