mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-04 00:31:54 +00:00
Plugins System (#510)
* Started Ripping Plugin System From Astraeus
*Currently only ClickingButtons Support
*Also Started Using The Logout Button Plugin From Astraeus
* NpcFirstClickEvent setup for plugins
also made Man & Women chat work through this
* Server: Add Google Collect Lib
* Server: NpcSecondClickEvent setup for plugins
also handle pickpocketing npc clicking through plugin
* Server: NpcThirdClickEvent setup for plugins
* Server: Remove conflicting action for Secondclicking npc id 3
* Server: ItemFirstClickEvent setup for plugins
Also Handle Yo-Yo First Click Through This
* Server: ItemOnItemEvent setup for plugins
Also Handle Black Candle Lighting With Tinderbox Through this
* Server: ItemOnNpcEvent setup for plugins
* Server: ItemOnObjectEvent setup for plugins
Also Handle Fillable Items Through This
* Server: ItemSecondClickEvent & ItemThirdClickEvent setup for plugins
Also Handle Yo-Yo Actions Through This
* Server: ObjectFirstClickEvent setup for plugins
Also Handle FirstClick Mining Actions Through This
* Server: ObjectSecondClickEvent setup for plugins
Also Handle Stall Thieving Actions Through This
* Server: ObjectThirdClickEvent setup for plugins
* Server: ObjectFourthClickEvent setup for plugins
Also Handle Fourth Click Farming Object Actions Through This
* Server: MagicOnItemEvent setup for plugins
Also Handle SuperHeat Through This
* More mage training arena (#509)
* Fixup points display
* Only allow players to deposit up to 12k at one time
* Apple damage and play animation
* Update order or prices
* Update Telekinetic.java
(cherry picked from commit ab3b1e9731)
Co-authored-by: RedSparr0w <RedSparr0w@users.noreply.github.com>
Co-authored-by: Danial <admin@redsparr0w.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
/**
|
||||
* An event which manages button actions.
|
||||
*
|
||||
* @author Ryley Kimmel <ryley.kimmel@live.com>
|
||||
*/
|
||||
public final class ButtonActionEvent implements Event {
|
||||
|
||||
/**
|
||||
* The id of the button.
|
||||
*/
|
||||
private final int button;
|
||||
|
||||
/**
|
||||
* Constructs a new {@link ButtonActionEvent} with the specified button id.
|
||||
*
|
||||
* @param button The buttons id.
|
||||
*/
|
||||
public ButtonActionEvent(int button) {
|
||||
this.button = button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the buttons id.
|
||||
*/
|
||||
public int getButton() {
|
||||
return button;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
/**
|
||||
* Represents a command event.
|
||||
*
|
||||
* @author Vult-R
|
||||
*/
|
||||
public final class CommandEvent implements Event {
|
||||
|
||||
/**
|
||||
* The name for this command.
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* The input for this command.
|
||||
*/
|
||||
private final String input;
|
||||
|
||||
/**
|
||||
* Creates the command.
|
||||
*/
|
||||
public CommandEvent(String name, String input) {
|
||||
this.name = name;
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of this command.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the input for this command.
|
||||
*/
|
||||
public String getInput() {
|
||||
return input;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public class DialogueEvent implements Event {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class DoorEvent implements Event {
|
||||
|
||||
private GameObject door;
|
||||
|
||||
public DoorEvent(GameObject door) {
|
||||
this.door = door;
|
||||
}
|
||||
|
||||
public GameObject getDoor() {
|
||||
return door;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.items.Item;
|
||||
|
||||
public final class ItemFirstClickEvent implements Event {
|
||||
|
||||
private final int item;
|
||||
|
||||
public ItemFirstClickEvent(int item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public int getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.items.Item;
|
||||
import com.rs2.game.players.Position;
|
||||
|
||||
public final class ItemOnGroundItemEvent implements Event {
|
||||
|
||||
private final Item used;
|
||||
|
||||
private final Item groundItem;
|
||||
|
||||
private final Position position;
|
||||
|
||||
public ItemOnGroundItemEvent(Item used, Item groundItem, Position position) {
|
||||
this.used = used;
|
||||
this.groundItem = groundItem;
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public Item getUsed() {
|
||||
return used;
|
||||
}
|
||||
|
||||
public Item getGroundItem() {
|
||||
return groundItem;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.items.Item;
|
||||
|
||||
public final class ItemOnItemEvent implements Event {
|
||||
|
||||
private final int used;
|
||||
|
||||
private final int with;
|
||||
|
||||
public ItemOnItemEvent(int used, int with) {
|
||||
this.used = used;
|
||||
this.with = with;
|
||||
}
|
||||
|
||||
public int getUsed() {
|
||||
return used;
|
||||
}
|
||||
|
||||
public int getUsedWith() {
|
||||
return with;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.items.Item;
|
||||
import com.rs2.game.npcs.Npc;
|
||||
|
||||
public final class ItemOnNpcEvent implements Event {
|
||||
|
||||
private final int item;
|
||||
|
||||
private final int npc;
|
||||
|
||||
private final int clicked;
|
||||
|
||||
public ItemOnNpcEvent(int item, int npc, int clicked) {
|
||||
this.item = item;
|
||||
this.npc = npc;
|
||||
this.clicked = clicked;
|
||||
}
|
||||
|
||||
public int getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public int getNpc() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
public int getNpcClicked() {
|
||||
return clicked;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.items.Item;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class ItemOnObjectEvent implements Event {
|
||||
|
||||
private final int item;
|
||||
|
||||
private final int gameObject;
|
||||
|
||||
public ItemOnObjectEvent(int item, int gameObject) {
|
||||
this.item = item;
|
||||
this.gameObject = gameObject;
|
||||
}
|
||||
|
||||
public int getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public int getGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.items.Item;
|
||||
import com.rs2.game.players.Player;
|
||||
|
||||
public final class ItemOnPlayerEvent implements Event {
|
||||
|
||||
private final Item used;
|
||||
|
||||
private final Player usedWith;
|
||||
|
||||
public ItemOnPlayerEvent(Item used, Player usedWith) {
|
||||
this.used = used;
|
||||
this.usedWith = usedWith;
|
||||
}
|
||||
|
||||
public Item getUsed() {
|
||||
return used;
|
||||
}
|
||||
|
||||
public Player getUsedWith() {
|
||||
return usedWith;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class ItemSecondClickEvent implements Event {
|
||||
|
||||
|
||||
private final int id;
|
||||
|
||||
public ItemSecondClickEvent(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class ItemThirdClickEvent implements Event {
|
||||
|
||||
private final int id;
|
||||
|
||||
public ItemThirdClickEvent(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class MagicOnItemEvent implements Event {
|
||||
|
||||
private final int itemId;
|
||||
|
||||
private final int slot;
|
||||
|
||||
|
||||
private final int spellId;
|
||||
|
||||
public MagicOnItemEvent(int itemId, int slot, int spellId) {
|
||||
this.itemId = itemId;
|
||||
this.slot = slot;
|
||||
this.spellId = spellId;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public int getSlot() {
|
||||
return slot;
|
||||
}
|
||||
|
||||
public int getSpellId() {
|
||||
return spellId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class NpcFirstClickEvent implements Event {
|
||||
private final int npc;
|
||||
|
||||
public NpcFirstClickEvent(int npc) {
|
||||
this.npc = npc;
|
||||
}
|
||||
|
||||
public int getNpc() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.npcs.Npc;
|
||||
|
||||
public final class NpcSecondClickEvent implements Event {
|
||||
|
||||
private final int npc;
|
||||
|
||||
public NpcSecondClickEvent(int npc) {
|
||||
this.npc = npc;
|
||||
}
|
||||
|
||||
public int getNpc() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.game.npcs.Npc;
|
||||
|
||||
public final class NpcThirdClickEvent implements Event {
|
||||
|
||||
private final int npc;
|
||||
|
||||
public NpcThirdClickEvent(int npc) {
|
||||
this.npc = npc;
|
||||
}
|
||||
|
||||
public int getNpc() {
|
||||
return npc;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class ObjectFifthClickEvent implements Event {
|
||||
|
||||
private final GameObject gameObject;
|
||||
|
||||
public ObjectFifthClickEvent(GameObject gameObject) {
|
||||
this.gameObject = gameObject;
|
||||
}
|
||||
|
||||
public GameObject getGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class ObjectFirstClickEvent implements Event {
|
||||
|
||||
private final int gameObject;
|
||||
|
||||
public ObjectFirstClickEvent(int gameObject) {
|
||||
this.gameObject = gameObject;
|
||||
}
|
||||
|
||||
public int getGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class ObjectFourthClickEvent implements Event {
|
||||
|
||||
private final int gameObject;
|
||||
|
||||
public ObjectFourthClickEvent(int gameObject) {
|
||||
this.gameObject = gameObject;
|
||||
}
|
||||
|
||||
public int getGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class ObjectSecondClickEvent implements Event {
|
||||
|
||||
private final int gameObject;
|
||||
|
||||
public ObjectSecondClickEvent(int gameObject) {
|
||||
this.gameObject = gameObject;
|
||||
}
|
||||
|
||||
public int getGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
import com.rs2.world.GameObject;
|
||||
|
||||
public final class ObjectThirdClickEvent implements Event {
|
||||
|
||||
private final int gameObject;
|
||||
|
||||
public ObjectThirdClickEvent(int gameObject) {
|
||||
this.gameObject = gameObject;
|
||||
}
|
||||
|
||||
public int getGameObject() {
|
||||
return gameObject;
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class WidgetContainerFirstOptionEvent implements Event {
|
||||
|
||||
private final int widgetId;
|
||||
|
||||
private final int itemSlot;
|
||||
|
||||
private final int itemId;
|
||||
|
||||
public WidgetContainerFirstOptionEvent(int widgetId, int itemId, int itemSlot) {
|
||||
this.widgetId = widgetId;
|
||||
this.itemId = itemId;
|
||||
this.itemSlot = itemSlot;
|
||||
}
|
||||
|
||||
public int getWidgetId() {
|
||||
return widgetId;
|
||||
}
|
||||
|
||||
public int getItemSlot() {
|
||||
return itemSlot;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class WidgetContainerFourthOptionEvent implements Event {
|
||||
|
||||
private final int widgetId;
|
||||
|
||||
private final int itemSlot;
|
||||
|
||||
private final int itemId;
|
||||
|
||||
public WidgetContainerFourthOptionEvent(int widgetId, int itemId, int itemSlot) {
|
||||
this.widgetId = widgetId;
|
||||
this.itemId = itemId;
|
||||
this.itemSlot = itemSlot;
|
||||
}
|
||||
|
||||
public int getWidgetId() {
|
||||
return widgetId;
|
||||
}
|
||||
|
||||
public int getItemSlot() {
|
||||
return itemSlot;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class WidgetContainerSecondOptionEvent implements Event {
|
||||
|
||||
private final int widgetId;
|
||||
|
||||
private final int itemSlot;
|
||||
|
||||
private final int itemId;
|
||||
|
||||
public WidgetContainerSecondOptionEvent(int widgetId, int itemId, int itemSlot) {
|
||||
this.widgetId = widgetId;
|
||||
this.itemId = itemId;
|
||||
this.itemSlot = itemSlot;
|
||||
}
|
||||
|
||||
public int getWidgetId() {
|
||||
return widgetId;
|
||||
}
|
||||
|
||||
public int getItemSlot() {
|
||||
return itemSlot;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.rs2.event.impl;
|
||||
|
||||
import com.rs2.event.Event;
|
||||
|
||||
public final class WidgetContainerThirdOptionEvent implements Event {
|
||||
|
||||
private final int widgetId;
|
||||
|
||||
private final int itemSlot;
|
||||
|
||||
private final int itemId;
|
||||
|
||||
public WidgetContainerThirdOptionEvent(int widgetId, int itemId, int itemSlot) {
|
||||
this.widgetId = widgetId;
|
||||
this.itemId = itemId;
|
||||
this.itemSlot = itemSlot;
|
||||
}
|
||||
|
||||
public int getWidgetId() {
|
||||
return widgetId;
|
||||
}
|
||||
|
||||
public int getItemSlot() {
|
||||
return itemSlot;
|
||||
}
|
||||
|
||||
public int getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user