當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。