Represents a server implementation.
| 56 | * Represents a server implementation. |
| 57 | */ |
| 58 | public interface Server extends PluginMessageRecipient { |
| 59 | |
| 60 | /** |
| 61 | * Used for all administrative messages, such as an operator using a |
| 62 | * command. |
| 63 | * <p> |
| 64 | * For use in {@link #broadcast(java.lang.String, java.lang.String)}. |
| 65 | */ |
| 66 | public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin"; |
| 67 | |
| 68 | /** |
| 69 | * Used for all announcement messages, such as informing users that a |
| 70 | * player has joined. |
| 71 | * <p> |
| 72 | * For use in {@link #broadcast(java.lang.String, java.lang.String)}. |
| 73 | */ |
| 74 | public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user"; |
| 75 | |
| 76 | /** |
| 77 | * Gets the name of this server implementation. |
| 78 | * |
| 79 | * @return name of this server implementation |
| 80 | */ |
| 81 | @NotNull |
| 82 | public String getName(); |
| 83 | |
| 84 | /** |
| 85 | * Gets the version string of this server implementation. |
| 86 | * |
| 87 | * @return version of this server implementation |
| 88 | */ |
| 89 | @NotNull |
| 90 | public String getVersion(); |
| 91 | |
| 92 | /** |
| 93 | * Gets the Bukkit version that this server is running. |
| 94 | * |
| 95 | * @return version of Bukkit |
| 96 | */ |
| 97 | @NotNull |
| 98 | public String getBukkitVersion(); |
| 99 | |
| 100 | /** |
| 101 | * Gets a view of all currently logged in players. This {@linkplain |
| 102 | * Collections#unmodifiableCollection(Collection) view} is a reused |
| 103 | * object, making some operations like {@link Collection#size()} |
| 104 | * zero-allocation. |
| 105 | * <p> |
| 106 | * The collection is a view backed by the internal representation, such |
| 107 | * that, changes to the internal state of the server will be reflected |
| 108 | * immediately. However, the reuse of the returned collection (identity) |
| 109 | * is not strictly guaranteed for future or all implementations. Casting |
| 110 | * the collection, or relying on interface implementations (like {@link |
| 111 | * Serializable} or {@link List}), is deprecated. |
| 112 | * <p> |
| 113 | * Iteration behavior is undefined outside of self-contained main-thread |
| 114 | * uses. Normal and immediate iterator use without consequences that |
| 115 | * affect the collection are fully supported. The effects following |
no outgoing calls
no test coverage detected