Package org.bukkit.command

Examples of org.bukkit.command.SimpleCommandMap


            if (fallbackCommands != null) {
                commandMap = fallbackCommands;
            } else {
                Bukkit.getServer().getLogger().severe(plugin.getDescription().getName() +
                        ": Could not retrieve server CommandMap, using fallback instead!");
                fallbackCommands = commandMap = new SimpleCommandMap(Bukkit.getServer());
                Bukkit.getServer().getPluginManager().registerEvents(new FallbackRegistrationListener(fallbackCommands), plugin);
            }
        }
        return commandMap;
    }
View Full Code Here


 
  public boolean register(Plugin plugin, boolean override)
  {
    boolean ret = false;
   
    SimpleCommandMap scm = BukkitCommandUtil.getBukkitCommandMap();
   
    for (String alias : this.getAliases())
    {
      BukkitGlueCommand bgc = new BukkitGlueCommand(alias, this, plugin);
     
      if (override)
      {
        // Our commands are more important than your commands :P
        Map<String, Command> knownCommands = BukkitCommandUtil.getKnownCommandsFromSimpleCommandMap(scm);
        String lowerLabel = bgc.getName().trim().toLowerCase();
        knownCommands.remove(lowerLabel);
      }
     
      if (scm.register(MCore.get().getDescription().getName(), bgc))
      {
        ret = true;
      }
    }
   
View Full Code Here

            configuration.save(configFile);
        } catch (IOException e) {
            FMLLog.log(Level.INFO, e, "Could not save bukkit configuration file %s", configFile.getName());
        }

        commandMap = new SimpleCommandMap(wrapper);
        pluginManager = new FMLPluginManager(wrapper, commandMap);
        pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling"));
        pluginManager.registerInterface(FMLModLoader.class);
        pluginFolder = new File(evt.getModConfigurationDirectory().getParentFile(), "plugins");
View Full Code Here

      registeredListeners = true;
    }
  }
 
  public final static void clearCommands() {
    final SimpleCommandMap commandMap = Commands.commandMap;
    if (commandMap != null) {
      final Map<String, Command> cmKnownCommands = Commands.cmKnownCommands;
      final Set<String> cmAliases = Commands.cmAliases;
      assert cmKnownCommands != null;// && cmAliases != null;
      for (final ScriptCommand c : commands.values())
View Full Code Here

TOP

Related Classes of org.bukkit.command.SimpleCommandMap

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.