mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-12-29 04:18:05 +01:00
Add proper Bukkit API event usage.
This commit is contained in:
parent
e1f27c88bd
commit
2a31fc9f67
@ -2,6 +2,7 @@ package world.bentobox.challenges.events;
|
||||
|
||||
|
||||
|
||||
import org.bukkit.event.HandlerList;
|
||||
import java.util.UUID;
|
||||
|
||||
import world.bentobox.bentobox.api.events.BentoBoxEvent;
|
||||
@ -127,6 +128,34 @@ public class ChallengeCompletedEvent extends BentoBoxEvent
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Handler methods
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return ChallengeCompletedEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return ChallengeCompletedEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Variables
|
||||
// ---------------------------------------------------------------------
|
||||
@ -151,4 +180,9 @@ public class ChallengeCompletedEvent extends BentoBoxEvent
|
||||
* Count of completions
|
||||
*/
|
||||
private int completionCount;
|
||||
|
||||
/**
|
||||
* Event listener list for current
|
||||
*/
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package world.bentobox.challenges.events;
|
||||
|
||||
|
||||
import org.bukkit.event.HandlerList;
|
||||
import java.util.UUID;
|
||||
|
||||
import world.bentobox.bentobox.api.events.BentoBoxEvent;
|
||||
@ -125,6 +126,34 @@ public class ChallengeResetAllEvent extends BentoBoxEvent
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Handler methods
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return ChallengeResetAllEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return ChallengeResetAllEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Variables
|
||||
// ---------------------------------------------------------------------
|
||||
@ -149,4 +178,9 @@ public class ChallengeResetAllEvent extends BentoBoxEvent
|
||||
* Reset Reason
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* Event listener list for current
|
||||
*/
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package world.bentobox.challenges.events;
|
||||
|
||||
|
||||
import org.bukkit.event.HandlerList;
|
||||
import java.util.UUID;
|
||||
|
||||
import world.bentobox.bentobox.api.events.BentoBoxEvent;
|
||||
@ -122,6 +123,34 @@ public class ChallengeResetEvent extends BentoBoxEvent
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Handler methods
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return ChallengeResetEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return ChallengeResetEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Variables
|
||||
// ---------------------------------------------------------------------
|
||||
@ -146,4 +175,9 @@ public class ChallengeResetEvent extends BentoBoxEvent
|
||||
* Reset Reason
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* Event listener list for current
|
||||
*/
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package world.bentobox.challenges.events;
|
||||
|
||||
|
||||
import org.bukkit.event.HandlerList;
|
||||
import java.util.UUID;
|
||||
|
||||
import world.bentobox.bentobox.api.events.BentoBoxEvent;
|
||||
@ -101,6 +102,34 @@ public class LevelCompletedEvent extends BentoBoxEvent
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Handler methods
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
@Override
|
||||
public HandlerList getHandlers()
|
||||
{
|
||||
return LevelCompletedEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets handlers.
|
||||
*
|
||||
* @return the handlers
|
||||
*/
|
||||
public static HandlerList getHandlerList()
|
||||
{
|
||||
return LevelCompletedEvent.handlers;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Variables
|
||||
// ---------------------------------------------------------------------
|
||||
@ -120,4 +149,9 @@ public class LevelCompletedEvent extends BentoBoxEvent
|
||||
* Indicates if admin completes challenge
|
||||
*/
|
||||
private boolean admin;
|
||||
|
||||
/**
|
||||
* Event listener list for current
|
||||
*/
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user