[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002
2024-02-01 10:15:57 +01:00
parent d676979ea0
commit f7e469eb2e
187 changed files with 2415 additions and 2258 deletions

View File

@@ -14,6 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+import org.bukkit.block.Sign;
+import org.bukkit.block.sign.Side;
+import org.bukkit.entity.HumanEntity;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
@@ -27,12 +28,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * Cancelling this event stops the sign editing menu from opening.
+ */
+public class PlayerOpenSignEvent extends PlayerEvent implements Cancellable {
+
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+ private boolean cancel = false;
+
+ private final Sign sign;
+ private final Side side;
+ private final Cause cause;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
+ public PlayerOpenSignEvent(final @NotNull Player editor, final @NotNull Sign sign, final @NotNull Side side, final @NotNull Cause cause) {
+ super(editor);
@@ -48,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @NotNull
+ public Sign getSign() {
+ return sign;
+ return this.sign;
+ }
+
+ /**
@@ -59,7 +63,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ @NotNull
+ public Side getSide() {
+ return side;
+ return this.side;
+ }
+
+ /**
@@ -68,17 +72,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * @return the cause
+ */
+ public @NotNull Cause getCause() {
+ return cause;
+ return this.cause;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return cancel;
+ return this.cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancel) {
+ this.cancel = cancel;
+ this.cancelled = cancel;
+ }
+
+ @NotNull
@@ -105,7 +109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ INTERACT,
+ /**
+ * The event was triggered via a plugin with {@link org.bukkit.entity.HumanEntity#openSign(Sign, Side)}
+ * The event was triggered via a plugin with {@link HumanEntity#openSign(Sign, Side)}
+ */
+ PLUGIN,
+ /**