Skip to content

Commit

Permalink
Minor API edits and documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwolfg11 committed Mar 28, 2022
1 parent e1cf783 commit c285b16
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface MapTownyPlugin {
LayerManager getLayerManager();

/**
* Get the indepdent platform interface for the web-map being used.
* Get the independent platform interface for the web-map being used.
*
* May be null if plugin failed to load correctly.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.UUID;

/**
* Event called when a town is about to be rendered on the Pl3xMap for a specific world.
* Event called when a town is about to be rendered on the web-map for a specific world.
*
* Cancelling this event will prevent this town from being rendered in the world on the Pl3xMap.
* This includes not rendering any homeblock or outpost icons for the town in the world.
Expand All @@ -59,26 +59,55 @@ public WorldRenderTownEvent(String worldName, String townName, UUID townUUID, Li
this.markerOptionsBuilder = markerOptionsBuilder;
}

/**
* Get the name of the town being rendered.
*
* @return name of town being rendered.
*/
@NotNull
public String getTownName() {
return townName;
}

/**
* Get the UUID of the town being rendered.
*
* @return uuid of town being rendered.
*/
@NotNull
public UUID getTownUUID() {
return townUUID;
}

/**
* Get the name of the world where the town is being rendered.
*
* @return name of world.
*/
@NotNull
public String getWorldName() {
return worldName;
}

/**
* Get the list of polygons that make up the outline of the town being rendered.
*
* NOTE: This list is directly modifiable.
*
* @return list of polygons that make up town outline.
*/
@NotNull
public List<Polygon> getMultiPolygon() {
return polygons;
}

/**
* Get the marker options for the town outline.
*
* NOTE: These options are directly modifiable.
*
* @return marker options for the town outline.
*/
@NotNull
public MarkerOptions.Builder getMarkerOptions() {
return markerOptionsBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public int getLayerPriority() {
return layerPriority;
}

public int getzIndex() {
public int getZIndex() {
return zIndex;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public BlueMapWorldWrapper(WorldIdentifier worldIdentifier, Logger errorLogger,
}
}

return new BlueMapLayerWrapper(markerProcessor, layerKey, worldIdentifier, options.getzIndex());
return new BlueMapLayerWrapper(markerProcessor, layerKey, worldIdentifier, options.getZIndex());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public DynmapWorldWrapper(DynmapAPI dynmapAPI, String worldName) {
markerSet.setMarkerSetLabel(options.getName());
}

return new DynmapLayerWrapper(dynmapAPI, worldName, markerSet, options.getzIndex());
return new DynmapLayerWrapper(dynmapAPI, worldName, markerSet, options.getZIndex());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static Pl3xMapWorldWrapper from(net.pl3x.map.api.MapWorld pMapWorld) {
net.pl3x.map.api.SimpleLayerProvider layerProvider = SimpleLayerProvider.builder(options.getName())
.defaultHidden(options.isDefaultHidden())
.layerPriority(options.getLayerPriority())
.zIndex(options.getzIndex())
.zIndex(options.getZIndex())
.showControls(options.showControls())
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static SquareMapWorldWrapper from(xyz.jpenilla.squaremap.api.MapWorld sqM
SimpleLayerProvider layerProvider = SimpleLayerProvider.builder(options.getName())
.defaultHidden(options.isDefaultHidden())
.layerPriority(options.getLayerPriority())
.zIndex(options.getzIndex())
.zIndex(options.getZIndex())
.showControls(options.showControls())
.build();

Expand Down

0 comments on commit c285b16

Please sign in to comment.