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:
Josh Shippam
2021-10-09 00:20:57 +01:00
committed by GitHub
parent a693615e2e
commit 7d64e2298f
74 changed files with 1799 additions and 75 deletions
@@ -0,0 +1,40 @@
package com.rs2.util;
import java.lang.annotation.Annotation;
import java.util.Optional;
/**
* A static-utility class containing extension or helper methods for
* {@link Class}es or generic objects.
*
* @author Ryley Kimmel <ryley.kimmel@live.com>
*/
public final class ClassUtils {
/**
* Returns the specified {@link T annotation} for the potentially annotated
* {@link Class class} if it exists.
*
* @param clazz The class to test contains the specified {@code annotation}.
* @param annotation The annotation to check the specified {@code class}
* for.
* @return The {@code annotation} if and only if it exists otherwise
* {@link Optional#empty()}.
*/
public static <T extends Annotation> Optional<T> getAnnotation(Class<?> clazz, Class<T> annotation) {
return Optional.ofNullable(clazz.getAnnotation(annotation));
}
/**
* Suppresses the default-public constructor preventing this class from
* being instantiated by other classes, instantiating this class from within
* itself will throw an {@link UnsupportedOperationException}.
*
* @throws UnsupportedOperationException If this class is instantiated from
* within itself.
*/
private ClassUtils() {
throw new UnsupportedOperationException("static-utility classes may not be instantiated.");
}
}
@@ -0,0 +1,11 @@
package com.rs2.util;
import java.util.logging.Logger;
public final class LoggerUtils {
public static Logger getLogger(Class<?> clazz) {
return Logger.getLogger(clazz.getName());
}
}