Skip to content
Permalink
Browse files

Make command block support configurable

  • Loading branch information...
me4502 committed Aug 2, 2019
1 parent 8217c8b commit afa190851cc220bf724ee55e0de4210f3dc21b00
@@ -32,6 +32,7 @@
public class BukkitConfiguration extends YAMLConfiguration {

public boolean noOpPermissions = false;
public boolean commandBlockSupport = false;
@Unreported private final WorldEditPlugin plugin;

public BukkitConfiguration(YAMLProcessor config, WorldEditPlugin plugin) {
@@ -43,6 +44,7 @@ public BukkitConfiguration(YAMLProcessor config, WorldEditPlugin plugin) {
public void load() {
super.load();
noOpPermissions = config.getBoolean("no-op-permissions", false);
commandBlockSupport = config.getBoolean("command-block-support", false);
migrateLegacyFolders();
}

@@ -433,7 +433,7 @@ public BukkitPlayer wrapPlayer(Player player) {
public Actor wrapCommandSender(CommandSender sender) {
if (sender instanceof Player) {
return wrapPlayer((Player) sender);
} else if (sender instanceof BlockCommandSender) {
} else if (config.commandBlockSupport && sender instanceof BlockCommandSender) {
return new BukkitBlockCommandSender(this, (BlockCommandSender) sender);
}

@@ -149,3 +149,4 @@ no-op-permissions: false
debug: false
show-help-on-first-use: true
server-side-cui: true
command-block-support: false

0 comments on commit afa1908

Please sign in to comment.
You can’t perform that action at this time.