squaremap icon indicating copy to clipboard operation
squaremap copied to clipboard

API docs for making addons are scarce

Open talwat opened this issue 1 year ago • 2 comments

Hi!

I'm making a custom land claim plugin, and I wanted to use the squaremap API to display claims on the map. Unfortunately, in the wiki, there is only one section about the "basics" that uses a bunch of terminology that isn't really explained.

So, I wanted to ask how I would go about learning the squaremap API and actually making something, despite the limited amount of information. This issue also serves just to ask whether the API docs will eventually be written or not.

talwat avatar May 30 '24 10:05 talwat

@talwat Did you ever figure it out? I am also making a plugin and I cannot, for the life of me understand how to use this api. Chatgpt is tripping giving me something like this Squaremap squaremap = (Squaremap) getServer().getPluginManager().getPlugin("Squaremap"); WorldIdentifier overworld_identifier = WorldIdentifier.create("minecraft", "overworld"); Optional<MapWorld> overworld = squaremap.getWorldIfEnabled(overworld_identifier); if (overworld.isPresent()) { Marker marker = Marker.icon(Point.of(55, 55), Icon.rectangle(Point.of(0, 0), Point.of(10, 10))., 10); }

    i cannot get it to work. Is there any other projects that have got this to work?

TaggartMaher avatar Aug 18 '24 19:08 TaggartMaher

Yeah, eventually, but squaremap is pretty similar to dynmap so as a desperate last attempt I checked the dynmap docs to fill in the gaps & used intellisense to find the right classes. It's all we have for now.

You could also take a look at my project to get an idea of how it works.

talwat avatar Aug 19 '24 04:08 talwat