How to use our API
repositories {maven {url = uri('https://repo.codemc.org/repository/maven-public/')}}​dependencies {compileOnly 'me.Lorenzo0111:RocketPlaceholders:VERSION'}
<repositories><repository><id>codemc-repo</id><url>https://repo.codemc.org/repository/maven-public/</url></repository></repositories>​<dependencies><dependency><groupId>me.Lorenzo0111</groupId><artifactId>RocketPlaceholders</artifactId><version>VERSION</version><scope>provided</scope></dependency></dependencies>
Download this and add it as dependency.
Replace version with ​​.
RocketPlaceholdersAPI api = Bukkit.getServicesManager().load(RocketPlaceholdersAPI.class);if (api != null) {this.getLogger().info("RocketPlaceholders hooked!");} else {this.getLogger().severe("Unable to find RocketPlaceholdersAPI, disabling..");this.getServer().getPluginManager().disablePlugin(this);}
this.getAPI().addPlaceholder(new PlaceholderBuilder("identifier", "text"));
this.api.addPlaceholder(new PlaceholderBuilder(new PlaceholderBuilder("identifier", "text").createPermissionNode("permission.example", "secret text"));
this.getAPI().getInternalPlaceholders().getStorageManager().getInternalPlaceholders();
this.getAPI().getInternalPlaceholders().getStorageManager().getExternalPlaceholders().getHashMap();
Placeholders added via API won't synchronized with MySQL
Click here to view our cookbook.