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

feat: 修复Yum测试代码

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-07-20 19:09:19 +08:00
parent d2126b4860
commit f0f16e3779
3 changed files with 4 additions and 27 deletions

View File

@ -37,7 +37,7 @@ public class YumTestCommand implements HandlerCommands {
@HandlerCommand(name = "event")
public void event(final InvokeCommandEvent e) {
Bukkit.getPluginManager().callEvent(new YumTestEvent(downloading));
Bukkit.getPluginManager().callEvent(new YumTestEvent());
}
@HandlerCommand(name = "inject")

View File

@ -5,6 +5,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import cn.citycraft.PluginHelper.kit.PKit;
import pw.yumc.BukkitInjectedTools.event.YumTestEvent;
/**
*
@ -17,7 +18,7 @@ public class YumTestListener implements Listener {
}
@EventHandler
public void onCommand(final YumTestListener e) {
public void onTest(final YumTestEvent e) {
throw new IllegalArgumentException("Yum事件监控测试!");
}
}

View File

@ -1,6 +1,5 @@
package pw.yumc.BukkitInjectedTools.event;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
@ -10,14 +9,8 @@ import org.bukkit.event.HandlerList;
* @since 2016年7月18日 下午7:07:37
* @author
*/
public class YumTestEvent extends Event implements Cancellable {
public class YumTestEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private final boolean value;
private boolean cancel = false;
public YumTestEvent(final boolean value) {
this.value = value;
}
public static HandlerList getHandlerList() {
return handlers;
@ -27,21 +20,4 @@ public class YumTestEvent extends Event implements Cancellable {
public HandlerList getHandlers() {
return handlers;
}
@Override
public boolean isCancelled() {
return cancel;
}
/**
* @return value
*/
public boolean isValue() {
return value;
}
@Override
public void setCancelled(final boolean arg0) {
cancel = arg0;
}
}