本文整理匯總了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 + "|----------|");
}
示例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);
}
示例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);
}
示例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();
}
示例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));
}
示例6: getInstance
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
public static CustomRecipesPlugin getInstance() {
return JavaPlugin.getPlugin(CustomRecipesPlugin.class);
}
示例7: createEngineController
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
public static EngineController createEngineController() {
return new EngineConfiguration(JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
示例8: createCostumesController
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
public static CostumeController createCostumesController(String category) {
return new CostumeConfiguration(category, JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
示例9: createMinecraftHeadsCostumesController
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
public static CostumeController createMinecraftHeadsCostumesController() {
return new MinecraftHeadConfiguration(JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
示例10: createGUIItemsController
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
public static OtherGUIItemsController createGUIItemsController() {
return new FixedItemConfiguration(JavaPlugin.getPlugin(PetBlocksPlugin.class));
}
示例11: getPlugin
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
private static Plugin getPlugin() {
return JavaPlugin.getPlugin(AstralEditPlugin.class);
}
示例12: reload
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
/**
* Reloads the config
*/
public void reload() {
this.plugin = JavaPlugin.getPlugin(PetBlocksPlugin.class);
this.plugin.reloadConfig();
}
示例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);
}
示例14: SChatMenuManager
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
public SChatMenuManager() {
super(JavaPlugin.getPlugin(BlockBallPlugin.class));
}
示例15: Config
import org.bukkit.plugin.java.JavaPlugin; //導入方法依賴的package包/類
private Config() {
super();
this.plugin = JavaPlugin.getPlugin(BlockBallPlugin.class);
this.reload();
}