From 427245d6bc9a7e4a487f833991db47f4d22520bd Mon Sep 17 00:00:00 2001 From: Goodbird Date: Sun, 21 Jan 2024 10:55:09 +0300 Subject: [PATCH] Added text plane interface and linked it to scripted block interface --- .../noppes/npcs/api/block/IBlockScripted.java | 15 ++++++- java/noppes/npcs/api/block/ITextPlane.java | 42 +++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 java/noppes/npcs/api/block/ITextPlane.java diff --git a/java/noppes/npcs/api/block/IBlockScripted.java b/java/noppes/npcs/api/block/IBlockScripted.java index 8cb6687..e49b93d 100644 --- a/java/noppes/npcs/api/block/IBlockScripted.java +++ b/java/noppes/npcs/api/block/IBlockScripted.java @@ -73,9 +73,8 @@ public interface IBlockScripted extends IBlock { * Setting NpcUseOpCommands to true in the CustomNPCs.cfg should allow the npc to run op commands, be warned this could be a major security risk, use at own risk
* For permission plugins the commands are run under uuid:c9c843f8-4cb1-4c82-aa61-e264291b7bd6 and name:[customnpcs] * @param command The command to be executed - * @return Returns the commands output */ - String executeCommand(String command); + void executeCommand(String command); boolean getIsPassible(); @@ -94,4 +93,16 @@ public interface IBlockScripted extends IBlock { float getResistance(); void setResistance(float resistance); + + ITextPlane getTextPlane(); + + ITextPlane getTextPlane2(); + + ITextPlane getTextPlane3(); + + ITextPlane getTextPlane4(); + + ITextPlane getTextPlane5(); + + ITextPlane getTextPlane6(); } diff --git a/java/noppes/npcs/api/block/ITextPlane.java b/java/noppes/npcs/api/block/ITextPlane.java new file mode 100644 index 0000000..337bf07 --- /dev/null +++ b/java/noppes/npcs/api/block/ITextPlane.java @@ -0,0 +1,42 @@ +package noppes.npcs.api.block; + +public interface ITextPlane { + + public String getText(); + + public void setText(String text); + + public int getRotationX(); + + public int getRotationY(); + + public int getRotationZ(); + + public void setRotationX(int x); + + public void setRotationY(int y); + + /** + * @param z Default: 0.5 + */ + public void setRotationZ(int z); + + public float getOffsetX(); + + public float getOffsetY(); + + public float getOffsetZ(); + + public void setOffsetX(float x); + + public void setOffsetY(float y); + + public void setOffsetZ(float z); + + public float getScale(); + + /** + * @param scale Default: 1 + */ + public void setScale(float scale); +}