mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 17:37:42 +01:00
Make CancellableEvent a trait
This commit is contained in:
parent
dd44b752c3
commit
16d8597195
@ -1,6 +1,7 @@
|
||||
package net.minestom.server.event;
|
||||
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class EventDispatcher {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.minestom.server.event;
|
||||
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.tag.Tag;
|
||||
import net.minestom.server.tag.TagReadable;
|
||||
import net.minestom.server.utils.validate.Check;
|
||||
|
@ -3,7 +3,7 @@ package net.minestom.server.event.entity;
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.entity.LivingEntity;
|
||||
import net.minestom.server.entity.damage.DamageType;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.entity;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.utils.time.TimeUnit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -2,7 +2,7 @@ package net.minestom.server.event.entity;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.entity.ItemEntity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.entity;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.utils.Position;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.entity;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.utils.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.instance;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.event.trait.InstanceEvent;
|
||||
import net.minestom.server.instance.Instance;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.instance;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.event.trait.InstanceEvent;
|
||||
import net.minestom.server.instance.Instance;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.inventory;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.InventoryEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.inventory.Inventory;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.inventory;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.InventoryEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.inventory.Inventory;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.item;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.ItemEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.item;
|
||||
|
||||
import net.minestom.server.entity.ExperienceOrb;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PickupExperienceEvent implements CancellableEvent {
|
||||
|
@ -3,7 +3,7 @@ package net.minestom.server.event.item;
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.entity.ItemEntity;
|
||||
import net.minestom.server.entity.LivingEntity;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.EntityEvent;
|
||||
import net.minestom.server.event.trait.ItemEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
|
@ -2,8 +2,7 @@ package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.instance.block.BlockManager;
|
||||
import net.minestom.server.instance.block.CustomBlock;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.instance.block.BlockFace;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
|
@ -3,8 +3,7 @@ package net.minestom.server.event.player;
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.data.Data;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.instance.block.Block;
|
||||
import net.minestom.server.instance.block.BlockManager;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.utils.MathUtils;
|
||||
import net.minestom.server.utils.validate.Check;
|
||||
|
@ -3,8 +3,7 @@ package net.minestom.server.event.player;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.minestom.server.chat.JsonMessage;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.utils.Position;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.network.packet.client.ClientPacket;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.player;
|
||||
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.event.trait.ItemEvent;
|
||||
import net.minestom.server.event.trait.PlayerEvent;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.event.server;
|
||||
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.network.player.PlayerConnection;
|
||||
import net.minestom.server.ping.ResponseData;
|
||||
import net.minestom.server.ping.ResponseDataConsumer;
|
||||
|
@ -1,4 +1,7 @@
|
||||
package net.minestom.server.event;
|
||||
package net.minestom.server.event.trait;
|
||||
|
||||
import net.minestom.server.event.Event;
|
||||
import net.minestom.server.event.EventDispatcher;
|
||||
|
||||
/**
|
||||
* Represents an {@link Event} which can be cancelled.
|
@ -1,6 +1,6 @@
|
||||
package net.minestom.server.extras.query.event;
|
||||
|
||||
import net.minestom.server.event.CancellableEvent;
|
||||
import net.minestom.server.event.trait.CancellableEvent;
|
||||
import net.minestom.server.utils.binary.Writeable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user