[ci skip] Cleanup events (#10202)
This commit is contained in:
parent
b3c81089ae
commit
294347bee2
295 changed files with 3245 additions and 3088 deletions
|
@ -6,10 +6,10 @@ Subject: [PATCH] EnderDragon Events
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc15b70275b
|
||||
index 0000000000000000000000000000000000000000..bf5f82c8ba36bd245e1536fd4f654487aa8f6e21
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java
|
||||
@@ -0,0 +1,77 @@
|
||||
@@ -0,0 +1,79 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.AreaEffectCloud;
|
||||
|
@ -27,11 +27,12 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
|||
+ * Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud
|
||||
+ */
|
||||
+public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable {
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ @NotNull private final Collection<LivingEntity> targets;
|
||||
+ @NotNull private final AreaEffectCloud areaEffectCloud;
|
||||
+ private boolean cancelled = false;
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EnderDragonFireballHitEvent(@NotNull DragonFireball fireball, @NotNull Collection<LivingEntity> targets, @NotNull AreaEffectCloud areaEffectCloud) {
|
||||
|
@ -56,7 +57,7 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public Collection<LivingEntity> getTargets() {
|
||||
+ return targets;
|
||||
+ return this.targets;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
@ -64,20 +65,21 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public AreaEffectCloud getAreaEffectCloud() {
|
||||
+ return areaEffectCloud;
|
||||
+ return this.areaEffectCloud;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
|
@ -89,10 +91,10 @@ index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc1
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1915177f4b8f8013656fbdb41240f6c5c88f95d7
|
||||
index 0000000000000000000000000000000000000000..4a61878152c95a07160f4216e78b042ca45d24b3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java
|
||||
@@ -0,0 +1,61 @@
|
||||
@@ -0,0 +1,63 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.AreaEffectCloud;
|
||||
|
@ -100,14 +102,20 @@ index 0000000000000000000000000000000000000000..1915177f4b8f8013656fbdb41240f6c5
|
|||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when an EnderDragon spawns an AreaEffectCloud by shooting flames
|
||||
+ */
|
||||
+public class EnderDragonFlameEvent extends EntityEvent implements Cancellable {
|
||||
+ @NotNull private final AreaEffectCloud areaEffectCloud;
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ @NotNull private final AreaEffectCloud areaEffectCloud;
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EnderDragonFlameEvent(@NotNull EnderDragon enderDragon, @NotNull AreaEffectCloud areaEffectCloud) {
|
||||
+ super(enderDragon);
|
||||
+ this.areaEffectCloud = areaEffectCloud;
|
||||
|
@ -127,39 +135,35 @@ index 0000000000000000000000000000000000000000..1915177f4b8f8013656fbdb41240f6c5
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public AreaEffectCloud getAreaEffectCloud() {
|
||||
+ return areaEffectCloud;
|
||||
+ return this.areaEffectCloud;
|
||||
+ }
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8414bd805ec68d7b305fbf645c59f8d5b762c9ce
|
||||
index 0000000000000000000000000000000000000000..3c6c3db37d91aad3638aef107a3bf8ca1d4f7085
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonShootFireballEvent.java
|
||||
@@ -0,0 +1,61 @@
|
||||
@@ -0,0 +1,64 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.DragonFireball;
|
||||
|
@ -167,14 +171,20 @@ index 0000000000000000000000000000000000000000..8414bd805ec68d7b305fbf645c59f8d5
|
|||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when an EnderDragon shoots a fireball
|
||||
+ */
|
||||
+public class EnderDragonShootFireballEvent extends EntityEvent implements Cancellable {
|
||||
+ @NotNull private final DragonFireball fireball;
|
||||
+
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ @NotNull private final DragonFireball fireball;
|
||||
+ private boolean cancelled;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EnderDragonShootFireballEvent(@NotNull EnderDragon entity, @NotNull DragonFireball fireball) {
|
||||
+ super(entity);
|
||||
+ this.fireball = fireball;
|
||||
|
@ -194,30 +204,27 @@ index 0000000000000000000000000000000000000000..8414bd805ec68d7b305fbf645c59f8d5
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public DragonFireball getFireball() {
|
||||
+ return fireball;
|
||||
+ return this.fireball;
|
||||
+ }
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ return this.cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ this.cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue