Map Rendering

Discussion in 'Plugin Development' started by chrisman0091, Dec 1, 2013.

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

    chrisman0091

    So I'm currently working with maps, and rendering special things on them. Problem is, I don't know how to only render a single map. With my current code:
    Code:java
    1. @EventHandler
    2. public void onMap(MapInitializeEvent e){
    3. for(MapRenderer r:e.getMap().getRenderers()) e.getMap().removeRenderer(r);
    4. e.getMap().addRenderer(new BColorsNameRenderer());
    5. }


    it renders all maps on the server with my custom render, which makes sense from the code. What I want to do is set it up so it only renders the map playeres will get from a command. I thought about doing this through naming the map with metadata, then checking for it, but I can't figure out how to check the item name of a map like one normally would. Now I'm pretty sure if I could figure out how to check the map name this would work with an if statement as currently the renamed map renders normally, but again I don't know how to do this.

    What I'm asking:
    How could I go about checking the item name of a map, or what would be a better way to register and check that its the map from the command?
     
  2. Offline

    chrisman0091

    Still need this if anybody can help.
     
Thread Status:
Not open for further replies.

Share This Page