This commit is contained in:
PKLite
2019-07-29 14:15:24 -04:00
199 changed files with 2107 additions and 1348 deletions

View File

@@ -22,21 +22,21 @@
- [runescape-api](runescape-api/src/main/java/net/runelite) - Mappings correspond to these interfaces, runelite-api is a subset of this - [runescape-api](runescape-api/src/main/java/net/runelite) - Mappings correspond to these interfaces, runelite-api is a subset of this
- [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins - [runelite-client](runelite-client/src/main/java/net/runelite/client) - Game client with plugins
## Building
We have migrated the project to Gradle. Information on how to setup and build the project can be found at https://github.com/runelite-extended/runelite/wiki/Building-with-IntelliJ-IDEA
## Private Servers ## Private Servers
Currently we support RSMod which can be found at: https://github.com/Tomm0017/rsmod but should work with any server that follows osrs protocol. Currently we support RSMod which can be found at: https://github.com/Tomm0017/rsmod but should work with any server that follows osrs protocol.
``` ```
Jar/IntelliJ Jar/IntelliJ
Use -private-server arg. Use -rs=RSPS arg.
Exe Exe
Use --clientargs="--private-server" arg. Use --clientargs="--rs=RSPS" arg.
Using modified mixins is possible using -local-injected arg, but it looks in a very specific location.
(./injected-client/target/injected-client-X.X.XX-SNAPSHOT.jar) (X.X.XX must match current API version)
----- -----
Set codebase in ./codebase or in Private Server plugin and restart. Codebase is set to 127.0.0.1 by default and can be changed in the Private Server plugin (requires restart)
Update modulus in Private Server plugin. Update modulus in Private Server plugin.
Disable Default World plugin if you have it enabled, this causes issues with codebase. Disable Default World plugin if you have it enabled, this causes issues with codebase.

View File

@@ -27,6 +27,9 @@ allprojects {
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'checkstyle' apply plugin: 'checkstyle'
group = 'net.runelite'
version = '1.5.30-SNAPSHOT'
ext { ext {
rsversion = 181 rsversion = 181
cacheversion = 165 cacheversion = 165
@@ -36,12 +39,9 @@ allprojects {
gitDirty = localGitDirty gitDirty = localGitDirty
rootPath = rootDir.toString().replace('\\', '/') rootPath = rootDir.toString().replace('\\', '/')
injectedClassesPath = rootPath + "/injector-plugin/out/injected-client/" injectedClassesPath = rootPath + "/injected-client/build/libs/injected-client-" + version + ".jar"
} }
group = 'net.runelite'
version = '1.5.30-SNAPSHOT'
gradle.projectsEvaluated { gradle.projectsEvaluated {
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"

View File

@@ -1,6 +1,7 @@
import org.apache.tools.ant.filters.ReplaceTokens import org.apache.tools.ant.filters.ReplaceTokens
description = 'Web API' description = 'Web API'
dependencies { dependencies {
implementation project(':runelite-api')
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.0.1' implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.0.1'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26' implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26'

View File

@@ -34,6 +34,7 @@ import net.runelite.http.api.ws.messages.Handshake;
import net.runelite.http.api.ws.messages.LoginResponse; import net.runelite.http.api.ws.messages.LoginResponse;
import net.runelite.http.api.ws.messages.party.Join; import net.runelite.http.api.ws.messages.party.Join;
import net.runelite.http.api.ws.messages.party.Part; import net.runelite.http.api.ws.messages.party.Part;
import net.runelite.http.api.ws.messages.party.PartyChatMessage;
import net.runelite.http.api.ws.messages.party.UserJoin; import net.runelite.http.api.ws.messages.party.UserJoin;
import net.runelite.http.api.ws.messages.party.UserPart; import net.runelite.http.api.ws.messages.party.UserPart;
import net.runelite.http.api.ws.messages.party.UserSync; import net.runelite.http.api.ws.messages.party.UserSync;
@@ -52,6 +53,7 @@ public class WebsocketGsonFactory
messages.add(UserJoin.class); messages.add(UserJoin.class);
messages.add(UserPart.class); messages.add(UserPart.class);
messages.add(UserSync.class); messages.add(UserSync.class);
messages.add(PartyChatMessage.class);
MESSAGES = messages; MESSAGES = messages;
} }

View File

@@ -24,7 +24,9 @@
*/ */
package net.runelite.http.api.ws; package net.runelite.http.api.ws;
public class WebsocketMessage import net.runelite.api.events.Event;
public class WebsocketMessage implements Event
{ {
protected boolean _party; protected boolean _party;

View File

@@ -24,13 +24,14 @@
*/ */
package net.runelite.http.api.ws.messages; package net.runelite.http.api.ws.messages;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage; import net.runelite.http.api.ws.WebsocketMessage;
/** /**
* Called after a successful login to the server * Called after a successful login to the server
* @author Adam * @author Adam
*/ */
public class LoginResponse extends WebsocketMessage public class LoginResponse extends WebsocketMessage implements Event
{ {
private String username; private String username;

View File

@@ -27,11 +27,12 @@ package net.runelite.http.api.ws.messages.party;
import java.util.UUID; import java.util.UUID;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Value; import lombok.Value;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage; import net.runelite.http.api.ws.WebsocketMessage;
@Value @Value
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class Join extends WebsocketMessage public class Join extends WebsocketMessage implements Event
{ {
private final UUID partyId; private final UUID partyId;
private final String name; private final String name;

View File

@@ -24,8 +24,9 @@
*/ */
package net.runelite.http.api.ws.messages.party; package net.runelite.http.api.ws.messages.party;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage; import net.runelite.http.api.ws.WebsocketMessage;
public class Part extends WebsocketMessage public class Part extends WebsocketMessage implements Event
{ {
} }

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016-2017, Adam <Adam@sigterm.info> * Copyright (c) 2019, Tomas Slusny <slusnucky@gmail.com>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -22,17 +22,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package net.runelite.client; package net.runelite.http.api.ws.messages.party;
import com.google.inject.Guice; import lombok.Value;
import net.runelite.client.rs.ClientUpdateCheckMode; import net.runelite.api.events.Event;
import org.junit.Test; @Value
public class PartyChatMessage extends PartyMemberMessage implements Event
public class RuneLiteModuleTest
{ {
@Test private final String value;
public void testConfigure()
{
Guice.createInjector(new RuneLiteModule(ClientUpdateCheckMode.AUTO, true));
}
} }

View File

@@ -3,10 +3,11 @@ package net.runelite.http.api.ws.messages.party;
import java.util.UUID; import java.util.UUID;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import net.runelite.api.events.Event;
@Getter @Getter
@Setter @Setter
public abstract class PartyMemberMessage extends PartyMessage public abstract class PartyMemberMessage extends PartyMessage implements Event
{ {
private UUID memberId; private UUID memberId;
} }

View File

@@ -24,9 +24,10 @@
*/ */
package net.runelite.http.api.ws.messages.party; package net.runelite.http.api.ws.messages.party;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage; import net.runelite.http.api.ws.WebsocketMessage;
public abstract class PartyMessage extends WebsocketMessage public abstract class PartyMessage extends WebsocketMessage implements Event
{ {
public PartyMessage() public PartyMessage()
{ {

View File

@@ -27,11 +27,12 @@ package net.runelite.http.api.ws.messages.party;
import java.util.UUID; import java.util.UUID;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Value; import lombok.Value;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage; import net.runelite.http.api.ws.WebsocketMessage;
@Value @Value
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class UserJoin extends WebsocketMessage public class UserJoin extends WebsocketMessage implements Event
{ {
private final UUID memberId; private final UUID memberId;
private final UUID partyId; private final UUID partyId;

View File

@@ -27,11 +27,12 @@ package net.runelite.http.api.ws.messages.party;
import java.util.UUID; import java.util.UUID;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Value; import lombok.Value;
import net.runelite.api.events.Event;
import net.runelite.http.api.ws.WebsocketMessage; import net.runelite.http.api.ws.WebsocketMessage;
@Value @Value
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class UserPart extends WebsocketMessage public class UserPart extends WebsocketMessage implements Event
{ {
private final UUID memberId; private final UUID memberId;
} }

View File

@@ -26,9 +26,10 @@ package net.runelite.http.api.ws.messages.party;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.Value; import lombok.Value;
import net.runelite.api.events.Event;
@Value @Value
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class UserSync extends PartyMemberMessage public class UserSync extends PartyMemberMessage implements Event
{ {
} }

View File

@@ -24,28 +24,8 @@
*/ */
description = 'Injected Client' description = 'Injected Client'
task injector(){
// I kinda want to make the entire injector work here but seems like more work
def injectedClassesPath = "${rootPath}/injector-plugin/out/injected-client/" dependsOn ':injector-plugin:compileJava'
compileJava {
dependsOn ':injector-plugin:assemble'
}
compileJava.outputs.upToDateWhen { false }
compileJava.doLast() {
copy {
File f = file("build/classes/java/main/injected-client")
f.deleteDir()
f.mkdirs()
from ("${injectedClassesPath}")
into ("build/classes/java/main/injected-client")
}
}
classes.doLast() {
File f = file("build/classes/java/main/Placeholder.class")
f.delete()
} }

View File

@@ -2,7 +2,6 @@ group = 'net.runelite.rs'
description = 'Injector' description = 'Injector'
def buildPath = buildDir.toString().replace('\\', '/') // this doesnt work in an ext block for some reason def buildPath = buildDir.toString().replace('\\', '/') // this doesnt work in an ext block for some reason
def deobfuscatedJar = "${rootPath}/runescape-client/build/libs/rs-client-${project.version}.jar" def deobfuscatedJar = "${rootPath}/runescape-client/build/libs/rs-client-${project.version}.jar"
def vanillaJar = "${buildPath}/vanilla-${rsversion}.jar" def vanillaJar = "${buildPath}/vanilla-${rsversion}.jar"
@@ -39,7 +38,7 @@ compileJava.doLast() {
into "$buildDir" into "$buildDir"
} }
def path = sourceSets.main.runtimeClasspath def path = sourceSets.main.runtimeClasspath
def loader = new URLClassLoader(path.collect { f -> f.toURL() } as URL[]) def loader = new URLClassLoader(path.collect { f -> f.toURI().toURL() } as URL[])
def inject = loader.loadClass('net.runelite.injector.Injector') def inject = loader.loadClass('net.runelite.injector.Injector')
String[] jarPaths = [ String[] jarPaths = [
deobfuscatedJar.toString(), deobfuscatedJar.toString(),
@@ -47,6 +46,7 @@ compileJava.doLast() {
injectedClassesPath.toString() injectedClassesPath.toString()
] ]
inject.main(jarPaths) inject.main(jarPaths)
loader.close()
} }
test { test {

View File

@@ -26,9 +26,6 @@ package net.runelite.injector;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import com.google.common.io.Files;
import net.runelite.asm.ClassFile;
import net.runelite.asm.ClassGroup; import net.runelite.asm.ClassGroup;
import net.runelite.deob.util.JarUtil; import net.runelite.deob.util.JarUtil;
@@ -72,13 +69,7 @@ public class Injector
private void save(File out) throws IOException private void save(File out) throws IOException
{ {
out.mkdirs(); JarUtil.saveJar(vanilla, out);
for (ClassFile cf : vanilla.getClasses())
{
File f = new File(out, cf.getClassName() + ".class");
byte[] data = JarUtil.writeClass(vanilla, cf);
Files.write(data, f);
}
} }

Binary file not shown.

View File

@@ -120,8 +120,8 @@ public enum Quest
MONKEY_MADNESS_II(396, "Monkey Madness II", Varbits.QUEST_MONKEY_MADNESS_II), MONKEY_MADNESS_II(396, "Monkey Madness II", Varbits.QUEST_MONKEY_MADNESS_II),
MONKS_FRIEND(397, "Monk's Friend", VarPlayer.QUEST_MONKS_FRIEND), MONKS_FRIEND(397, "Monk's Friend", VarPlayer.QUEST_MONKS_FRIEND),
MOUNTAIN_DAUGHTER(398, "Mountain Daughter", Varbits.QUEST_MOUNTAIN_DAUGHTER), MOUNTAIN_DAUGHTER(398, "Mountain Daughter", Varbits.QUEST_MOUNTAIN_DAUGHTER),
MOURNINGS_ENDS_PART_I(399, "Mourning's Ends Part I", VarPlayer.QUEST_MOURNINGS_ENDS_PART_I), MOURNINGS_END_PART_I(399, "Mourning's End Part I", VarPlayer.QUEST_MOURNINGS_END_PART_I),
MOURNINGS_ENDS_PART_II(400, "Mourning's Ends Part II", Varbits.QUEST_MOURNINGS_ENDS_PART_II), MOURNINGS_END_PART_II(400, "Mourning's End Part II", Varbits.QUEST_MOURNINGS_END_PART_II),
MURDER_MYSTERY(401, "Murder Mystery", VarPlayer.QUEST_MURDER_MYSTERY), MURDER_MYSTERY(401, "Murder Mystery", VarPlayer.QUEST_MURDER_MYSTERY),
MY_ARMS_BIG_ADVENTURE(402, "My Arm's Big Adventure", Varbits.QUEST_MY_ARMS_BIG_ADVENTURE), MY_ARMS_BIG_ADVENTURE(402, "My Arm's Big Adventure", Varbits.QUEST_MY_ARMS_BIG_ADVENTURE),
NATURE_SPIRIT(403, "Nature Spirit", VarPlayer.QUEST_NATURE_SPIRIT), NATURE_SPIRIT(403, "Nature Spirit", VarPlayer.QUEST_NATURE_SPIRIT),
@@ -173,6 +173,7 @@ public enum Quest
ZOGRE_FLESH_EATERS(449, "Zogre Flesh Eaters", Varbits.QUEST_ZOGRE_FLESH_EATERS), ZOGRE_FLESH_EATERS(449, "Zogre Flesh Eaters", Varbits.QUEST_ZOGRE_FLESH_EATERS),
THE_ASCENT_OF_ARCEUUS(542, "The Ascent of Arceuus", Varbits.QUEST_THE_ASCENT_OF_ARCEUUS), THE_ASCENT_OF_ARCEUUS(542, "The Ascent of Arceuus", Varbits.QUEST_THE_ASCENT_OF_ARCEUUS),
THE_FORSAKEN_TOWER(543, "The Forsaken Tower", Varbits.QUEST_THE_FORSAKEN_TOWER), THE_FORSAKEN_TOWER(543, "The Forsaken Tower", Varbits.QUEST_THE_FORSAKEN_TOWER),
SONG_OF_THE_ELVES(603, "Song of the Elves", Varbits.QUEST_SONG_OF_THE_ELVES),
//Miniquests //Miniquests
ENTER_THE_ABYSS(319, "Enter the Abyss", VarPlayer.QUEST_ENTER_THE_ABYSS), ENTER_THE_ABYSS(319, "Enter the Abyss", VarPlayer.QUEST_ENTER_THE_ABYSS),
@@ -186,7 +187,8 @@ public enum Quest
THE_MAGE_ARENA(327, "The Mage Arena", VarPlayer.QUEST_THE_MAGE_ARENA), THE_MAGE_ARENA(327, "The Mage Arena", VarPlayer.QUEST_THE_MAGE_ARENA),
LAIR_OF_TARN_RAZORLOR(328, "Lair of Tarn Razorlor", Varbits.QUEST_LAIR_OF_TARN_RAZORLOR), LAIR_OF_TARN_RAZORLOR(328, "Lair of Tarn Razorlor", Varbits.QUEST_LAIR_OF_TARN_RAZORLOR),
FAMILY_PEST(329, "Family Pest", Varbits.QUEST_FAMILY_PEST), FAMILY_PEST(329, "Family Pest", Varbits.QUEST_FAMILY_PEST),
THE_MAGE_ARENA_II(330, "The Mage Arena II", Varbits.QUEST_THE_MAGE_ARENA_II); THE_MAGE_ARENA_II(330, "The Mage Arena II", Varbits.QUEST_THE_MAGE_ARENA_II),
IN_SEARCH_OF_KNOWLEDGE(602, "In Search of Knowledge", Varbits.QUEST_IN_SEARCH_OF_KNOWLEDGE);
@Getter @Getter
private final int id; private final int id;

View File

@@ -220,7 +220,7 @@ public enum VarPlayer
QUEST_MERLINS_CRYSTAL(14), QUEST_MERLINS_CRYSTAL(14),
QUEST_MONKEY_MADNESS_I(365), QUEST_MONKEY_MADNESS_I(365),
QUEST_MONKS_FRIEND(30), QUEST_MONKS_FRIEND(30),
QUEST_MOURNINGS_ENDS_PART_I(517), QUEST_MOURNINGS_END_PART_I(517),
QUEST_MURDER_MYSTERY(192), QUEST_MURDER_MYSTERY(192),
QUEST_NATURE_SPIRIT(307), QUEST_NATURE_SPIRIT(307),
QUEST_OBSERVATORY_QUEST(112), QUEST_OBSERVATORY_QUEST(112),

View File

@@ -595,7 +595,7 @@ public enum Varbits
QUEST_LUNAR_DIPLOMACY(2448), QUEST_LUNAR_DIPLOMACY(2448),
QUEST_MAKING_HISTORY(1383), QUEST_MAKING_HISTORY(1383),
QUEST_MOUNTAIN_DAUGHTER(260), QUEST_MOUNTAIN_DAUGHTER(260),
QUEST_MOURNINGS_ENDS_PART_II(1103), QUEST_MOURNINGS_END_PART_II(1103),
QUEST_MY_ARMS_BIG_ADVENTURE(2790), QUEST_MY_ARMS_BIG_ADVENTURE(2790),
QUEST_RATCATCHERS(1404), QUEST_RATCATCHERS(1404),
QUEST_RECIPE_FOR_DISASTER(1850), QUEST_RECIPE_FOR_DISASTER(1850),
@@ -629,6 +629,8 @@ public enum Varbits
QUEST_MAKING_FRIENDS_WITH_MY_ARM(6528), QUEST_MAKING_FRIENDS_WITH_MY_ARM(6528),
QUEST_THE_ASCENT_OF_ARCEUUS(7856), QUEST_THE_ASCENT_OF_ARCEUUS(7856),
QUEST_THE_FORSAKEN_TOWER(7796), QUEST_THE_FORSAKEN_TOWER(7796),
//TODO
QUEST_SONG_OF_THE_ELVES(7796),
/** /**
* mini-quest varbits, these don't hold the completion value. * mini-quest varbits, these don't hold the completion value.
@@ -642,6 +644,8 @@ public enum Varbits
QUEST_LAIR_OF_TARN_RAZORLOR(3290), QUEST_LAIR_OF_TARN_RAZORLOR(3290),
QUEST_FAMILY_PEST(5347), QUEST_FAMILY_PEST(5347),
QUEST_THE_MAGE_ARENA_II(6067), QUEST_THE_MAGE_ARENA_II(6067),
//TODO
QUEST_IN_SEARCH_OF_KNOWLEDGE(6067),
/** /**
* Active spellbook (see enumID) * Active spellbook (see enumID)

View File

@@ -2,7 +2,6 @@ package net.runelite.api.events;
import net.runelite.api.Actor; import net.runelite.api.Actor;
import lombok.Data; import lombok.Data;
import net.runelite.api.Actor;
/** /**
* An event where the {@link Actor} has changed animations. * An event where the {@link Actor} has changed animations.
@@ -18,7 +17,7 @@ import net.runelite.api.Actor;
* @see net.runelite.api.AnimationID * @see net.runelite.api.AnimationID
*/ */
@Data @Data
public class AnimationChanged public class AnimationChanged implements Event
{ {
/** /**
* The actor that has entered a new animation. * The actor that has entered a new animation.

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
import lombok.Data; import lombok.Data;
@Data @Data
public class AreaSoundEffectPlayed public class AreaSoundEffectPlayed implements Event
{ {
private int soundId; private int soundId;
private int sceneX; private int sceneX;

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
import lombok.Data; import lombok.Data;
@Data @Data
public class BeforeMenuRender public class BeforeMenuRender implements Event
{ {
private boolean consumed; private boolean consumed;

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
/** /**
* Posted at the start of every frame * Posted at the start of every frame
*/ */
public class BeforeRender public class BeforeRender implements Event
{ {
public static final BeforeRender INSTANCE = new BeforeRender(); public static final BeforeRender INSTANCE = new BeforeRender();

View File

@@ -42,7 +42,7 @@ import lombok.Data;
* retrieve the newly boosted skill level. * retrieve the newly boosted skill level.
*/ */
@Data @Data
public class BoostedLevelChanged public class BoostedLevelChanged implements Event
{ {
/** /**
* The skill that has had its level modified. * The skill that has had its level modified.

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
/** /**
* an event posted when a cannonball is fired * an event posted when a cannonball is fired
*/ */
public class CannonballFired public class CannonballFired implements Event
{ {
public static final CannonballFired INSTANCE = new CannonballFired(); public static final CannonballFired INSTANCE = new CannonballFired();

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
/** /**
* An event posted when the canvas size might have changed. * An event posted when the canvas size might have changed.
*/ */
public class CanvasSizeChanged public class CanvasSizeChanged implements Event
{ {
public static final CanvasSizeChanged INSTANCE = new CanvasSizeChanged(); public static final CanvasSizeChanged INSTANCE = new CanvasSizeChanged();

View File

@@ -41,7 +41,7 @@ import lombok.NoArgsConstructor;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class ChatMessage public class ChatMessage implements Event
{ {
/** /**
* The underlying MessageNode for the message. * The underlying MessageNode for the message.

View File

@@ -30,7 +30,7 @@ import lombok.Value;
* An event where the client has joined or left a clan chat. * An event where the client has joined or left a clan chat.
*/ */
@Value @Value
public class ClanChanged public class ClanChanged implements Event
{ {
/** /**
* Whether or not the client is now in a clan chat. * Whether or not the client is now in a clan chat.

View File

@@ -28,7 +28,7 @@ import net.runelite.api.ClanMember;
import lombok.Value; import lombok.Value;
@Value @Value
public class ClanMemberJoined public class ClanMemberJoined implements Event
{ {
/** /**
* The ClanMember that joined * The ClanMember that joined

View File

@@ -28,7 +28,7 @@ import net.runelite.api.ClanMember;
import lombok.Value; import lombok.Value;
@Value @Value
public class ClanMemberLeft public class ClanMemberLeft implements Event
{ {
/** /**
* The ClanMember that left * The ClanMember that left

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
/** /**
* Posted every client tick * Posted every client tick
*/ */
public class ClientTick public class ClientTick implements Event
{ {
public static final ClientTick INSTANCE = new ClientTick(); public static final ClientTick INSTANCE = new ClientTick();

View File

@@ -42,7 +42,7 @@ import lombok.Value;
* will set command to "" and arguments to ["hello", "world!"]. * will set command to "" and arguments to ["hello", "world!"].
*/ */
@Value @Value
public class CommandExecuted public class CommandExecuted implements Event
{ {
/** /**
* The name of the command entered. * The name of the command entered.

View File

@@ -30,7 +30,7 @@ import lombok.Data;
* An event where a configuration entry has been modified. * An event where a configuration entry has been modified.
*/ */
@Data @Data
public class ConfigChanged public class ConfigChanged implements Event
{ {
/** /**
* The parent group for the key. * The parent group for the key.

View File

@@ -33,7 +33,7 @@ import lombok.Data;
* has been modified. * has been modified.
*/ */
@Data @Data
public class DecorativeObjectChanged public class DecorativeObjectChanged implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -33,7 +33,7 @@ import lombok.Data;
* is removed. * is removed.
*/ */
@Data @Data
public class DecorativeObjectDespawned public class DecorativeObjectDespawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link DecorativeObject} is attached to a {@link Tile}. * An event where a {@link DecorativeObject} is attached to a {@link Tile}.
*/ */
@Data @Data
public class DecorativeObjectSpawned public class DecorativeObjectSpawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* the cursor. * the cursor.
*/ */
@Data @Data
public class DraggingWidgetChanged public class DraggingWidgetChanged implements Event
{ {
/** /**
* Whether a widget is currently being dragged. * Whether a widget is currently being dragged.

View File

@@ -3,7 +3,7 @@ package net.runelite.api.events;
import lombok.Data; import lombok.Data;
@Data @Data
public class DynamicObjectAnimationChanged public class DynamicObjectAnimationChanged implements Event
{ {
/** /**
* The object that has entered a new animation. * The object that has entered a new animation.

View File

@@ -0,0 +1,5 @@
package net.runelite.api.events;
public interface Event
{
}

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where the experience level of a {@link Skill} has been modified. * An event where the experience level of a {@link Skill} has been modified.
*/ */
@Data @Data
public class ExperienceChanged public class ExperienceChanged implements Event
{ {
/** /**
* The modified skill. * The modified skill.

View File

@@ -37,7 +37,7 @@ import lombok.Data;
* </ul> * </ul>
*/ */
@Data @Data
public class FocusChanged public class FocusChanged implements Event
{ {
/** /**
* The new focus state. * The new focus state.

View File

@@ -6,7 +6,7 @@ import lombok.Value;
* An event where a request to add a friend is sent to the server. * An event where a request to add a friend is sent to the server.
*/ */
@Value @Value
public class FriendAdded public class FriendAdded implements Event
{ {
/** /**
* The name of the added friend. * The name of the added friend.

View File

@@ -30,7 +30,7 @@ import lombok.Value;
* An event where a request to remove a friend is sent to the server. * An event where a request to remove a friend is sent to the server.
*/ */
@Value @Value
public class FriendRemoved public class FriendRemoved implements Event
{ {
/** /**
* The name of the removed friend. * The name of the removed friend.

View File

@@ -32,7 +32,7 @@ import net.runelite.api.Tile;
* An event where a {@link GameObject} on a {@link Tile} has been replaced. * An event where a {@link GameObject} on a {@link Tile} has been replaced.
*/ */
@Data @Data
public class GameObjectChanged public class GameObjectChanged implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link GameObject} on a {@link Tile} is removed. * An event where a {@link GameObject} on a {@link Tile} is removed.
*/ */
@Data @Data
public class GameObjectDespawned public class GameObjectDespawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link GameObject} is added to a {@link Tile}. * An event where a {@link GameObject} is added to a {@link Tile}.
*/ */
@Data @Data
public class GameObjectSpawned public class GameObjectSpawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* An event where the clients game state has changed. * An event where the clients game state has changed.
*/ */
@Data @Data
public class GameStateChanged public class GameStateChanged implements Event
{ {
/** /**
* The new game state. * The new game state.

View File

@@ -41,7 +41,7 @@ package net.runelite.api.events;
* Note that occurrences that take place purely on the client, such as right * Note that occurrences that take place purely on the client, such as right
* click menus, are independent of the game tick. * click menus, are independent of the game tick.
*/ */
public class GameTick public class GameTick implements Event
{ {
public static final GameTick INSTANCE = new GameTick(); public static final GameTick INSTANCE = new GameTick();

View File

@@ -41,7 +41,7 @@ import lombok.Data;
* can change into. * can change into.
*/ */
@Data @Data
public class GrandExchangeOfferChanged public class GrandExchangeOfferChanged implements Event
{ {
/** /**
* The offer that has been modified. * The offer that has been modified.

View File

@@ -31,7 +31,7 @@ import lombok.Value;
* An event where a new {@link GraphicsObject} has been created. * An event where a new {@link GraphicsObject} has been created.
*/ */
@Value @Value
public class GraphicsObjectCreated public class GraphicsObjectCreated implements Event
{ {
/** /**
* The newly created graphics object. * The newly created graphics object.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where the {@link GroundObject} on a {@link Tile} has been changed. * An event where the {@link GroundObject} on a {@link Tile} has been changed.
*/ */
@Data @Data
public class GroundObjectChanged public class GroundObjectChanged implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link GroundObject} on a {@link Tile} has been removed. * An event where a {@link GroundObject} on a {@link Tile} has been removed.
*/ */
@Data @Data
public class GroundObjectDespawned public class GroundObjectDespawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link GroundObject} is added to a {@link Tile}. * An event where a {@link GroundObject} is added to a {@link Tile}.
*/ */
@Data @Data
public class GroundObjectSpawned public class GroundObjectSpawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -36,7 +36,7 @@ import lombok.Data;
* visible hitsplats. * visible hitsplats.
*/ */
@Data @Data
public class HitsplatApplied public class HitsplatApplied implements Event
{ {
/** /**
* The actor the hitsplat was applied to. * The actor the hitsplat was applied to.

View File

@@ -28,7 +28,7 @@ import net.runelite.api.Actor;
import lombok.Data; import lombok.Data;
@Data @Data
public class InteractChanged public class InteractChanged implements Event
{ {
private Actor actor; private Actor actor;
} }

View File

@@ -7,7 +7,7 @@ import lombok.Value;
* An event called when the actor an actor is interacting with changes * An event called when the actor an actor is interacting with changes
*/ */
@Value @Value
public class InteractingChanged public class InteractingChanged implements Event
{ {
private final Actor source; private final Actor source;

View File

@@ -39,7 +39,7 @@ import lombok.Value;
* </ul> * </ul>
*/ */
@Value @Value
public class ItemContainerChanged public class ItemContainerChanged implements Event
{ {
/** /**
* The modified container's ID. * The modified container's ID.

View File

@@ -34,7 +34,7 @@ import lombok.Value;
* all item piles are implicitly despawned, and despawn events will not be sent. * all item piles are implicitly despawned, and despawn events will not be sent.
*/ */
@Value @Value
public class ItemDespawned public class ItemDespawned implements Event
{ {
private final Tile tile; private final Tile tile;
private final TileItem item; private final TileItem item;

View File

@@ -33,7 +33,7 @@ import lombok.Value;
* Called when the quantity of an item pile changes. * Called when the quantity of an item pile changes.
*/ */
@Value @Value
public class ItemQuantityChanged public class ItemQuantityChanged implements Event
{ {
private final TileItem item; private final TileItem item;
private final Tile tile; private final Tile tile;

View File

@@ -34,7 +34,7 @@ import lombok.Value;
* all item piles are implicitly reset and a new spawn event will be sent. * all item piles are implicitly reset and a new spawn event will be sent.
*/ */
@Value @Value
public class ItemSpawned public class ItemSpawned implements Event
{ {
private final Tile tile; private final Tile tile;
private final TileItem item; private final TileItem item;

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
/** /**
* An event when the local player dies. * An event when the local player dies.
*/ */
public class LocalPlayerDeath public class LocalPlayerDeath implements Event
{ {
public static final LocalPlayerDeath INSTANCE = new LocalPlayerDeath(); public static final LocalPlayerDeath INSTANCE = new LocalPlayerDeath();

View File

@@ -33,7 +33,7 @@ import net.runelite.api.MenuEntry;
*/ */
@Data @Data
@AllArgsConstructor @AllArgsConstructor
public class MenuEntryAdded public class MenuEntryAdded implements Event
{ {
/** /**
* The MenuEntry object that was actually added * The MenuEntry object that was actually added

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* An event where a menu has been opened. * An event where a menu has been opened.
*/ */
@Data @Data
public class MenuOpened public class MenuOpened implements Event
{ {
/** /**
* The menu entries in the newly opened menu. * The menu entries in the newly opened menu.

View File

@@ -42,7 +42,7 @@ import net.runelite.api.MenuEntry;
* it seems that this event still triggers with the "Cancel" action. * it seems that this event still triggers with the "Cancel" action.
*/ */
@Data @Data
public class MenuOptionClicked public class MenuOptionClicked implements Event
{ {
public MenuOptionClicked(MenuEntry entry) public MenuOptionClicked(MenuEntry entry)
{ {

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* opened on left click. * opened on left click.
*/ */
@Data @Data
public class MenuShouldLeftClick public class MenuShouldLeftClick implements Event
{ {
/** /**
* If set to true, the menu will open on left click. * If set to true, the menu will open on left click.

View File

@@ -31,7 +31,7 @@ import lombok.Value;
* An event where a {@link Nameable} has had their name changed. * An event where a {@link Nameable} has had their name changed.
*/ */
@Value @Value
public class NameableNameChanged public class NameableNameChanged implements Event
{ {
/** /**
* The nameable that changed names. * The nameable that changed names.

View File

@@ -31,7 +31,7 @@ import net.runelite.api.NPCDefinition;
* An event where an action of an {@link NPCDefinition} has changed. * An event where an action of an {@link NPCDefinition} has changed.
*/ */
@Data @Data
public class NpcActionChanged public class NpcActionChanged implements Event
{ {
/** /**
* The NPC composition that has been changed. * The NPC composition that has been changed.

View File

@@ -31,7 +31,7 @@ import net.runelite.api.NPC;
* Fires after the composition of an {@link NPC} changes. * Fires after the composition of an {@link NPC} changes.
*/ */
@Value @Value
public class NpcDefinitionChanged public class NpcDefinitionChanged implements Event
{ {
/** /**
* The NPC of which the composition changed. * The NPC of which the composition changed.

View File

@@ -32,7 +32,7 @@ import lombok.Value;
* An event where an {@link NPC} has despawned. * An event where an {@link NPC} has despawned.
*/ */
@Value @Value
public class NpcDespawned public class NpcDespawned implements Event
{ {
/** /**
* The despawned NPC. * The despawned NPC.

View File

@@ -32,7 +32,7 @@ import lombok.Value;
* An event where an {@link NPC} has spawned. * An event where an {@link NPC} has spawned.
*/ */
@Value @Value
public class NpcSpawned public class NpcSpawned implements Event
{ {
/** /**
* The spawned NPC. * The spawned NPC.

View File

@@ -4,7 +4,7 @@ import net.runelite.api.Actor;
import lombok.Value; import lombok.Value;
@Value @Value
public class OverheadTextChanged public class OverheadTextChanged implements Event
{ {
private final Actor actor; private final Actor actor;

View File

@@ -34,7 +34,7 @@ import lombok.Value;
* Note: This event does not get called for the local player. * Note: This event does not get called for the local player.
*/ */
@Value @Value
public class PlayerDespawned public class PlayerDespawned implements Event
{ {
/** /**
* The despawned player. * The despawned player.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* been clicked (ie. HiScore Lookup). * been clicked (ie. HiScore Lookup).
*/ */
@Data @Data
public class PlayerMenuOptionClicked public class PlayerMenuOptionClicked implements Event
{ {
/** /**
* The menu option clicked. * The menu option clicked.

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
import lombok.Data; import lombok.Data;
@Data @Data
public class PlayerMenuOptionsChanged public class PlayerMenuOptionsChanged implements Event
{ {
/** /**
* Index in playerOptions which changed. * Index in playerOptions which changed.

View File

@@ -32,7 +32,7 @@ import lombok.Value;
* An event where a {@link Player} has spawned. * An event where a {@link Player} has spawned.
*/ */
@Value @Value
public class PlayerSpawned public class PlayerSpawned implements Event
{ {
/** /**
* The spawned player. * The spawned player.

View File

@@ -28,7 +28,7 @@ import net.runelite.api.HealthBar;
import lombok.Data; import lombok.Data;
@Data @Data
public class PostHealthBar public class PostHealthBar implements Event
{ {
private HealthBar healthBar; private HealthBar healthBar;
} }

View File

@@ -32,7 +32,7 @@ import net.runelite.api.ItemDefinition;
* its data is initialized. * its data is initialized.
*/ */
@Data @Data
public class PostItemDefinition public class PostItemDefinition implements Event
{ {
/** /**
* The newly created item. * The newly created item.

View File

@@ -35,7 +35,7 @@ import lombok.Data;
* once (ie. AoE from Lizardman Shaman). * once (ie. AoE from Lizardman Shaman).
*/ */
@Data @Data
public class ProjectileMoved public class ProjectileMoved implements Event
{ {
/** /**
* The projectile being moved. * The projectile being moved.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event called whenever a {@link Projectile} has spawned. * An event called whenever a {@link Projectile} has spawned.
*/ */
@Data @Data
public class ProjectileSpawned public class ProjectileSpawned implements Event
{ {
/** /**
* The spawned projectile. * The spawned projectile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where the game has changed from fixed to resizable mode or vice versa. * An event where the game has changed from fixed to resizable mode or vice versa.
*/ */
@Data @Data
public class ResizeableChanged public class ResizeableChanged implements Event
{ {
/** /**
* Whether the game is in resizable mode. * Whether the game is in resizable mode.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* A callback from a runelite_callback opcode in a cs2 * A callback from a runelite_callback opcode in a cs2
*/ */
@Data @Data
public class ScriptCallbackEvent public class ScriptCallbackEvent implements Event
{ {
/** /**
* The script being called. * The script being called.

View File

@@ -27,7 +27,7 @@ package net.runelite.api.events;
import lombok.Data; import lombok.Data;
@Data @Data
public class SoundEffectPlayed public class SoundEffectPlayed implements Event
{ {
private int soundId; private int soundId;
private int delay; private int delay;

View File

@@ -19,7 +19,7 @@ import net.runelite.api.Actor;
* @see net.runelite.api.GraphicID * @see net.runelite.api.GraphicID
*/ */
@Data @Data
public class SpotAnimationChanged public class SpotAnimationChanged implements Event
{ {
/** /**
* The actor that has had their graphic changed. * The actor that has had their graphic changed.

View File

@@ -30,7 +30,7 @@ package net.runelite.api.events;
* This event triggers for every character change to the username * This event triggers for every character change to the username
* in the login screen. * in the login screen.
*/ */
public class UsernameChanged public class UsernameChanged implements Event
{ {
public static final UsernameChanged INSTANCE = new UsernameChanged(); public static final UsernameChanged INSTANCE = new UsernameChanged();

View File

@@ -31,7 +31,7 @@ import lombok.Value;
* An event where a varbit integer has changed. * An event where a varbit integer has changed.
*/ */
@Value @Value
public class VarClientIntChanged public class VarClientIntChanged implements Event
{ {
private int index; private int index;
} }

View File

@@ -31,7 +31,7 @@ import lombok.Value;
* An event where a varbit string has changed. * An event where a varbit string has changed.
*/ */
@Value @Value
public class VarClientStrChanged public class VarClientStrChanged implements Event
{ {
private int index; private int index;
} }

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event when a varbit or varplayer has changed. * An event when a varbit or varplayer has changed.
*/ */
@Data @Data
public class VarbitChanged public class VarbitChanged implements Event
{ {
/** /**
* Index in the varp array that was changed. * Index in the varp array that was changed.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where the {@link WallObject} of a {@link Tile} has been changed. * An event where the {@link WallObject} of a {@link Tile} has been changed.
*/ */
@Data @Data
public class WallObjectChanged public class WallObjectChanged implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link WallObject} on a {@link Tile} has been removed. * An event where a {@link WallObject} on a {@link Tile} has been removed.
*/ */
@Data @Data
public class WallObjectDespawned public class WallObjectDespawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -32,7 +32,7 @@ import lombok.Data;
* An event where a {@link WallObject} is added to a {@link Tile}. * An event where a {@link WallObject} is added to a {@link Tile}.
*/ */
@Data @Data
public class WallObjectSpawned public class WallObjectSpawned implements Event
{ {
/** /**
* The affected tile. * The affected tile.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* An event where the hidden state of a {@link Widget} has been modified. * An event where the hidden state of a {@link Widget} has been modified.
*/ */
@Data @Data
public class WidgetHiddenChanged public class WidgetHiddenChanged implements Event
{ {
/** /**
* The affected widget. * The affected widget.

View File

@@ -30,7 +30,7 @@ import lombok.Data;
* An event where a {@link net.runelite.api.widgets.Widget} has been loaded. * An event where a {@link net.runelite.api.widgets.Widget} has been loaded.
*/ */
@Data @Data
public class WidgetLoaded public class WidgetLoaded implements Event
{ {
/** /**
* The group ID of the loaded widget. * The group ID of the loaded widget.

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* An event where an option has been clicked in a {@link net.runelite.api.widgets.Widget}s menu. * An event where an option has been clicked in a {@link net.runelite.api.widgets.Widget}s menu.
*/ */
@Data @Data
public class WidgetMenuOptionClicked public class WidgetMenuOptionClicked implements Event
{ {
/** /**
* The clicked menu option. * The clicked menu option.

View File

@@ -28,7 +28,7 @@ package net.runelite.api.events;
* An event where the position of a {@link net.runelite.api.widgets.Widget} * An event where the position of a {@link net.runelite.api.widgets.Widget}
* relative to its parent has changed. * relative to its parent has changed.
*/ */
public class WidgetPositioned public class WidgetPositioned implements Event
{ {
public static final WidgetPositioned INSTANCE = new WidgetPositioned(); public static final WidgetPositioned INSTANCE = new WidgetPositioned();

View File

@@ -31,7 +31,7 @@ import lombok.Data;
* An event where a draggable widget has been pressed. * An event where a draggable widget has been pressed.
*/ */
@Data @Data
public class WidgetPressed public class WidgetPressed implements Event
{ {
public static final WidgetPressed INSTANCE = new WidgetPressed(); public static final WidgetPressed INSTANCE = new WidgetPressed();

View File

@@ -31,7 +31,7 @@ import lombok.Value;
* Event when the world list is loaded for the world switcher * Event when the world list is loaded for the world switcher
*/ */
@Value @Value
public class WorldListLoad public class WorldListLoad implements Event
{ {
private final World[] worlds; private final World[] worlds;
} }

View File

@@ -25,6 +25,7 @@
package net.runelite.api.hooks; package net.runelite.api.hooks;
import net.runelite.api.MainBufferProvider; import net.runelite.api.MainBufferProvider;
import net.runelite.api.events.Event;
import net.runelite.api.widgets.WidgetItem; import net.runelite.api.widgets.WidgetItem;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
@@ -41,14 +42,14 @@ public interface Callbacks
* *
* @param event the event * @param event the event
*/ */
<T> void post(Class<T> eventClass, Object event); <T> void post(Class<T> eventClass, Event event);
/** /**
* Post a deferred event, which gets delayed until the next cycle. * Post a deferred event, which gets delayed until the next cycle.
* *
* @param event the event * @param event the event
*/ */
<T> void postDeferred(Class<T> eventClass, Object event); <T> void postDeferred(Class<T> eventClass, Event event);
/** /**
* Called each client cycle. * Called each client cycle.

View File

@@ -1127,5 +1127,7 @@ public class WidgetID
static class SeedVault static class SeedVault
{ {
static final int TITLE_CONTAINER = 2; static final int TITLE_CONTAINER = 2;
static final int ITEM_CONTAINER = 15;
static final int ITEM_TEXT = 16;
} }
} }

Some files were not shown because too many files have changed in this diff Show More