mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 05:35:44 +01:00
Slight optimization in PlaceholdersManager
This commit is contained in:
parent
571e734aa9
commit
3f62e2f367
@ -25,10 +25,7 @@ public class PlaceholdersManager {
|
|||||||
*/
|
*/
|
||||||
public void registerPlaceholder(String placeholder, PlaceholderReplacer replacer) {
|
public void registerPlaceholder(String placeholder, PlaceholderReplacer replacer) {
|
||||||
// Register it in PlaceholderAPI
|
// Register it in PlaceholderAPI
|
||||||
plugin.getHooks().getHook("PlaceholderAPI").ifPresent(hook -> {
|
plugin.getHooks().getHook("PlaceholderAPI").ifPresent(hook -> ((PlaceholderAPIHook) hook).registerBentoBoxPlaceholder(placeholder, replacer));
|
||||||
PlaceholderAPIHook placeholderAPIHook = (PlaceholderAPIHook) hook;
|
|
||||||
placeholderAPIHook.registerBentoBoxPlaceholder(placeholder, replacer);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -42,9 +39,6 @@ public class PlaceholdersManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Register it in PlaceholderAPI
|
// Register it in PlaceholderAPI
|
||||||
plugin.getHooks().getHook("PlaceholderAPI").ifPresent(hook -> {
|
plugin.getHooks().getHook("PlaceholderAPI").ifPresent(hook -> ((PlaceholderAPIHook) hook).registerAddonPlaceholder(addon, placeholder, replacer));
|
||||||
PlaceholderAPIHook placeholderAPIHook = (PlaceholderAPIHook) hook;
|
|
||||||
placeholderAPIHook.registerAddonPlaceholder(addon, placeholder, replacer);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user