Inactive [DEV/ADMN/MISC] MapAPI v1.1 - map API reloaded [953]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, Jul 13, 2011.

  1. Offline

    codename_B

    This has been superceded!
    MapAPI
    do interesting stuff with maps!

    v1.1
    JavaDocs in the zip

    Source in the zip
    [​IMG]
    How to use:

    This plugin exposes an API for other plugins to use for writing a series of bytes to a map. It's like sk89q's one built into bukkit but easier to use.

    .
    FAQ/Noob Questions:

    Notch only has support for 56 colors, 4 of which are transparent, leaving 52 colors to actually use to make an image. I match them as best as I can.​
    Easter Eggs:
    If you run the jar (by double clicking on it) rather than running it as a plugin a representation of notch, in the colors of the in-game map, will appear on your screen.​



    So does this mean I can have Katy Perry on my minecraft map?

    [​IMG]


    Changelog:

    v1 - 13 July 2011 - released plugin

    v2 - 13 July 2011 - added threading to...everything
    v2.1 - 14 July 2011 - updated color mapping model to a better matching system based on HSB rather than RGB.
    v1.1 - 25 July 2011 - rereleased under a new branch
     
  2. Offline

    codename_B

    Line 53 in onEnable in MapTestPlugin.java of your code is where you're going wrong, you need to create an array of the size of the map,which is byte[128*128] not byte[128] which is what you have there. I can see how you made that mistake.

    Also - why, on line 88 of MapSend.java are you changing the map pixel by pixel? What's the point? It's far more efficient to change what needs to be changed and THEN send the map...

    Take a look at my map plugin for ideas of how to do this stuff.
    http://forums.bukkit.org/threads/mi...any-in-game-map-using-this-plugin-1000.28113/

    P.S. The first two paragraphs there are entirely sarcasm, you can't exactly expect me to help you without posting some example code of what you're trying to do.

    What code are you using to do this? What exactly is it you're trying to do?

    Why are you using that to set the map - rather than the editing a byte array then saving it when you're done?

    Take a look at the source code for the plugin I linked you to.

    I still don't understand what you're trying to do - are you trying to read the data that is already on the map and add a pixel? I think you've completely misunderstood how this works. Look at the javadocs.

    I think you're vastly overcomplicating this - but best of luck to you.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  3. Offline

    JoshuaBehrens

    Sorry for my disturbing behaviour. Got it with this API. It was not the fail of the API but mine. My function had to load unloaded chunks for this what I did and so this was freezing. Thanks for your try to help me. Liked this ;)
     
  4. Offline

    codename_B

  5. I have a ploblem: I tried to integrate a class based on the PreviewApp into a plugin and wanted to run it on an gentoo linux server (minecraft server running as a deamon, so no $DISPLAY set in it's environment) but I get:
    Code:
    2011-07-31 11:26:13 [WARNING] Task of 'libMMS' generated an exception
    java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    	at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173)
    	at java.awt.Window.<init>(Window.java:476)
    	at java.awt.Frame.<init>(Frame.java:419)
    	at javax.swing.JFrame.<init>(JFrame.java:218)
    	at com.V10lator.libMMS.ShowImage.main(ShowImage.java:20)
    	at com.V10lator.libMMS.Camera$lockThread.run(Camera.java:168)
    	at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Where com.V10lator.libMMS.ShowImage.main(ShowImage.java:20) is:
    Code:
    ...
    18		bigGraphics.dispose();
    19
    20		JFrame frame = new JFrame("Map Image Preview");
    21		ImageIcon imageIcon = new ImageIcon(bigImage);
    ...
    I don't know what a JFame is or why it's needed but I don't want to read/write from a (non existing, no X running!) screen on the server. Please help. :(

    //EDIT: Where is the official API, btw? Couldn't find the event types and so on in the newest (craft)bukkit build.
     
  6. Offline

    Shamebot

    It isn't merged in the master branch yet.
     
  7. I use the newest build to develop, but I will use MapAPI 1.1 till bukkits is ready. Thanks for the info. :)
     
  8. Offline

    tha d0ctor

  9. Offline

    tha d0ctor

    does this jar work on latest RB?
     
  10. Offline

    Salvarath

    I've installed this on my server but I have no idea how to use it. Can you show an installation guide and commands for it?
     
  11. This is a >library< for other plugins to use and it's deprecated as bukkit has it's own map API now.
     
  12. Offline

    Nerdoguy12

    What commands does it have?
     
  13. Offline

    Suprem20

    Download link doesn't work nor does the link for the updated plugin.
     
  14. Suprem20 so why do you complain? This is for CB 953... Do you really develop for that? We have a native map API since a long time...
     

Share This Page