Small context key cleanup.
import org.spongepowered.api.Sponge;
import org.spongepowered.api.block.BlockSnapshot;
+import org.spongepowered.api.block.BlockState;
import org.spongepowered.api.block.BlockTypes;
import org.spongepowered.api.data.type.HandType;
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.text.channel.MessageChannel;
import org.spongepowered.api.text.channel.MessageReceiver;
import org.spongepowered.api.world.LocatableBlock;
+import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.ServerLocation;
import org.spongepowered.api.world.World;
import org.spongepowered.api.world.explosion.Explosion;
/**
* Represents the command string that was provided to the command processor.
*/
- public static final Supplier<EventContextKey<String>> COMMAND_STRING = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "COMMAND_STRING");
+ public static final Supplier<EventContextKey<String>> COMMAND = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "COMMAND");
/**
- * Represents the creator of an {@link Entity}.
+ * Represents the creator of an {@link Entity} or a {@link BlockState} at a {@link Location}
*/
public static final Supplier<EventContextKey<User>> CREATOR = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "CREATOR");
public static final Supplier<EventContextKey<ChangeBlockEvent.Grow>> GROW_EVENT = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "GROW_EVENT");
/**
- * Used when an {@link Entity} ignites causing an {@link Explosion}.
+ * Used when an {@link Living} ignites causing an {@link Explosion}.
*/
public static final Supplier<EventContextKey<Living>> IGNITER = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "IGNITER");
*/
public static final Supplier<EventContextKey<User>> NOTIFIER = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "NOTIFIER");
- /**
- * Represents the {@link User} that owns a block.
- */
- public static final Supplier<EventContextKey<User>> OWNER = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "OWNER");
-
/**
* Used when a {@link BlockTypes#PISTON_HEAD} extends.
*/
*/
public static final Supplier<EventContextKey<ServerWorld>> PLAYER_PLACE = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "PLAYER_PLACE");
- /**
- * Represents a simulated {@link Player}.
- */
- public static final Supplier<EventContextKey<GameProfile>> PLAYER_SIMULATED = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "PLAYER_SIMULATED");
-
/**
* Represents a {@link PluginContainer}.
*/
*/
public static final Supplier<EventContextKey<Vector3d>> ROTATION = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "ROTATION");
+ /**
+ * Represents a simulated {@link Player}.
+ */
+ public static final Supplier<EventContextKey<GameProfile>> SIMULATED_PLAYER = Sponge.getRegistry().getCatalogRegistry().provideSupplier(EventContextKey.class, "SIMULATED_PLAYER");
+
/**
* Represents the {@link SpawnType} of an entity spawn.
*/
