API interface for interacting with EssentialsC's private message reply system.
The reply system tracks the last player each player messaged so that /r
can send a follow-up without specifying a target. External plugins that implement
custom messaging (e.g. staff chat, party chat) can integrate with this to keep
the reply target in sync.
Retrieve an instance via EssentialsCAPI.getReplyApi().
ReplyApi reply = APIProvider.getAPI().getReplyApi(); // after sending a custom message, register the reply target reply.setReplyTarget(sender.getUniqueId(), recipient.getUniqueId()); // check who the player would reply to UUID target = reply.getReplyTarget(player.getUniqueId());
Method Summary
| void |
setReplyTarget(UUID player, UUID target) Sets the reply target for the given player. Pass null to clear. |
| UUID |
getReplyTarget(UUID player) Returns the reply target UUID for the given player, or null if none is set. |
| void |
removeReplyTarget(UUID player) Removes the reply target for the given player. |
Sets the reply target for the given player. Pass null as the target to clear the reply target, which is equivalent to calling removeReplyTarget(UUID).
| player | the UUID of the player whose reply target to set; must not be null |
| target | the UUID of the player to reply to, or null to clear |
Returns the UUID of the player that the given player would reply to, or null if no reply target is set.
The returned UUID is not validated against currently online players — the target may have gone offline since the target was recorded.
Parameters:| player | the UUID of the player to look up; must not be null |
| UUID | the reply target UUID, or null if none is set |
Removes the reply target for the given player. Has no effect if the player has no reply target set.
Parameters:| player | the UUID of the player whose reply target to clear; must not be null |