Package fr.neatmonster.nocheatplus.components

Examples of fr.neatmonster.nocheatplus.components.NoCheatPlusAPI


  }
 
  private void init() {
    // Set some things from the global config.
    final ConfigFile config = ConfigManager.getConfigFile();
    final NoCheatPlusAPI api = NCPAPIProvider.getNoCheatPlusAPI();
    if (engine != null) {
      engine.clear();
      api.removeComponent(engine);
    }
    engine = new LetterEngine(config);
    api.addComponent(engine);
  }
View Full Code Here


    register(Bukkit.getPluginManager().getPlugin("NoCheatPlus")); // Store instead ?
  }
 
  private void unregister() {
    final ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
    final NoCheatPlusAPI api = NCPAPIProvider.getNoCheatPlusAPI();
    for (PacketAdapter adapter : registeredPacketAdapters) {
      try {
        protocolManager.removePacketListener(adapter);
        api.removeComponent(adapter); // Bit heavy, but consistent.
      } catch (Throwable t) {
        LogUtil.logWarning("[NoCheatPlus] Failed to unregister packet level hook: " + adapter.getClass().getName());
      }
    }
    registeredPacketAdapters.clear();
View Full Code Here

TOP

Related Classes of fr.neatmonster.nocheatplus.components.NoCheatPlusAPI

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.