• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UnknownDependencyException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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();
}
 
开发者ID:seeseemelk,项目名称:MockBukkit,代码行数:8,代码来源:PluginManagerMock.java


示例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;
}
 
开发者ID:Struck713,项目名称:UnlimitedPlugins,代码行数:31,代码来源:UnlimitedPlugins.java


示例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");
        }
    }
}
 
开发者ID:caoli5288,项目名称:economy,代码行数:14,代码来源:SubPluginLoader.java


示例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;
}
 
开发者ID:DevotedMC,项目名称:ExilePearl,代码行数:16,代码来源:TestPluginManager.java


示例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();
    }
}
 
开发者ID:dobrakmato,项目名称:pexel-platform,代码行数:10,代码来源:BukkitPluginLoader.java


示例6: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file)
        throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
    return delegate.loadPlugin(file);
}
 
开发者ID:VoxelGamesLib,项目名称:VoxelGamesLibv2,代码行数:6,代码来源:LoggedPluginManager.java


示例7: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
	return pm.loadPlugin(file);
}
 
开发者ID:DonkeyCore,项目名称:MinigameManager,代码行数:5,代码来源:MinigamePluginManagerWrapper.java


示例8: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException {
    throw new UnsupportedOperationException("Not supported yet");
}
 
开发者ID:caoli5288,项目名称:economy,代码行数:5,代码来源:SubPluginLoader.java


示例9: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException {
    throw new UnsupportedOperationException();
}
 
开发者ID:TechzoneMC,项目名称:TagTabAPI,代码行数:4,代码来源:FakePlugin.java


示例10: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
@Override
public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException {
	return delegate.loadPlugin(file);
}
 
开发者ID:MarcinWieczorek,项目名称:NovaGuilds,代码行数:5,代码来源:LoggedPluginManager.java


示例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);
    }
}
 
开发者ID:Lactem,项目名称:GameDispenser,代码行数:45,代码来源:GameLoader.java


示例12: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException {
	return null;
}
 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:4,代码来源:SimplePluginManager.java


示例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.
}
 
开发者ID:md-5,项目名称:iTag,代码行数:5,代码来源:TagAPI.java


示例14: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException; 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:2,代码来源:PluginLoader.java


示例15: loadPlugin

import org.bukkit.plugin.UnknownDependencyException; //导入依赖的package包/类
Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException; 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:2,代码来源:PluginManager.java



注:本文中的org.bukkit.plugin.UnknownDependencyException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StatelessKieSession类代码示例发布时间:2022-05-21
下一篇:
Java PolynomialSplineFunction类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap