TabooLib/src/main/scala/io/izzel/taboolib/common/plugin/InternalPluginBridge.java

88 lines
2.6 KiB
Java
Raw Normal View History

2019-07-09 10:00:43 +00:00
package io.izzel.taboolib.common.plugin;
import io.izzel.taboolib.module.lite.SimpleVersionControl;
2019-07-09 12:00:16 +00:00
import org.bukkit.Location;
import org.bukkit.OfflinePlayer;
import org.bukkit.World;
2019-07-23 07:23:44 +00:00
import org.bukkit.configuration.file.FileConfiguration;
2019-07-09 10:00:43 +00:00
import org.bukkit.entity.Player;
2020-05-05 17:39:21 +00:00
import java.lang.instrument.ClassFileTransformer;
2019-07-09 12:00:16 +00:00
import java.util.Collection;
2019-07-09 10:00:43 +00:00
import java.util.List;
2019-07-11 17:48:15 +00:00
import java.util.Map;
2019-07-09 10:00:43 +00:00
/**
* @Author
* @Since 2019-07-09 17:10
*/
public abstract class InternalPluginBridge {
private static InternalPluginBridge handle;
public static InternalPluginBridge handle() {
return handle;
}
static {
try {
handle = (InternalPluginBridge) SimpleVersionControl.createNMS("io.izzel.taboolib.common.plugin.bridge.BridgeImpl").translateBridge().newInstance();
} catch (Throwable t) {
t.printStackTrace();
}
}
2019-07-09 12:00:16 +00:00
abstract public <T> T getRegisteredService(Class<? extends T> clazz);
2019-07-09 10:00:43 +00:00
abstract public String setPlaceholders(Player player, String args);
abstract public List<String> setPlaceholders(Player player, List<String> args);
2019-07-09 12:00:16 +00:00
abstract public void economyCreate(OfflinePlayer p);
abstract public void economyTake(OfflinePlayer p, double d);
abstract public void economyGive(OfflinePlayer p, double d);
abstract public double economyLook(OfflinePlayer p);
abstract public void permissionAdd(Player player, String perm);
abstract public void permissionRemove(Player player, String perm);
abstract public boolean permissionHas(Player player, String perm);
abstract public Collection<String> worldguardGetRegions(World world);
abstract public List<String> worldguardGetRegion(World world, Location location);
abstract public boolean economyHooked();
2019-07-09 10:00:43 +00:00
2019-07-09 12:00:16 +00:00
abstract public boolean permissionHooked();
2019-07-09 10:00:43 +00:00
2019-07-09 12:00:16 +00:00
abstract public boolean placeholderHooked();
2019-07-09 10:00:43 +00:00
2019-07-09 12:00:16 +00:00
abstract public boolean worldguardHooked();
2019-07-11 17:48:15 +00:00
2019-08-17 16:38:45 +00:00
abstract public boolean isPlaceholderExpansion(Class pluginClass);
abstract public void registerExpansion(Class pluginClass);
2019-07-11 17:48:15 +00:00
abstract public Map<String, Object> taboolibTLocaleSerialize(Object in);
2019-07-23 07:23:44 +00:00
2019-07-23 12:14:02 +00:00
abstract public FileConfiguration taboolibGetPlayerData(String username);
2019-07-23 09:14:49 +00:00
abstract public int protocolSupportPlayerVersion(Player player);
abstract public int viaVersionPlayerVersion(Player player);
abstract public Class getClass(String name) throws ClassNotFoundException;
2020-05-05 17:39:21 +00:00
abstract public ClassLoader getClassLoader();
abstract public void attach(ClassFileTransformer transformer, List<String> c);
abstract public void test();
2019-07-09 10:00:43 +00:00
}