mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-25 17:37:34 +01:00
Prevent people in creative mode accessing chests
This commit is contained in:
parent
0e87c826bb
commit
87c6ea8fc8
@ -16,6 +16,7 @@ import com.Acrobot.ChestShop.Signs.ChestShopSign;
|
|||||||
import com.Acrobot.ChestShop.Utils.uBlock;
|
import com.Acrobot.ChestShop.Utils.uBlock;
|
||||||
import com.Acrobot.ChestShop.Utils.uName;
|
import com.Acrobot.ChestShop.Utils.uName;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -79,7 +80,7 @@ public class PlayerInteract implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ChestShopSign.canAccess(player, sign)) {
|
if (ChestShopSign.canAccess(player, sign)) {
|
||||||
if (!Properties.ALLOW_SIGN_CHEST_OPEN || player.isSneaking()) {
|
if (!Properties.ALLOW_SIGN_CHEST_OPEN || player.isSneaking() || player.getGameMode() == GameMode.CREATIVE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user