T - Message Type stored. For example BaseComponent[] for Bungeecordpublic abstract class AbstractCommandResponseCache<T> extends Object
| Constructor and Description |
|---|
AbstractCommandResponseCache() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
format(CommandMessage message,
Object... args) |
T |
getOrAddCachedMessage(CommandMessage message,
Object... args)
If the message has no arguments:
If cached: return cached message. If not cached: transform it, add the message to cache and return the message. It will only transform the message if the message has one or more arguments |
protected abstract T |
transformMessage(String message)
Transforms a string (raw input) into a format that can be sent to the player
|
protected abstract T transformMessage(String message)
message - he message to transformpublic T getOrAddCachedMessage(CommandMessage message, Object... args)
message - the command messageargs - the argumentsprotected String format(CommandMessage message, Object... args)
Copyright © 2021 GeyserMC. All rights reserved.