1
0
mirror of https://e.coding.net/circlecloud/BukkitInjectedTools.git synced 2024-11-22 01:48:45 +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") @HandlerCommand(name = "net")
public void net(final InvokeCommandEvent e) throws IOException { public void net(final InvokeCommandEvent e) throws IOException {
PluginKit.runTask(new Runnable() { e.getSender().sendMessage("§c主线程访问网络测试!");
PluginKit.scheduleTask(new Runnable() {
@Override @Override
public void run() { public void run() {
IOUtil.getData("http://www.yumc.pw"); IOUtil.getData("http://www.yumc.pw");
@ -43,12 +44,9 @@ public class BukkitInjectedTools extends JavaPlugin implements HandlerCommands {
isc.registerCommands(this); isc.registerCommands(this);
} }
@Override
public void onLoad() {
}
@HandlerCommand(name = "op", minimumArguments = 1) @HandlerCommand(name = "op", minimumArguments = 1)
public void op(final InvokeCommandEvent e) { public void op(final InvokeCommandEvent e) {
e.getSender().sendMessage("§cSetOp拦截测试!");
final OfflinePlayer op = Bukkit.getOfflinePlayer(e.getArgs()[0]); final OfflinePlayer op = Bukkit.getOfflinePlayer(e.getArgs()[0]);
op.setOp(true); op.setOp(true);
} }