Package rs.kreme.ksbot.api.hooks
Class AntiBan
- java.lang.Object
-
- rs.kreme.ksbot.api.hooks.AntiBan
-
public class AntiBan extends java.lang.ObjectHandles detection and monitoring of staff members in the game world. Loads staff list from server, and can detect nearby staff for AntiBan logic.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getStaff()Returns a list of all known staff usernames.booleanisStaffMember(java.lang.String player)Checks if the specified player name is in the staff list.booleanisStaffMember(KSPlayer player)Checks if the specified KSPlayer is a staff member.PlayerQuerynearbyStaff()Returns a query of staff members nearby (within 10 tiles).PlayerQuerynearbyStaff(int distance)Returns a query of staff members within a specified distance.booleanstaffNearby()Checks if any staff members are nearby (within 10 tiles).booleanstaffNearby(int distance)Checks if any staff members are within the specified distance.
-
-
-
Constructor Detail
-
AntiBan
public AntiBan(KSContext ctx)
Constructs the AntiBan manager and begins loading the staff list.- Parameters:
ctx- The context of the current bot session.
-
-
Method Detail
-
getStaff
public java.lang.String[] getStaff()
Returns a list of all known staff usernames.- Returns:
- Array of staff usernames.
-
nearbyStaff
public PlayerQuery nearbyStaff()
Returns a query of staff members nearby (within 10 tiles).- Returns:
- PlayerQuery containing nearby staff.
-
nearbyStaff
public PlayerQuery nearbyStaff(int distance)
Returns a query of staff members within a specified distance.- Parameters:
distance- Distance in tiles to check for staff.- Returns:
- PlayerQuery containing nearby staff.
-
staffNearby
public boolean staffNearby()
Checks if any staff members are nearby (within 10 tiles).- Returns:
- true if a staff member is within range; false otherwise.
-
staffNearby
public boolean staffNearby(int distance)
Checks if any staff members are within the specified distance.- Parameters:
distance- Distance in tiles to check for staff.- Returns:
- true if a staff member is within range; false otherwise.
-
isStaffMember
public boolean isStaffMember(java.lang.String player)
Checks if the specified player name is in the staff list.- Parameters:
player- Player name to check.- Returns:
- true if the player is a staff member; false otherwise.
-
isStaffMember
public boolean isStaffMember(KSPlayer player)
Checks if the specified KSPlayer is a staff member.- Parameters:
player- KSPlayer instance to check.- Returns:
- true if the player is a staff member; false otherwise.
-
-