2022-05-17 19:04:23 +00:00
|
|
|
// This claas was created by JaTiTV
|
|
|
|
|
2022-11-01 12:20:53 +00:00
|
|
|
package net.t2code.commandguiv2.Spigot.system;
|
2022-05-17 19:04:23 +00:00
|
|
|
|
2022-11-01 12:20:53 +00:00
|
|
|
import net.t2code.commandguiv2.Spigot.Main;
|
2022-05-17 19:04:23 +00:00
|
|
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
public class Papi extends PlaceholderExpansion {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getIdentifier() {
|
|
|
|
return "commandgui";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getAuthor() {
|
2022-07-09 07:13:10 +00:00
|
|
|
return Main.getPlugin().getDescription().getAuthors().toString();
|
2022-05-17 19:04:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String getVersion() {
|
2022-07-09 07:13:10 +00:00
|
|
|
return Main.getPlugin().getDescription().getVersion();
|
2022-05-17 19:04:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean canRegister() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean persist() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String onPlaceholderRequest(Player p, String params) {
|
|
|
|
if (params.contains("useitem_boolean")) {
|
|
|
|
Placeholder.useitem_boolean(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (params.contains("useitem")) {
|
|
|
|
Placeholder.useitem(p);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (params.contains("slot")) {
|
|
|
|
Placeholder.slot(p);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|