mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Add radius/same-world/same-server to channel options
This commit is contained in:
1 parent
ddb6998bc8
commit
60285830d4
11 files changed
+259
No files matched your search
@@ -121,6 +121,16 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer {
|
||||
*/
|
||||
@MonotonicNonNull String permission();
|
||||
|
||||
/**
|
||||
* The distance from the sender players must be to receive chat messages.<br>
|
||||
* Return of '0' means players must be in the same world/server.<br>
|
||||
* Return of '-1' means there is no radius.
|
||||
*
|
||||
* @return the channel radius
|
||||
* @since 2.0.8
|
||||
*/
|
||||
double radius();
|
||||
|
||||
/**
|
||||
* Represents the result of a channel permission check.
|
||||
*
|
||||
|
||||
@@ -57,6 +57,24 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the distance from the other {@link CarbonPlayer}, or -1 if the players are not in the same world.
|
||||
*
|
||||
* @param other the other player
|
||||
* @return the distance from the other player, or -1
|
||||
* @since 2.0.8
|
||||
*/
|
||||
double distanceSquaredFrom(final CarbonPlayer other);
|
||||
|
||||
/**
|
||||
* Returns if both players are in the same world or server.
|
||||
*
|
||||
* @param other the other player
|
||||
* @return if both players are in the same world/server
|
||||
* @since 2.0.8
|
||||
*/
|
||||
boolean sameWorldAs(final CarbonPlayer other);
|
||||
|
||||
/**
|
||||
* Gets the player's username.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user