CBlocker 是一款用于拦截自定义命令的 Spigot 插件,支持英语与德语,并提供 GUI、日志、API、Command-Watcher 等功能。以下为整理后的中文说明。
McStats 可用于查看本插件的使用情况。1.9.4 编译,但说明中提到它也应兼容更早版本。ToolPack 解锁更多功能,但这不是插件正常运行所必需的。blacklist 与 whitelist 模式Command-WatcherCBlocker GUI/cbcb.*cb.admin/cb reloadconfig.ymlcb.admin.reload/cb listcommands.yml 中的所有命令/cb help/cb check [cmd]/cb isblocked [cmd]/cb info/cb mode (newMode)config.yml 中禁用cb.admin.mode/cb disableconfig.yml 中重新启用,并在重启或 reload 后生效config.yml 中禁用cb.admin.disable/cbgui- 文档中出现了 `/cblockergui`- 英文页面中也出现了 `/cbblockergui`cb.gui/cb add [cmd] [args]commands.yml 添加命令config.yml 中禁用cb.admin.add/cb remove [cmd]config.yml 中禁用cb.admin.remove/cwconfig.yml 中禁用cwatcher.user[cmd]"/deop"/ 非常重要,必须写上[args]player : ProGamerworld : world_netherop_override : falseperm : your.permissionconfirm : your message with spaces/confirm 确认执行replace : replacecommandmsg : your message with spacesactionbar : your actionbar message with spacestitle : your titlesubtitle : your subtitletitle 时才会显示/cb add /gamemode world: world_the_end perm: pass.end.gamemodecommands.yml 中会类似写成:cmd(number):
name: gamemode
world: world_the_end
perm: pass.end.gamemode
op_override: truecommands.yml 时,建议在服务器关闭状态下进行。commands.yml 中的命令数量上限需要正确设置,否则可能导致部分命令不生效或报错。config.yml 中的 language 值区分大小写。#for detailed information, visit spigotmc.org: https://www.spigotmc.org/resources/command-blocker.11052/
#do not change this entry:
version: 3
#you can disable the command-blocker completely > set enabled to false
enabled: true
#message will be shown as default if a command is blocked
message: '&7[ &4&lC&cBlocker&7] &4 Command blocked.'
#blacklist or whitelist
mode: blacklist
#language for messages; default: en
#create your own: > language: yx < + > CommandBlocker/lang/lang_yx.yml
language: en
#set to true > metrics will be enabled
metrics: true
#confirmation timeout in seconds. default: 30 seconds
timeout: 30
#you can change the prefix for command response here; color code character: &
prefix: '&7[ &4&lC&cBlocker&7] &r'
#security: protect your server by disabling commands
#true > command is enabled
#false > command is disabled
#IMPORTANT: this settings does not (!) effect the permissions
protect:
commands:
enable:
add: true
remove: true
mode: false
disable: false
#enabling tab complete for everybody or for players with the userdefined permission
tab_complete:
enable: true
permission:
enable: false
perm: here.your.permission
#security for the CBlockerAPI. You can disable functions to protect your server
api:
enabled: true
allowRead: true
allowWrite: false
allowReload: false
enableEvents: true
#you can enable/disable logging or some parts of it
#console_msg is independent of logging.enabled (!)
logging:
enabled: false
log_blocked: true
log_not_blocked: false
log_core: false
log_console: true
log_api: true
low_space: true
console_msg: true
#core settings
#sensitivity: LOW, MED, HIGH
core:
sensitivity: MED
updateChecker: true
#CommandWatcher settings, for watching players and their commands
commandWatcher:
enabled: true
message: '&7[ &8CBWatcher&7] &a&player&7 executed: >&a&cmd&7< in world >&a&world&7<'
messageBlocked: '&7[ &8CBWatcher&7] &a&player&7 tried to execute: >&a&cmd&7< in world >&a&world&7<'
ignore:
players:
- Player1
- AdminPlayer
- Example
cmds:
- help
- home
- cb
#commands.yml extra settings, for titles and subtitles of blocked/whitelisted commands
#in_seconds = false --> 20 = 1 sec
cmd:
titles:
fade_in: 20
stay: 60
fade_out: 20
in_seconds: falseLOWMEDHIGH#maximum of commands;
#you can change it, but it has to be more than the real count of the defined blocked commands.
#the old <blockedCMDs> has been removed.
#it is more comfortable to set a maximum than setting everytime adding new commands the count
max: 10
cmd1:
name: deop
world: world
opOverride: true
cmd2:
name: op
world: world
opOverride: truecmd[number]:
name: stop
# required
world: world
# optional: set a world
player: Juyas
# optional: define a player
msg: '&4Command blocked'
# optional: define a different message than the default.
op_override: false
# important: sets if an op can pass this blocked. if it is set to false, op can't override it.
perm: your.permission.here
# optional: define a passthrough permission, every player with this permission will be able to execute this command
replace: restart
# optional: if a player executed the command /stop, he actually won't execute /stop -> he will execute /restart
confirm: Your confirm message here
# optional: command will be executed if the player executed /confirm before. he has 30 seconds to type /confirmnameworldplayermsgop_overridepermreplaceconfirm/confirm 才能继续执行lang 文件夹中。lang_yourLanguage.ymlconfig.yml 中设置:language: yourLanguagelang_en.yml 翻译为其他语言,可以发送给作者,作者会公开提供给其他用户使用。lang_en.ymllang_de.ymlhelp_infohelp_helphelp_reloadhelp_checkhelp_check_aliashelp_addhelp_removehelp_modehelp_disableloadedreload_completeblocked_listunavailableavailablecommand_availablewrong_argsblacklistwhitelistcommand_blockedthe_word_isno_blockedall_blockedavailable_commandscommand_listclick_to_executedo_not_clickblocked_serverblocked_worldblocked_youblocked_no_reasonfree_serverfree_worldfree_youthe_word_reasonno_permscommand_disabledc_add_errorc_add_successc_add_existsc_remove_errorc_remove_successc_remove_existsmode_actualmode_changeddisabledconfirm_alreadyconfirmconfirm_time_overno_confirmcheck_will_replacecheck_need_confirmcwatcher_enabledcwatcher_disablednothinggui_main_settingsgui_main_commandsgui_main_logsgui_settingsgui_commandsgui_edit_cmdgui_logsgui_desc_settingsgui_desc_commandsgui_desc_logsgui_nextpagegui_prevpagegui_go_to_pagegui_edit_cmd_removegui_edit_cmd_remove_descgui_edit_cmd_toggle_opgui_click_to_editgui_no_accesscb.*cb.admincb.cmd/cb 相关命令cb.admin.updatecb.admin.editcb.admin.add 与 cb.admin.removecb.admin.add/cb add 启用时,可添加命令到列表cb.admin.remove/cb remove 启用时,可从列表移除命令cb.admin.reloadcb.admin.disable/cb disable 启用时,可完全禁用 CBlockercb.admin.mode/cb mode 启用时,可修改模式cb.gui/cbgui 打开 GUIcb.gui.cmdcb.gui.settingscb.gui.logcb.gui.editcmdcb.gui.cmd,此权限基本没有意义CBlockerAPIstatic CBlockerAPI api;if (CBlockerAPI.enabled())
{
//plugin should be an instance of your JavaPlugin-mainclass
api = new CBlockerAPI(plugin);
}//if you have created an CBlockerAPI object named "api"
if(api.canRead())
{
//you have reading access
}
if(api.canWrite())
{
//you have writing access
}
if(api.canReload())
{
//you can reload cblocker
}
if(api.eventsEnabled())
{
//cblocker will use events
}static boolean enabled()Plugin getPlugin()boolean isEnabled()boolean canRead()boolean canWrite()boolean canReload()boolean eventsEnabled()boolean isBlocked(Player p, String command)boolean isBlocked(Player p, World w, String command)CBlockReason getBlockReason(Player p, String command)CBlockReason getBlockReason(Player p, World w, String command)Vector<CCommand> getBlocked()Vector<CCommand> getBlocked(String command)CCommand getBlocked(int number)String getReasonMessage(CBlockReason reason)String getBlockMessage(int number)String getConfirmMessage(int number)String getMessage(String key)String getMessage(int number)boolean containsCommand(int number)boolean containsCommand(String command)Vector<String> getBlockeMessages(String command)boolean addRuntimeBlocked(CCommand command)boolean removeRuntimeBlocked(int number)CLanguage getLanguage()Mode getMode()boolean toolPackUsage()boolean reloadCBlocker()void log(String line)CConfig getConfig()boolean reloadConfig()CVersion getCBlockerVersion()boolean isCompatible( CVersion needed)boolean hasNewUpdate()enum ModeBlacklistWhitelistenum CSensitivityLOWMEDIUMHIGHenum CBlockReasonFREE_PERM (-4)FREE_PLAYER (-3)FREE_WORLD (-2)FREE (-1)NOT_BLOCKED (0)BLOCKED (1)WORLD_BLOCKED (2)PLAYER_BLOCKED (3)PERM_NEEDED (4)int getID()boolean isBlocked()static CBlockReason blockReason(int ID)boolean hasPlayer()boolean hasWorld()boolean hasPermission()boolean hasMessage()boolean opOverride()boolean hasReplacement()boolean needConfirm()String name()World world()UUID worldUUID()OfflinePlayer offlinePlayer()Player player()UUID playerUUID()String permission()String message()int number()String replacement()String confirm()HashMap<String, String> values()boolean equals(CCommand bc)static CCommand getInstance(String command, OfflinePlayer player, World world, String message, String permission, boolean opOverride, String replacement, String confirm)boolean metricsint versionString prefixboolean caddboolean cremoveboolean cmodeboolean cableboolean tabEnabledboolean tabPermsString tabPermboolean loggingboolean logBlockedboolean logNotBlockedboolean logCoreboolean logAPIboolean logLowSpaceboolean logConsoleboolean consoleMessagesCSensitivity sensitivityclass CLanguageString getLanguage()File getLanguageFile()boolean exists()class CVersionstatic CVersion getVersion( String version)String toString()int compareTo(CVersion version)AccessDeniedExceptionAlreadyRegisteredExceptionAPIDisabledExcepionPluginNotRegisteredExceptionCBlockerAPI 对象时会自动注册插件ApiAccessEvent- `Plugin getPlugin()`- `Access getAccess()`- `boolean wasAllowed()`CommandBlockedEvent- `String getMessage()`- `CCommand getCommand()`- `Player getExecutor()`- `CBlockReason getReason()`CommandReplacedEvent- `CBlockReason getReason()`- `String getReplacement()`- `Player getExecutor()`- `CCommand getCommand()`PostConfirmationProcessedEvent- `String getConfirmMessage()`- `Player getExecutor()`- `CCommand getCommand()`PreCommandBlockedEvent- `boolean willReplace()`- `String getReplacement()`- `void setReplacement(String replacement)`- `boolean needConfirm()`- `String getConfirmMessage()`- `void setConfirmation(String message)`- `World getWorld()`- `String getMessage()`- `CBlockReason getReason()`- `void setMessage(String message)`- `void setCancelled(boolean cancel)`- `boolean isCancelled()`- german- englishToolPack?/cb disable 会删除数据吗?msg、actionbar、title、subtitle、confirm 等。player 与 world 参数即可。perm 设置绕过权限。op_override 控制。0.3.2.0 及更低版本。block_messageblockedCMDslanguageblacklist: true- `WorldGuardFreeRegion`- recommended: `C Blocker 1.0.0.5`- min: `1.0.0.4b`友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人数:1,247,001 | 历史访问人次:1,549,008
今日访问人数:4,249 | 今日访问人次:4,449
昨日访问人数:27,770 | 昨日访问人次:30,933
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6