本文整理汇总了Java中org.bukkit.plugin.UnknownDependencyException类的典型用法代码示例。如果您正苦于以下问题:Java UnknownDependencyException类的具体用法?Java UnknownDependencyException怎么用?Java UnknownDependencyException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UnknownDependencyException类属于org.bukkit.plugin包,在下文中一共展示了UnknownDependencyException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file)
throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException
{
// TODO Auto-generated method stub
throw new UnimplementedOperationException();
}
示例2: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public Plugin loadPlugin(CommandSender sender, File f, ArrayList<Plugin> loaded) {
Plugin pl = null;
for (Plugin pll : loaded) {
if (pll.getName().equals(f.getName().replaceAll(".jar", ""))) {
return null;
}
}
try {
pl = Bukkit.getPluginManager().loadPlugin(f);
} catch (UnknownDependencyException | InvalidPluginException | InvalidDescriptionException e) {
if (e instanceof UnknownDependencyException) {
sender.sendMessage("[UnlimitedPlugins] Tried to load the jar, " + f.getName()
+ " but failed because the required dependencies wheren't found.");
} else if (e instanceof InvalidPluginException) {
sender.sendMessage("[UnlimitedPlugins] Tried to load the jar, " + f.getName()
+ " but failed because the jar was invalid.");
} else if (e instanceof InvalidDescriptionException) {
sender.sendMessage("[UnlimitedPlugins] Tried to load the jar, " + f.getName()
+ " but failed because the plugin.yml was invalid.");
} else {
sender.sendMessage("[UnlimitedPlugins] Tried to load the jar, " + f.getName()
+ " but failed because an unknown error occurred.");
}
return null;
}
if (pl != null) {
Bukkit.getPluginManager().enablePlugin(pl);
}
return pl;
}
示例3: valid
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public static void valid(SubPlugin sub, PluginDescriptionFile description) throws InvalidPluginException {
if (Fun.INSTANCE.loaded.contains(sub)) {
throw new InvalidPluginException("Already loaded by sub-plugin loader");
} else if (Fun.INSTANCE.map.containsKey(description.getName())) {
throw new InvalidPluginException("Already loaded by origin");
}
for (String depend : description.getDepend()) {
val load = Fun.INSTANCE.map.get(depend);
if (load == null || !load.isEnabled()) {
throw new UnknownDependencyException("Depend plugin " + depend + " not found or enabled");
}
}
}
示例4: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public JavaPlugin loadPlugin(TestPlugin<?> p) throws InvalidPluginException, UnknownDependencyException {
final JavaPlugin plugin;
try {
plugin = (JavaPlugin)p.getPluginClass().newInstance();
} catch (Exception ex) {
throw new InvalidPluginException(ex);
}
if (plugin != null) {
plugins.add(plugin);
lookupNames.put(plugin.getDescription().getName(), plugin);
}
return plugin;
}
示例5: load
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public void load(final MinigameDescriptor plugin) {
try {
this.plugins.put(plugin, this.internal.loadPlugin(plugin.getJar()));
} catch (UnknownDependencyException | InvalidPluginException
| InvalidDescriptionException e) {
e.printStackTrace();
}
}
示例6: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file)
throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
return delegate.loadPlugin(file);
}
示例7: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
return pm.loadPlugin(file);
}
示例8: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException {
throw new UnsupportedOperationException("Not supported yet");
}
示例9: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException {
throw new UnsupportedOperationException();
}
示例10: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
return delegate.loadPlugin(file);
}
示例11: loadGameType
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public void loadGameType(File file, GameDescriptionFile description, boolean reload) throws InvalidGameException {
Validate.notNull(file, "File cannot be null");
Validate.notNull(description, "Description cannot be null");
if (!reload) {
Validate.isTrue(!loaders.containsKey(description.getName()), "Game type already loaded");
} else {
loaders.remove(description.getName());
GameType.remove(GameType.get(description.getName()));
}
if (!file.exists()) {
throw new InvalidGameException(new FileNotFoundException(file.getPath() + " does not exist"));
}
for (String game : description.getDepend()) {
if (loaders == null) {
throw new UnknownDependencyException(game);
}
GameClassLoader current = loaders.get(game);
if (current == null) {
throw new UnknownDependencyException(game);
}
}
final File dataFolder = new File(file.getParentFile(), description.getName());
try {
if (dataFolder.exists() && !dataFolder.isDirectory()) {
throw new InvalidGameException(FormatUtil.format(
"Projected datafolder: '{0}' for {1} ({2}) exists and is not a directory",
dataFolder,
description.getFullName(),
file
));
}
GameClassLoader loader = new GameClassLoader(this, file, getClass().getClassLoader(), description);
new GameType(description.getName(), description, dataFolder, loader);
loaders.put(description.getName(), loader);
} catch (Throwable e) {
throw new InvalidGameException(e);
}
}
示例12: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException {
return null;
}
示例13: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException
{
throw new UnsupportedOperationException( "Not supported yet." ); //To change body of generated methods, choose Tools | Templates.
}
示例14: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException;
示例15: loadPlugin
import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException;