Fix bogus warning message on markers component
This commit is contained in:
parent
8524eecad5
commit
7d89fe094a
2 changed files with 7 additions and 2 deletions
|
|
@ -1254,7 +1254,9 @@ public class DynmapPlugin extends JavaPlugin {
|
|||
}
|
||||
return markerapi;
|
||||
}
|
||||
|
||||
public boolean markerAPIInitialized() {
|
||||
return (markerapi != null);
|
||||
}
|
||||
/**
|
||||
* Register markers API - used by component to supply marker API to plugin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ public class MarkersComponent extends ClientComponent {
|
|||
super(plugin, configuration);
|
||||
/* Register API with plugin, if needed */
|
||||
api = (MarkerAPIImpl)plugin.getMarkerAPI();
|
||||
if(api == null) {
|
||||
if(plugin.markerAPIInitialized()) {
|
||||
api = (MarkerAPIImpl)plugin.getMarkerAPI();
|
||||
}
|
||||
else {
|
||||
api = MarkerAPIImpl.initializeMarkerAPI(plugin);
|
||||
plugin.registerMarkerAPI(api);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue