mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Initial rework to Placeholder Manager
This commit is contained in:
parent
2fe3f5c661
commit
a53729bed0
@ -0,0 +1,20 @@
|
||||
package com.songoda.skyblock.placeholder.wip;
|
||||
|
||||
public class Placeholder {
|
||||
|
||||
private final String placeholder;
|
||||
private final String result;
|
||||
|
||||
public Placeholder(String placeholder, String result) {
|
||||
this.placeholder = placeholder;
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getPlaceholder() {
|
||||
return placeholder;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.songoda.skyblock.placeholder.wip;
|
||||
|
||||
public class PlaceholderManager {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.songoda.skyblock.placeholder.wip;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class PlaceholderProcessor {
|
||||
|
||||
public static String processPlaceholder(Player player, String placeholder) {
|
||||
if(player == null || placeholder == null) {
|
||||
return "";
|
||||
}
|
||||
return "To be implemented";
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.songoda.skyblock.placeholder.wip.hook;
|
||||
|
||||
public class MVdWPlaceholder {
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.songoda.skyblock.placeholder.wip.hook;
|
||||
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.placeholder.wip.PlaceholderProcessor;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class PlaceholderAPI extends PlaceholderExpansion {
|
||||
|
||||
private final SkyBlock plugin;
|
||||
|
||||
public PlaceholderAPI(SkyBlock plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public String getIdentifier() {
|
||||
return "fabledskyblock";
|
||||
}
|
||||
|
||||
public String getPlugin() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return plugin.getDescription().getAuthors().get(0);
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return plugin.getDescription().getVersion();
|
||||
}
|
||||
|
||||
public boolean persist() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public String onPlaceholderRequest(Player player, String identifier) {
|
||||
|
||||
return PlaceholderProcessor.processPlaceholder(player, "fabledskyblock_" + identifier);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user