From 18e02461a6fb0c834df790df2cc46cea4dcd2a50 Mon Sep 17 00:00:00 2001 From: luisc Date: Sun, 6 Feb 2022 12:39:07 -0600 Subject: [PATCH] Added misspelled cancel functions to player & forge events, and correctly spelled cancel functions to npc events --- .../java/noppes/npcs/scripted/event/CustomNPCsEvent.java | 6 ++++++ src/main/java/noppes/npcs/scripted/event/ScriptEvent.java | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/src/main/java/noppes/npcs/scripted/event/CustomNPCsEvent.java b/src/main/java/noppes/npcs/scripted/event/CustomNPCsEvent.java index 9aa5c5aa4..d7f46473f 100644 --- a/src/main/java/noppes/npcs/scripted/event/CustomNPCsEvent.java +++ b/src/main/java/noppes/npcs/scripted/event/CustomNPCsEvent.java @@ -13,4 +13,10 @@ public class CustomNPCsEvent extends Event{ public CustomNPCsEvent() { } + + public void setCancelled(boolean bo){ + this.setCanceled(bo); + } + + public boolean isCancelled(){return this.isCanceled();} } diff --git a/src/main/java/noppes/npcs/scripted/event/ScriptEvent.java b/src/main/java/noppes/npcs/scripted/event/ScriptEvent.java index 5a5a8cbfd..12a951ca2 100644 --- a/src/main/java/noppes/npcs/scripted/event/ScriptEvent.java +++ b/src/main/java/noppes/npcs/scripted/event/ScriptEvent.java @@ -11,4 +11,12 @@ class ScriptEvent{ public boolean isCancelled(){ return isCancelled; } + + public void setCanceled(boolean bo){ + isCancelled = bo; + } + + public boolean isCanceled(){ + return isCancelled; + } }