mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2025-09-01 20:36:56 +00:00
feat: 添加Net命令 修改插件信息
This commit is contained in:
30
src/main/java/pw/yumc/Yum/commands/NetCommand.java
Normal file
30
src/main/java/pw/yumc/Yum/commands/NetCommand.java
Normal file
@ -0,0 +1,30 @@
|
||||
package pw.yumc.Yum.commands;
|
||||
|
||||
import cn.citycraft.PluginHelper.commands.HandlerCommand;
|
||||
import cn.citycraft.PluginHelper.commands.HandlerCommands;
|
||||
import cn.citycraft.PluginHelper.commands.InvokeCommandEvent;
|
||||
import cn.citycraft.PluginHelper.commands.InvokeSubCommand;
|
||||
import pw.yumc.Yum.Yum;
|
||||
|
||||
public class NetCommand implements HandlerCommands {
|
||||
public NetCommand(final Yum yum) {
|
||||
final InvokeSubCommand cmdhandler = new InvokeSubCommand(yum, "net");
|
||||
cmdhandler.setAllCommandOnlyConsole(yum.config.getBoolean("onlyNetCommandConsole", false));
|
||||
cmdhandler.registerCommands(this);
|
||||
}
|
||||
|
||||
@HandlerCommand(name = "list", aliases = "l", permission = "", description = "列出联网的插件")
|
||||
public void list(final InvokeCommandEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@HandlerCommand(name = "off", description = "禁止插件联网", possibleArguments = "[插件名称]")
|
||||
public void off(final InvokeCommandEvent e) {
|
||||
|
||||
}
|
||||
|
||||
@HandlerCommand(name = "on", description = "允许插件联网", possibleArguments = "[插件名称]")
|
||||
public void on(final InvokeCommandEvent e) {
|
||||
|
||||
}
|
||||
}
|
@ -1,8 +1,14 @@
|
||||
Version: 2.1
|
||||
#是否只允许控制台执行插件命令
|
||||
#是否只允许控制台执行插件仓库命令
|
||||
onlyCommandConsole: false
|
||||
#是否只允许控制台执行插件文件命令
|
||||
#是否只允许控制台执行插件网络管理命令
|
||||
onlyNetCommandConsole: false
|
||||
#是否只允许控制台执行插件文件管理命令
|
||||
onlyFileCommandConsole: true
|
||||
#网络调试模式
|
||||
NetworkDebug: false
|
||||
#是否允许插件主线程访问网络
|
||||
AllowPrimaryThread: false
|
||||
#禁止rm -rf的文件夹列表
|
||||
blacklist:
|
||||
- 'plugins'
|
||||
@ -14,7 +20,3 @@ ignorelist:
|
||||
- 'iConomy'
|
||||
- 'GroupManager'
|
||||
- 'PermissionsEx'
|
||||
#网络调试模式
|
||||
NetworkDebug: false
|
||||
#是否允许插件主线程访问网络
|
||||
AllowPrimaryThread: false
|
@ -11,6 +11,12 @@ commands:
|
||||
usage: §6使用§a/yum help§6查看帮助!
|
||||
permission: yum.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
net:
|
||||
description: MC插件网络管理
|
||||
aliases: [n]
|
||||
usage: §6使用§a/net help§6查看帮助!
|
||||
permission: net.use
|
||||
permission-message: §c你没有 <permission> 的权限来执行此命令!
|
||||
file:
|
||||
description: MC文件管理命令
|
||||
aliases: [f]
|
||||
|
Reference in New Issue
Block a user