mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-10 10:20:44 -07:00
More plugin system work
This commit is contained in:
parent
a6577064b0
commit
8dfbcb9423
8 changed files with 91 additions and 9 deletions
|
|
@ -1,15 +1,19 @@
|
|||
package OverheadDebugPlugin;
|
||||
|
||||
import plugin.Plugin;
|
||||
import plugin.api.API;
|
||||
import plugin.api.FontColor;
|
||||
import plugin.api.FontType;
|
||||
import plugin.api.TextModifier;
|
||||
import plugin.api.*;
|
||||
import rt4.*;
|
||||
|
||||
/**
|
||||
* @author ceikry
|
||||
*/
|
||||
public class plugin extends Plugin {
|
||||
private boolean isEnabled = false;
|
||||
|
||||
@Override
|
||||
public void PlayerOverheadDraw(Player player, int screenX, int screenY) {
|
||||
if (!isEnabled) return;
|
||||
|
||||
API.DrawText(
|
||||
FontType.SMALL,
|
||||
FontColor.YELLOW,
|
||||
|
|
@ -22,6 +26,8 @@ public class plugin extends Plugin {
|
|||
|
||||
@Override
|
||||
public void NPCOverheadDraw(Npc npc, int screenX, int screenY) {
|
||||
if (!isEnabled) return;
|
||||
|
||||
String npcSb =
|
||||
(npc.type.name.strEquals(JagString.parse("null"))
|
||||
? npc.type.getMultiNpc() != null
|
||||
|
|
@ -44,4 +50,13 @@ public class plugin extends Plugin {
|
|||
screenY
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ProcessCommand(String commandStr, String[] args) {
|
||||
if (!API.PlayerHasPrivilege(Privileges.JMOD)) return;
|
||||
|
||||
if (commandStr.equalsIgnoreCase("::npcdebug")) {
|
||||
isEnabled = !isEnabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
AUTHOR="Ceikry"
|
||||
DESCRIPTION="Renders helpful debug text over the heads of players and NPCs."
|
||||
VERSION=1.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue