Capturing an NPC Object?

  • I no longer need an answer for this as I found a method that works without calling the object directly. However I would like a discussion on capturing objects and npcs if you have a direct answer or better idea.

  • Java
    // i use
    player.getNpcInLineOfSight(500, (npc) -> {your code here} 
       
    //500 is the max distance

    for objects you could use a number of events like onPlaceObject onHitObject etc etc

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • That would be worthwhile for other ideas, Thanks.


    What I did was force some information to available on spawn-in for the technique so that I could id the npc. This let me do that for statement catch the nulls first in an || statement then find and pull it. Works like a charm for this plugin. Just some tweaking left and I will likely post it. It is already up on the server being ringed-out tested.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!