Load Maps

Discussion in 'Plugin Development' started by new-ewrs728, Oct 20, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    new-ewrs728

    Hey. I have a problem. I recently created a theme with how to create an ItemFrame with a given picture. Now there is another problem. Yes, I created a map, but after restarting it turns into a void. How to do it? Do I need to download from a folder? Whereas?

    I used a utility from Zombie_Striker
    https://pastebin.com/rX44E4tJ
     
  2. After restarting the server or...
     
  3. Offline

    The_Spaceman

    you have to reset the image after a reload/start
     
  4. Offline

    new-ewrs728

    How?
     
  5. Offline

    The_Spaceman

    someting like this:

    get id
    Code:java
    1. MapView mapView = Bukkit.createMap(Bukkit.getWorld("world"));
    2. short mapID = mapView.getId();


    reload map after shutdown/reload
    Code:java
    1. MapView view = Bukkit.getMap(/*your map ID*/);
    2. for (MapRenderer m : view.getRenderers()) {
    3. view.removeRenderer(m);
    4. }
    5. view.addRenderer(/*your custom renderer*/);


    this was written for Bukkit 1.12, and maybe need some updating... ill try to look if it was updated later this day.
     
Thread Status:
Not open for further replies.

Share This Page