Move entity hider logic to plugin

This commit is contained in:
Adam
2022-06-08 14:19:22 -04:00
parent 8be3210b87
commit 82d92b9953
5 changed files with 411 additions and 137 deletions

View File

@@ -376,6 +376,13 @@ public interface Client extends OAuthApi, GameEngine
*/
Player getLocalPlayer();
/**
* Get the local player's follower, such as a pet
* @return
*/
@Nullable
NPC getFollower();
/**
* Gets the item composition corresponding to an items ID.
*
@@ -1628,112 +1635,6 @@ public interface Client extends OAuthApi, GameEngine
*/
int getItemPressedDuration();
/**
* Sets whether the client is hiding entities.
* <p>
* This method does not itself hide any entities. It behaves as a master
* switch for whether or not any of the related entities are hidden or
* shown. If this method is set to false, changing the configurations for
* specific entities will have no effect.
*
* @param state new entity hiding state
*/
void setIsHidingEntities(boolean state);
/**
* Sets whether or not other players are hidden.
*
* @param state the new player hidden state
*/
void setOthersHidden(boolean state);
/**
* Sets whether 2D sprites related to the other players are hidden.
* (ie. overhead prayers, PK skull)
*
* @param state the new player 2D hidden state
*/
void setOthersHidden2D(boolean state);
/**
* Sets whether or not friends are hidden.
*
* @param state the new friends hidden state
*/
void setFriendsHidden(boolean state);
/**
* Sets whether or not friends chat members are hidden.
*
* @param state the new friends chat member hidden state
*/
void setFriendsChatMembersHidden(boolean state);
/**
* Sets whether or not clan members are hidden.
*
* @param state the new clan chat member hidden state
*/
void setClanChatMembersHidden(boolean state);
/**
* Sets whether or not ignored players are hidden.
*
* @param state the new ignored player hidden state
*/
void setIgnoresHidden(boolean state);
/**
* Sets whether the local player is hidden.
*
* @param state new local player hidden state
*/
void setLocalPlayerHidden(boolean state);
/**
* Sets whether 2D sprites related to the local player are hidden.
* (ie. overhead prayers, PK skull)
*
* @param state new local player 2D hidden state
*/
void setLocalPlayerHidden2D(boolean state);
/**
* Sets whether NPCs are hidden.
*
* @param state new NPC hidden state
*/
void setNPCsHidden(boolean state);
/**
* Sets whether 2D sprites related to the NPCs are hidden.
* (ie. overhead prayers)
*
* @param state new NPC 2D hidden state
*/
void setNPCsHidden2D(boolean state);
/**
* Sets whether Pets from other players are hidden.
*
* @param state new pet hidden state
*/
void setPetsHidden(boolean state);
/**
* Sets whether attacking players or NPCs are hidden.
*
* @param state new attacker hidden state
*/
void setAttackersHidden(boolean state);
/**
* Sets whether projectiles are hidden.
*
* @param state new projectile hidden state
*/
void setProjectilesHidden(boolean state);
/**
* Gets an array of tile collision data.
* <p>

View File

@@ -30,6 +30,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.util.List;
import net.runelite.api.MainBufferProvider;
import net.runelite.api.Renderable;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetItem;
@@ -185,4 +186,12 @@ public interface Callbacks
* @param keyEvent the key event
*/
void keyTyped(KeyEvent keyEvent);
/**
* Called to test if a renderable should be drawn this frame
* @param renderable the renderable
* @param drawingUi if this is the 2d ui, such as hp bars or hitsplats
* @return false to prevent drawing
*/
boolean draw(Renderable renderable, boolean drawingUi);
}