mirror of
https://e.coding.net/circlecloud/BukkitInjectedTools.git
synced 2024-12-28 07:38:49 +00:00
feat: 修复Yum测试代码
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
d2126b4860
commit
f0f16e3779
@ -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")
|
||||
|
@ -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事件监控测试!");
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user