Package com.onarandombox.MultiverseCore

Examples of com.onarandombox.MultiverseCore.MultiverseCore


  public static boolean readWorldConfiguration(WorldConfig config) {
    if (MyWorlds.isMultiverseEnabled) {
      try {
        // Obtain Multiverse
        MultiverseCore core = CommonUtil.tryCast(CommonUtil.getPlugin("Multiverse-Core"), MultiverseCore.class);
        if (core == null) {
          MyWorlds.plugin.log(Level.WARNING, "Could not find Multiverse Core main plugin instance");
          return false;
        }

        // Obtain the world configuration information in MV
        MVWorldManager manager = core.getMVWorldManager();
        Map<String, WorldProperties> propsMap = SafeField.get(manager, "worldsFromTheConfig");
        WorldProperties world = propsMap.get(config.worldname);

        // Newly created world: no configuration in MV is available
        if (world == null) {
View Full Code Here


            pluginDirectory.mkdirs();
            Assert.assertTrue(pluginDirectory.exists());

            MockGateway.MOCK_STANDARD_METHODS = false;

            core = PowerMockito.spy(new MultiverseCore());
            PowerMockito.doAnswer(new Answer<Void>() {
                @Override
                public Void answer(InvocationOnMock invocation) throws Throwable {
                    return null; // don't run metrics in tests
                }
View Full Code Here

     * Note: You can't override this, use {@link #onPluginEnable()} instead!
     * @see #onPluginEnable()
     */
    @Override
    public final void onEnable() {
        MultiverseCore theCore = (MultiverseCore) this.getServer().getPluginManager().getPlugin("Multiverse-Core");
        if (theCore == null) {
            this.getLogger().severe("Core not found! The plugin dev needs to add a dependency!");
            this.getLogger().severe("Disabling!");
            this.getServer().getPluginManager().disablePlugin(this);
            return;
        }
        if (theCore.getProtocolVersion() < this.getProtocolVersion()) {
            this.getLogger().severe("You need a newer version of Multiverse-Core!");
            this.getLogger().severe("Disabling!");
            this.getServer().getPluginManager().disablePlugin(this);
            return;
        }
View Full Code Here

TOP

Related Classes of com.onarandombox.MultiverseCore.MultiverseCore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.