forked from Upstream/CommandPanels
Merge pull request #285 from TheLonelyWolf1/master
Implement toggle for disabling the Import Command.
This commit is contained in:
commit
2aced6e917
@ -17,6 +17,7 @@ config:
|
||||
disabled-world-message: true
|
||||
panel-snooper: false
|
||||
allow-unsafe-mini-message: false
|
||||
enable-import-command: false
|
||||
format:
|
||||
tag: '&6[&bCommandPanels&6] '
|
||||
perms: '&cNo permission.'
|
||||
@ -28,6 +29,7 @@ config:
|
||||
offline: 'Offline'
|
||||
offlineHeadValue: 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmU1Mjg2YzQ3MGY2NmZmYTFhMTgzMzFjYmZmYjlhM2MyYTQ0MjRhOGM3MjU5YzQ0MzZmZDJlMzU1ODJhNTIyIn19fQ=='
|
||||
input: '&cYour Input is too long!'
|
||||
disabled: '&cThis feature is disabled in your plugin config.'
|
||||
input:
|
||||
input-cancel: cancel
|
||||
input-cancelled: '&cCancelled!'
|
||||
|
@ -18,6 +18,10 @@ public class CommandPanelImport implements CommandExecutor {
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (sender.hasPermission("commandpanel.import")) {
|
||||
if(!plugin.config.getString("config.enable-import-command").equalsIgnoreCase("true")){
|
||||
sender.sendMessage(plugin.tex.colour(plugin.tag + plugin.config.getString("config.format.disabled")));
|
||||
return true;
|
||||
}
|
||||
if (args.length == 2) {
|
||||
//import command
|
||||
new BukkitRunnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user