Solved How to remove cursor from a Map (MapCanvas)

Discussion in 'Spigot Plugin Development' started by Freggy, Jun 6, 2017.

Thread Status:
Not open for further replies.
  1. Hello everyone,

    im currently developing a plugin which only renders an image to a map like this:

    Code (Text):

    @Override
    public void render(MapView mapView, MapCanvas mapCanvas, Player player)  {
            mapCanvas.drawImage(0, 0, image);
    }
     
    everything works fine, but there is this little thing in the red circle that I want to remove but I don't know how.
    (Look at the image attached)

    Things I already tried
    - Setting an emtpy MapCursorCollection
    - MapView.setWorld to a world where no-one is playing.
    - Creating MapCursorCollection with a invisible cursor

    It would be amazing if someone could help me with that.

    Thanks in advance
     

    Attached Files:

  2. Perhaps you can try to loop through all the MapCursors in the MapCursorCollection and then call removeCursor manually. Or you can try to do mapView.setUnlimitedTracking(false);
    Also make sure that you are indeed setting that maprenderer to your map and that everything is being executed.
     

  3. Thank you, but I already found the answer. If you are interested in it, look here: https://stackoverflow.com/questions/44394422/how-to-remove-cursor-from-a-map-bukkit
     
Thread Status:
Not open for further replies.