Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ public void checkLog(BlockBreakEvent e)
for (Block block:blocks) {
Player p = e.getPlayer();
if(!p.getGameMode().equals(GameMode.CREATIVE)) {
if (!p.hasPermission("creativemanager.bypass.break-creative"))
if (!p.hasPermission("creativemanager.bypass.break"))
{
BlockLog blockLog = plugin.getDataManager().getBlockFrom(block.getLocation());
if (blockLog != null) {
if (blockLog.isCreative()) {
if (!CreativeManager.getSettings().getProtection(Protections.BREAK)) continue;
e.setCancelled(true);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public enum Protections {
ARMOR("armor", Material.CHAINMAIL_HELMET, "Set a defined player armor set", "Creative Armor"),
PL_ITEMSADDER("itemsadder", Material.REDSTONE_BLOCK, "Deny player to use itemsadder features", "ItemsAdder"),
BUILD_CONTAINER("build-container", Material.CHEST, "Deny player to place block with items in inventory", "Place container"),
REMOVE_EFFECTS("remove-effects", Material.POTION, "Remove all potion effect when player switch gamemode", "Remove effects");
REMOVE_EFFECTS("remove-effects", Material.POTION, "Remove all potion effect when player switch gamemode", "Remove effects"),
BREAK("break", Material.BARRIER, "Deny survival player to break creative placed blocks", "Break Creative Block");

private final String name;
private final Material icon;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ protections:
armor: false
build-container: true #Bypass : creativemanager.bypass.build-container
remove-effects: false
break: true # Deny survival players from breaking blocks placed in creative mode. Bypass: creativemanager.bypass.break
itemsadder: true
plugins:
citizens: true
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ permissions:
creativemanager.bypass.loot:
description: "Allow loot creative placed block"
default: op
creativemanager.bypass.break:
description: "Allow breaking creative placed blocks"
default: op
creativemanager.bypass.spawn_build:
description: "Allow creative player to build golem"
default: op
Expand Down