当前位置: 首页>>代码示例>>Java>>正文


Java JavaPlugin.getPlugin方法代码示例

本文整理汇总了Java中org.bukkit.plugin.java.JavaPlugin.getPlugin方法的典型用法代码示例。如果您正苦于以下问题:Java JavaPlugin.getPlugin方法的具体用法?Java JavaPlugin.getPlugin怎么用?Java JavaPlugin.getPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.plugin.java.JavaPlugin的用法示例。


在下文中一共展示了JavaPlugin.getPlugin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onEnable

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public void onEnable() {
	// Console sender
	getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "|----------|");
	getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "Starting Mortuus Terra chat.");

	core = JavaPlugin.getPlugin(MortuusTerraCore.class);

	frequencyManager = new FrequencyManager();
	fileManager = new FileManager();
	playerManager = new PlayerManager();
	textMessageManager = new TextMessageManager();
	messageScrambler = new MessageScrambler();

	getFileManager().loadFiles();

	registerCommands();
	registerListeners();
	
	// Console sender
	getServer().getConsoleSender().sendMessage(ChatColor.AQUA + "Mortuus Terra chat ready.");
	getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "|----------|");
}
 
开发者ID:kadeska,项目名称:MT_Communication,代码行数:23,代码来源:MortuusTerraChat.java

示例2: SCommandExecutor

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public SCommandExecutor() {
    super();
    this.plugin = JavaPlugin.getPlugin(BlockBallPlugin.class);
    if (this.plugin == null)
        throw new IllegalArgumentException("Pluginloader failed to load " + this.getClass().getSimpleName() + '.');
    this.plugin.getCommand(this.getCommand()).setExecutor(this);
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:8,代码来源:SCommandExecutor.java

示例3: reload

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public static void reload(Class<?> cls) {
    final Plugin plugin = JavaPlugin.getPlugin(BlockBallPlugin.class);
    if (plugin == null)
        throw new IllegalArgumentException("Pluginloader failed to load " + SLanguage.class.getSimpleName() + '.');
    final File file = new File(plugin.getDataFolder(), "lang.yml");
    if (!file.exists())
        buildFile(cls, file);
    loadFile(cls, file);
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:10,代码来源:SLanguage.java

示例4: GameController

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public GameController() {
    super(JavaPlugin.getPlugin(BlockBallPlugin.class));
    this.arenaManager = ArenaController.createArenaController(this);
    new EventCommandExecutor(this);
    if (Config.getInstance().getGlobalJoinCommand().isEnabled())
        new GlobalJoinCommandExecutor(this);
    if (Config.getInstance().getGlobalLeaveCommand().isEnabled())
        new GlobalLeaveCommandExecutor(this);
    new GameListener(this);
    this.run();
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:12,代码来源:GameController.java

示例5: ArenaController

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
private ArenaController(GameController manager) {
    super();
    this.fileManager = new ArenaFileManager(JavaPlugin.getPlugin(BlockBallPlugin.class));
    this.manager = manager;
    new ArenaCommandExecutor(this);
    new BlockBallCommandExecutor();
    Factory.initialize(JavaPlugin.getPlugin(BlockBallPlugin.class));
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:9,代码来源:ArenaController.java

示例6: getInstance

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public static CustomRecipesPlugin getInstance() {
	return JavaPlugin.getPlugin(CustomRecipesPlugin.class);
}
 
开发者ID:Jannyboy11,项目名称:CustomRecipes,代码行数:4,代码来源:CustomRecipesPlugin.java

示例7: createEngineController

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public static EngineController createEngineController() {
    return new EngineConfiguration(JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
 
开发者ID:Shynixn,项目名称:PetBlocks,代码行数:4,代码来源:Factory.java

示例8: createCostumesController

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public static CostumeController createCostumesController(String category) {
    return new CostumeConfiguration(category, JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
 
开发者ID:Shynixn,项目名称:PetBlocks,代码行数:4,代码来源:Factory.java

示例9: createMinecraftHeadsCostumesController

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public static CostumeController createMinecraftHeadsCostumesController() {
    return new MinecraftHeadConfiguration(JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
 
开发者ID:Shynixn,项目名称:PetBlocks,代码行数:4,代码来源:Factory.java

示例10: createGUIItemsController

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public static OtherGUIItemsController createGUIItemsController() {
    return new FixedItemConfiguration(JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
 
开发者ID:Shynixn,项目名称:PetBlocks,代码行数:4,代码来源:Factory.java

示例11: getPlugin

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
private static Plugin getPlugin() {
    return JavaPlugin.getPlugin(AstralEditPlugin.class);
}
 
开发者ID:Shynixn,项目名称:AstralEdit,代码行数:4,代码来源:SelectionHolder.java

示例12: reload

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
/**
 * Reloads the config
 */
public void reload() {
    this.plugin = JavaPlugin.getPlugin(PetBlocksPlugin.class);
    this.plugin.reloadConfig();
}
 
开发者ID:Shynixn,项目名称:PetBlocks,代码行数:8,代码来源:SimpleConfig.java

示例13: PetDataCommandExecutor

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public PetDataCommandExecutor(PetBlockManager petDataManager) throws Exception {
    super(((MemorySection) JavaPlugin.getPlugin(PetBlocksPlugin.class).getConfig().get("petblocks-gui")).getValues(false)
            , JavaPlugin.getPlugin(PetBlocksPlugin.class));
    this.manager = petDataManager;
    this.plugin = JavaPlugin.getPlugin(PetBlocksPlugin.class);
}
 
开发者ID:Shynixn,项目名称:PetBlocks,代码行数:7,代码来源:PetDataCommandExecutor.java

示例14: SChatMenuManager

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
public SChatMenuManager() {
    super(JavaPlugin.getPlugin(BlockBallPlugin.class));
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:4,代码来源:SChatMenuManager.java

示例15: Config

import org.bukkit.plugin.java.JavaPlugin; //导入方法依赖的package包/类
private Config() {
    super();
    this.plugin = JavaPlugin.getPlugin(BlockBallPlugin.class);
    this.reload();
}
 
开发者ID:Shynixn,项目名称:BlockBall,代码行数:6,代码来源:Config.java


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