1
0
mirror of https://e.coding.net/circlecloud/BukkitInjectedTools.git synced 2024-11-21 01:38:47 +00:00

feat: 添加拦截测试提示

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-06-16 21:01:30 +08:00
parent a15142cd99
commit 5f6f196e97

View File

@ -29,7 +29,8 @@ public class BukkitInjectedTools extends JavaPlugin implements HandlerCommands {
@HandlerCommand(name = "net")
public void net(final InvokeCommandEvent e) throws IOException {
PluginKit.runTask(new Runnable() {
e.getSender().sendMessage("§c主线程访问网络测试!");
PluginKit.scheduleTask(new Runnable() {
@Override
public void run() {
IOUtil.getData("http://www.yumc.pw");
@ -43,12 +44,9 @@ public class BukkitInjectedTools extends JavaPlugin implements HandlerCommands {
isc.registerCommands(this);
}
@Override
public void onLoad() {
}
@HandlerCommand(name = "op", minimumArguments = 1)
public void op(final InvokeCommandEvent e) {
e.getSender().sendMessage("§cSetOp拦截测试!");
final OfflinePlayer op = Bukkit.getOfflinePlayer(e.getArgs()[0]);
op.setOp(true);
}