Class PlaceholderContextBuilder
java.lang.Object
org.kingdoms.locale.compiler.placeholders.PlaceholderContextBuilder
- All Implemented Interfaces:
Cloneable,PlaceholderContextProvider
- Direct Known Subclasses:
MessageBuilder
public class PlaceholderContextBuilder
extends Object
implements PlaceholderContextProvider, Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,PlaceholderContextProvider> Can be either: PlaceholderTranslationContext MessageObjectBuilder any other object counts as a raw placeholderFields inherited from interface org.kingdoms.locale.compiler.placeholders.PlaceholderContextProvider
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllIfAbsent(Map<String, Object> placeholders) voidaddGroupedPlaceholder(String id, PlaceholderContextProvider provider) booleanclone()getPlaceholder(String str) booleanother(org.bukkit.entity.Player other) placeholders(Object... edits) processPlaceholder(String placeholder) voidtoString()withContext(org.bukkit.command.CommandSender sender) withContext(org.bukkit.entity.Player player) withContext(org.bukkit.OfflinePlayer player) withContext(Group group) withContext(Kingdom kingdom) withContext(Nation nation)
-
Field Details
-
placeholders
Can be either: PlaceholderTranslationContext MessageObjectBuilder any other object counts as a raw placeholder -
groupedPlaceholders
-
main
-
relationalSecond
-
-
Constructor Details
-
PlaceholderContextBuilder
public PlaceholderContextBuilder()
-
-
Method Details
-
processPlaceholder
- Specified by:
processPlaceholderin interfacePlaceholderContextProvider
-
switchContext
public void switchContext() -
clone
-
canHandleRelational
public boolean canHandleRelational() -
addGroupedPlaceholder
-
placeholders
-
inheritPlaceholders
-
inheritContext
-
addAll
-
addAllIfAbsent
-
raws
-
getPlaceholders
-
withContext
-
hasContext
public boolean hasContext() -
withContext
-
withContext
-
withContext
-
withContext
-
withContext
-
other
-
other
-
resetPlaceholders
-
parse
-
raw
-
getPlaceholder
-
toString
-