Tabnine Logo
PlaceholderAPI.registerPlaceholderHook
Code IndexAdd Tabnine to your IDE (free)

How to use
registerPlaceholderHook
method
in
me.clip.placeholderapi.PlaceholderAPI

Best Java code snippets using me.clip.placeholderapi.PlaceholderAPI.registerPlaceholderHook (Showing top 5 results out of 315)

origin: PlaceholderAPI/PlaceholderAPI

public boolean hook() {
 return PlaceholderAPI.registerPlaceholderHook(identifier, this);
}
origin: gvlfm78/BukkitOldCombatMechanics

  @Override
  public void init(OCMMain plugin){
    System.out.println("Registering hook...");
    PlaceholderAPI.registerPlaceholderHook("ocm", new PlaceholderHook() {
      @Override
      public String onPlaceholderRequest(Player player, String identifier){
        System.out.println("Hook called for " + player.getName() + " with identifier '" + identifier + "'");
        if(identifier.equals("pvp_mode")){
          return ModuleAttackCooldown.getPVPMode(player).getName();
        }
        return null;
      }
    });
  }
}
origin: PlaceholderAPI/PlaceholderAPI

@Deprecated
public static boolean registerPlaceholderHook(Plugin plugin, PlaceholderHook placeholderHook) {
 return plugin != null && registerPlaceholderHook(plugin.getName(), placeholderHook);
}
origin: elBukkit/MagicPlugin

public PlaceholderAPIManager(MageController controller) {
  this.controller = controller;
  if (!PlaceholderAPI.registerPlaceholderHook("magic", this)) {
    controller.getLogger().warning("PlaceholderAPI integration failed");
  } else {
    controller.getLogger().info("PlaceholderAPI integration enabled. Available placeholders:");
    controller.getLogger().info("magic_path, magic_class, magic_wand, magic_spell");
  }
}
origin: PlaceholderAPI/PlaceholderAPI

public static boolean registerExpansion(PlaceholderExpansion ex) {
 if (registerPlaceholderHook(ex.getIdentifier(), ex)) {
  Bukkit.getPluginManager().callEvent(new ExpansionRegisterEvent(ex));
  return true;
 }
 return false;
}
me.clip.placeholderapiPlaceholderAPIregisterPlaceholderHook

Javadoc

Register a new placeholder hook

Popular methods of PlaceholderAPI

  • setPlaceholders
  • getPlaceholders
    Get map of registered placeholders
  • getRegisteredPlaceholderPlugins
  • getExpansions
  • getRegisteredIdentifiers
    Get all registered placeholder identifiers
  • isRegistered
    check if a specific placeholder identifier is currently registered
  • registerExpansion
  • setBracketPlaceholders
  • setRelationalPlaceholders
    set relational placeholders in the text specified placeholders are matched with the pattern %% when
  • unregisterAll
    unregister ALL placeholder hooks that are currently registered
  • unregisterAllProvidedExpansions
    unregister all expansions provided by PlaceholderAPI
  • unregisterExpansion
  • unregisterAllProvidedExpansions,
  • unregisterExpansion,
  • unregisterPlaceholderHook

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Collectors (java.util.stream)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now