Refactored some fishing code
Converted some fishing code to kotlin Implemented crayfish fishing
This commit is contained in:
@@ -814,6 +814,17 @@ fun findLocalNPC(entity: Entity, id: Int): NPC? {
|
||||
return RegionManager.getLocalNpcs(entity).firstOrNull { it.id == id }
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an NPC with the given ID in the same general area as the given Entity
|
||||
* @param location The location to search around.
|
||||
* @param distance The maximum distance to the entity.
|
||||
* @returns an NPC matching the given ID or null if none is found
|
||||
*/
|
||||
fun findLocalNPCs(location: Location, distance: Int): MutableList<NPC> {
|
||||
return RegionManager.getLocalNpcs(location, distance)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets a list of nearby NPCs that match the given IDs.
|
||||
* @param entity the entity to check around
|
||||
|
||||
Reference in New Issue
Block a user