Convert game thread events to singletons (#794)
* Convert game thread events to singletons * Fix checkstyle * Fix copy paste error
This commit is contained in:
@@ -20,6 +20,13 @@ import net.runelite.api.Actor;
|
||||
@Data
|
||||
public class AnimationChanged
|
||||
{
|
||||
public static final AnimationChanged INSTANCE = new AnimationChanged();
|
||||
|
||||
private AnimationChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The actor that has entered a new animation.
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class AreaSoundEffectPlayed
|
||||
{
|
||||
public static final AreaSoundEffectPlayed INSTANCE = new AreaSoundEffectPlayed();
|
||||
|
||||
private AreaSoundEffectPlayed()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private int soundId;
|
||||
private int sceneX;
|
||||
private int sceneY;
|
||||
|
||||
@@ -29,6 +29,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class BeforeMenuRender
|
||||
{
|
||||
public static final BeforeMenuRender INSTANCE = new BeforeMenuRender();
|
||||
|
||||
private BeforeMenuRender()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private boolean consumed;
|
||||
|
||||
public void consume()
|
||||
|
||||
@@ -29,4 +29,10 @@ package net.runelite.api.events;
|
||||
*/
|
||||
public class BeforeRender
|
||||
{
|
||||
public static final BeforeRender INSTANCE = new BeforeRender();
|
||||
|
||||
private BeforeRender()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class BoostedLevelChanged
|
||||
{
|
||||
public static final BoostedLevelChanged INSTANCE = new BoostedLevelChanged();
|
||||
|
||||
private BoostedLevelChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The skill that has had its level modified.
|
||||
*/
|
||||
|
||||
@@ -29,4 +29,10 @@ package net.runelite.api.events;
|
||||
*/
|
||||
public class CannonballFired
|
||||
{
|
||||
public static final CannonballFired INSTANCE = new CannonballFired();
|
||||
|
||||
private CannonballFired()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.MessageNode;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* An event where a new chat message is received.
|
||||
@@ -40,9 +39,15 @@ import lombok.NoArgsConstructor;
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChatMessage
|
||||
{
|
||||
public static final ChatMessage INSTANCE = new ChatMessage();
|
||||
|
||||
private ChatMessage()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The underlying MessageNode for the message.
|
||||
*/
|
||||
|
||||
@@ -24,14 +24,21 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where the client has joined or left a clan chat.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class ClanChanged
|
||||
{
|
||||
public static final ClanChanged INSTANCE = new ClanChanged();
|
||||
|
||||
private ClanChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the client is now in a clan chat.
|
||||
*/
|
||||
|
||||
@@ -25,11 +25,18 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.ClanMember;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
@Value
|
||||
@Data
|
||||
public class ClanMemberJoined
|
||||
{
|
||||
public static final ClanMemberJoined INSTANCE = new ClanMemberJoined();
|
||||
|
||||
private ClanMemberJoined()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The ClanMember that joined
|
||||
*/
|
||||
|
||||
@@ -25,11 +25,18 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.ClanMember;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
@Value
|
||||
@Data
|
||||
public class ClanMemberLeft
|
||||
{
|
||||
public static final ClanMemberLeft INSTANCE = new ClanMemberLeft();
|
||||
|
||||
private ClanMemberLeft()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The ClanMember that left
|
||||
*/
|
||||
|
||||
@@ -29,4 +29,10 @@ package net.runelite.api.events;
|
||||
*/
|
||||
public class ClientTick
|
||||
{
|
||||
public static final ClientTick INSTANCE = new ClientTick();
|
||||
|
||||
private ClientTick()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a command has been used in the chat.
|
||||
@@ -41,9 +41,16 @@ import lombok.Value;
|
||||
* set the command field to an empty string. For example, the message ":: hello world!"
|
||||
* will set command to "" and arguments to ["hello", "world!"].
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class CommandExecuted
|
||||
{
|
||||
public static final CommandExecuted INSTANCE = new CommandExecuted();
|
||||
|
||||
private CommandExecuted()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the command entered.
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DecorativeObjectChanged
|
||||
{
|
||||
public static final DecorativeObjectChanged INSTANCE = new DecorativeObjectChanged();
|
||||
|
||||
private DecorativeObjectChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DecorativeObjectDespawned
|
||||
{
|
||||
public static final DecorativeObjectDespawned INSTANCE = new DecorativeObjectDespawned();
|
||||
|
||||
private DecorativeObjectDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DecorativeObjectSpawned
|
||||
{
|
||||
public static final DecorativeObjectSpawned INSTANCE = new DecorativeObjectSpawned();
|
||||
|
||||
private DecorativeObjectSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class DraggingWidgetChanged
|
||||
{
|
||||
public static final DraggingWidgetChanged INSTANCE = new DraggingWidgetChanged();
|
||||
|
||||
private DraggingWidgetChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a widget is currently being dragged.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ExperienceChanged
|
||||
{
|
||||
public static final ExperienceChanged INSTANCE = new ExperienceChanged();
|
||||
|
||||
private ExperienceChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The modified skill.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import net.runelite.api.Tile;
|
||||
@Data
|
||||
public class GameObjectChanged
|
||||
{
|
||||
public static final GameObjectChanged INSTANCE = new GameObjectChanged();
|
||||
|
||||
private GameObjectChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GameObjectDespawned
|
||||
{
|
||||
public static final GameObjectDespawned INSTANCE = new GameObjectDespawned();
|
||||
|
||||
private GameObjectDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GameObjectSpawned
|
||||
{
|
||||
public static final GameObjectSpawned INSTANCE = new GameObjectSpawned();
|
||||
|
||||
private GameObjectSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GameStateChanged
|
||||
{
|
||||
public static final GameStateChanged INSTANCE = new GameStateChanged();
|
||||
|
||||
private GameStateChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The new game state.
|
||||
*/
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
// The NPC update event seem to run every server tick,
|
||||
// but having the game tick event after all packets
|
||||
// have been processed is typically more useful.
|
||||
@@ -43,7 +41,12 @@ import lombok.Data;
|
||||
* Note that occurrences that take place purely on the client, such as right
|
||||
* click menus, are independent of the game tick.
|
||||
*/
|
||||
@Data
|
||||
public class GameTick
|
||||
{
|
||||
public static final GameTick INSTANCE = new GameTick();
|
||||
|
||||
private GameTick()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GrandExchangeOfferChanged
|
||||
{
|
||||
public static final GrandExchangeOfferChanged INSTANCE = new GrandExchangeOfferChanged();
|
||||
|
||||
private GrandExchangeOfferChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The offer that has been modified.
|
||||
*/
|
||||
|
||||
@@ -25,16 +25,24 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.GraphicsObject;
|
||||
import lombok.Value;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a new {@link GraphicsObject} has been created.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class GraphicsObjectCreated
|
||||
{
|
||||
public static final GraphicsObjectCreated INSTANCE = new GraphicsObjectCreated();
|
||||
|
||||
private GraphicsObjectCreated()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The newly created graphics object.
|
||||
*/
|
||||
private final GraphicsObject graphicsObject;
|
||||
private GraphicsObject graphicsObject;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GroundObjectChanged
|
||||
{
|
||||
public static final GroundObjectChanged INSTANCE = new GroundObjectChanged();
|
||||
|
||||
private GroundObjectChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GroundObjectDespawned
|
||||
{
|
||||
public static final GroundObjectDespawned INSTANCE = new GroundObjectDespawned();
|
||||
|
||||
private GroundObjectDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class GroundObjectSpawned
|
||||
{
|
||||
public static final GroundObjectSpawned INSTANCE = new GroundObjectSpawned();
|
||||
|
||||
private GroundObjectSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class HitsplatApplied
|
||||
{
|
||||
public static final HitsplatApplied INSTANCE = new HitsplatApplied();
|
||||
|
||||
private HitsplatApplied()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The actor the hitsplat was applied to.
|
||||
*/
|
||||
|
||||
@@ -30,5 +30,12 @@ import lombok.Data;
|
||||
@Data
|
||||
public class InteractChanged
|
||||
{
|
||||
public static final InteractChanged INSTANCE = new InteractChanged();
|
||||
|
||||
private InteractChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private Actor actor;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import lombok.Value;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event called when the actor an actor is interacting with changes
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class InteractingChanged
|
||||
{
|
||||
private final Actor source;
|
||||
public static final InteractingChanged INSTANCE = new InteractingChanged();
|
||||
|
||||
private InteractingChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private Actor source;
|
||||
|
||||
/**
|
||||
* Target actor, may be null
|
||||
*/
|
||||
private final Actor target;
|
||||
private Actor target;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.ItemContainer;
|
||||
import lombok.Value;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event called whenever the stack size of an {@link api.Item}
|
||||
@@ -38,11 +39,18 @@ import lombok.Value;
|
||||
* <li>Dropping an item</li>
|
||||
* </ul>
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class ItemContainerChanged
|
||||
{
|
||||
public static final ItemContainerChanged INSTANCE = new ItemContainerChanged();
|
||||
|
||||
private ItemContainerChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The modified item container.
|
||||
*/
|
||||
private final ItemContainer itemContainer;
|
||||
private ItemContainer itemContainer;
|
||||
}
|
||||
|
||||
@@ -26,15 +26,23 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.Tile;
|
||||
import lombok.Value;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Called when an item pile despawns from the ground. When the client loads a new scene,
|
||||
* all item piles are implicitly despawned, and despawn events will not be sent.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class ItemDespawned
|
||||
{
|
||||
private final Tile tile;
|
||||
private final Item item;
|
||||
public static final ItemDespawned INSTANCE = new ItemDespawned();
|
||||
|
||||
private ItemDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private Tile tile;
|
||||
private Item item;
|
||||
}
|
||||
|
||||
@@ -26,16 +26,23 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.Tile;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Called when the quantity of an item pile changes.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class ItemQuantityChanged
|
||||
{
|
||||
private final Item item;
|
||||
private final Tile tile;
|
||||
private final int oldQuantity;
|
||||
private final int newQuantity;
|
||||
public static final ItemQuantityChanged INSTANCE = new ItemQuantityChanged();
|
||||
|
||||
private ItemQuantityChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private Item item;
|
||||
private Tile tile;
|
||||
private int oldQuantity;
|
||||
private int newQuantity;
|
||||
}
|
||||
|
||||
@@ -26,15 +26,22 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Item;
|
||||
import net.runelite.api.Tile;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Called when an item pile spawns on the ground. When the client loads a new scene,
|
||||
* all item piles are implicitly reset and a new spawn event will be sent.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class ItemSpawned
|
||||
{
|
||||
private final Tile tile;
|
||||
private final Item item;
|
||||
public static final ItemSpawned INSTANCE = new ItemSpawned();
|
||||
|
||||
private ItemSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private Tile tile;
|
||||
private Item item;
|
||||
}
|
||||
|
||||
@@ -29,4 +29,10 @@ package net.runelite.api.events;
|
||||
*/
|
||||
public class LocalPlayerDeath
|
||||
{
|
||||
public static final LocalPlayerDeath INSTANCE = new LocalPlayerDeath();
|
||||
|
||||
private LocalPlayerDeath()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +35,17 @@ import net.runelite.api.MenuEntry;
|
||||
@AllArgsConstructor
|
||||
public class MenuEntryAdded
|
||||
{
|
||||
public static final MenuEntryAdded INSTANCE = new MenuEntryAdded();
|
||||
|
||||
private MenuEntryAdded()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The MenuEntry object that was actually added
|
||||
*/
|
||||
private final MenuEntry menuEntry;
|
||||
private MenuEntry menuEntry;
|
||||
|
||||
public String getOption()
|
||||
{
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MenuOpened
|
||||
{
|
||||
public static final MenuOpened INSTANCE = new MenuOpened();
|
||||
|
||||
private MenuOpened()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The menu entries in the newly opened menu.
|
||||
* <p>
|
||||
|
||||
@@ -42,6 +42,13 @@ import net.runelite.api.MenuEntry;
|
||||
@Data
|
||||
public class MenuOptionClicked
|
||||
{
|
||||
public static final MenuOptionClicked INSTANCE = new MenuOptionClicked();
|
||||
|
||||
private MenuOptionClicked()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
public MenuOptionClicked(MenuEntry entry)
|
||||
{
|
||||
menuEntry = entry;
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MenuShouldLeftClick
|
||||
{
|
||||
public static final MenuShouldLeftClick INSTANCE = new MenuShouldLeftClick();
|
||||
|
||||
private MenuShouldLeftClick()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to true, the menu will open on left click.
|
||||
*/
|
||||
|
||||
@@ -25,16 +25,23 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Nameable;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a {@link Nameable} has had their name changed.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class NameableNameChanged
|
||||
{
|
||||
public static final NameableNameChanged INSTANCE = new NameableNameChanged();
|
||||
|
||||
private NameableNameChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The nameable that changed names.
|
||||
*/
|
||||
private final Nameable nameable;
|
||||
private Nameable nameable;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,13 @@ import net.runelite.api.NPCDefinition;
|
||||
@Data
|
||||
public class NpcActionChanged
|
||||
{
|
||||
public static final NpcActionChanged INSTANCE = new NpcActionChanged();
|
||||
|
||||
private NpcActionChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The NPC composition that has been changed.
|
||||
*/
|
||||
|
||||
@@ -26,18 +26,25 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.NPC;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where an {@link NPC} has despawned.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class NpcDespawned
|
||||
{
|
||||
public static final NpcDespawned INSTANCE = new NpcDespawned();
|
||||
|
||||
private NpcDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The despawned NPC.
|
||||
*/
|
||||
private final NPC npc;
|
||||
private NPC npc;
|
||||
|
||||
public Actor getActor()
|
||||
{
|
||||
|
||||
@@ -26,18 +26,25 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.NPC;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where an {@link NPC} has spawned.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class NpcSpawned
|
||||
{
|
||||
public static final NpcSpawned INSTANCE = new NpcSpawned();
|
||||
|
||||
private NpcSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The spawned NPC.
|
||||
*/
|
||||
private final NPC npc;
|
||||
private NPC npc;
|
||||
|
||||
public Actor getActor()
|
||||
{
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
@Value
|
||||
@Data
|
||||
public class OverheadTextChanged
|
||||
{
|
||||
private final Actor actor;
|
||||
public static final OverheadTextChanged INSTANCE = new OverheadTextChanged();
|
||||
|
||||
private final String overheadText;
|
||||
private OverheadTextChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private Actor actor;
|
||||
|
||||
private String overheadText;
|
||||
}
|
||||
@@ -26,20 +26,27 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Player;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a {@link Player} has despawned.
|
||||
* <p>
|
||||
* Note: This event does not get called for the local player.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class PlayerDespawned
|
||||
{
|
||||
public static final PlayerDespawned INSTANCE = new PlayerDespawned();
|
||||
|
||||
private PlayerDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The despawned player.
|
||||
*/
|
||||
private final Player player;
|
||||
private Player player;
|
||||
|
||||
public Actor getActor()
|
||||
{
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PlayerMenuOptionClicked
|
||||
{
|
||||
public static final PlayerMenuOptionClicked INSTANCE = new PlayerMenuOptionClicked();
|
||||
|
||||
private PlayerMenuOptionClicked()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The menu option clicked.
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PlayerMenuOptionsChanged
|
||||
{
|
||||
public static final PlayerMenuOptionsChanged INSTANCE = new PlayerMenuOptionsChanged();
|
||||
|
||||
private PlayerMenuOptionsChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* Index in playerOptions which changed.
|
||||
*/
|
||||
|
||||
@@ -26,18 +26,25 @@ package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Player;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a {@link Player} has spawned.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class PlayerSpawned
|
||||
{
|
||||
public static final PlayerSpawned INSTANCE = new PlayerSpawned();
|
||||
|
||||
private PlayerSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The spawned player.
|
||||
*/
|
||||
private final Player player;
|
||||
private Player player;
|
||||
|
||||
public Actor getActor()
|
||||
{
|
||||
|
||||
@@ -30,5 +30,12 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PostHealthBar
|
||||
{
|
||||
public static final PostHealthBar INSTANCE = new PostHealthBar();
|
||||
|
||||
private PostHealthBar()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private HealthBar healthBar;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@ import net.runelite.api.ItemDefinition;
|
||||
@Data
|
||||
public class PostItemDefinition
|
||||
{
|
||||
public static final PostItemDefinition INSTANCE = new PostItemDefinition();
|
||||
|
||||
private PostItemDefinition()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The newly created item.
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ProjectileMoved
|
||||
{
|
||||
public static final ProjectileMoved INSTANCE = new ProjectileMoved();
|
||||
|
||||
private ProjectileMoved()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The projectile being moved.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ProjectileSpawned
|
||||
{
|
||||
public static final ProjectileSpawned INSTANCE = new ProjectileSpawned();
|
||||
|
||||
private ProjectileSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The spawned projectile.
|
||||
*/
|
||||
|
||||
@@ -24,16 +24,23 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a request to remove a friend is sent to the server.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class RemovedFriend
|
||||
{
|
||||
public static final RemovedFriend INSTANCE = new RemovedFriend();
|
||||
|
||||
private RemovedFriend()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the removed friend.
|
||||
*/
|
||||
private final String name;
|
||||
private String name;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ResizeableChanged
|
||||
{
|
||||
public static final ResizeableChanged INSTANCE = new ResizeableChanged();
|
||||
|
||||
private ResizeableChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the game is in resizable mode.
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class ScriptCallbackEvent
|
||||
{
|
||||
public static final ScriptCallbackEvent INSTANCE = new ScriptCallbackEvent();
|
||||
|
||||
private ScriptCallbackEvent()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The script being called.
|
||||
*/
|
||||
|
||||
@@ -29,6 +29,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class SoundEffectPlayed
|
||||
{
|
||||
public static final SoundEffectPlayed INSTANCE = new SoundEffectPlayed();
|
||||
|
||||
private SoundEffectPlayed()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private int soundId;
|
||||
private int delay;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,13 @@ import net.runelite.api.Actor;
|
||||
@Data
|
||||
public class SpotAnimationChanged
|
||||
{
|
||||
public static final SpotAnimationChanged INSTANCE = new SpotAnimationChanged();
|
||||
|
||||
private SpotAnimationChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The actor that has had their graphic changed.
|
||||
*/
|
||||
|
||||
@@ -32,4 +32,10 @@ package net.runelite.api.events;
|
||||
*/
|
||||
public class UsernameChanged
|
||||
{
|
||||
public static final UsernameChanged INSTANCE = new UsernameChanged();
|
||||
|
||||
private UsernameChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,13 +25,20 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a varbit integer has changed.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class VarClientIntChanged
|
||||
{
|
||||
public static final VarClientIntChanged INSTANCE = new VarClientIntChanged();
|
||||
|
||||
private VarClientIntChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private int index;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,20 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* An event where a varbit string has changed.
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class VarClientStrChanged
|
||||
{
|
||||
public static final VarClientStrChanged INSTANCE = new VarClientStrChanged();
|
||||
|
||||
private VarClientStrChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private int index;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class VarbitChanged
|
||||
{
|
||||
public static final VarbitChanged INSTANCE = new VarbitChanged();
|
||||
|
||||
private VarbitChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* Index in the varp array that was changed.
|
||||
* For varplayer, this is the varplayer id.
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class WallObjectChanged
|
||||
{
|
||||
public static final WallObjectChanged INSTANCE = new WallObjectChanged();
|
||||
|
||||
private WallObjectChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class WallObjectDespawned
|
||||
{
|
||||
public static final WallObjectDespawned INSTANCE = new WallObjectDespawned();
|
||||
|
||||
private WallObjectDespawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class WallObjectSpawned
|
||||
{
|
||||
public static final WallObjectSpawned INSTANCE = new WallObjectSpawned();
|
||||
|
||||
private WallObjectSpawned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected tile.
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class WidgetHiddenChanged
|
||||
{
|
||||
public static final WidgetHiddenChanged INSTANCE = new WidgetHiddenChanged();
|
||||
|
||||
private WidgetHiddenChanged()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The affected widget.
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class WidgetLoaded
|
||||
{
|
||||
public static final WidgetLoaded INSTANCE = new WidgetLoaded();
|
||||
|
||||
private WidgetLoaded()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The group ID of the loaded widget.
|
||||
*/
|
||||
|
||||
@@ -33,6 +33,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class WidgetMenuOptionClicked
|
||||
{
|
||||
public static final WidgetMenuOptionClicked INSTANCE = new WidgetMenuOptionClicked();
|
||||
|
||||
private WidgetMenuOptionClicked()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
/**
|
||||
* The clicked menu option.
|
||||
*/
|
||||
|
||||
@@ -24,13 +24,16 @@
|
||||
*/
|
||||
package net.runelite.api.events;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
/**
|
||||
* An event where the position of a {@link net.runelite.api.widgets.Widget}
|
||||
* relative to its parent has changed.
|
||||
*/
|
||||
@Value
|
||||
public class WidgetPositioned
|
||||
{
|
||||
public static final WidgetPositioned INSTANCE = new WidgetPositioned();
|
||||
|
||||
private WidgetPositioned()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,13 +25,20 @@
|
||||
package net.runelite.api.events;
|
||||
|
||||
import net.runelite.api.World;
|
||||
import lombok.Value;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Event when the world list is loaded for the world switcher
|
||||
*/
|
||||
@Value
|
||||
@Data
|
||||
public class WorldListLoad
|
||||
{
|
||||
private final World[] worlds;
|
||||
public static final WorldListLoad INSTANCE = new WorldListLoad();
|
||||
|
||||
private WorldListLoad()
|
||||
{
|
||||
// noop
|
||||
}
|
||||
|
||||
private World[] worlds;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user