New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[B+C] Add API to use 1.7 chat features. Adds BUKKIT-5245 #1111
base: master
Are you sure you want to change the base?
Changes from all commits
dff7352
0c577dc
5375e34
a844dc3
6c4cd36
d45527f
734978a
6ae81e6
5ec90a0
8af1389
9fe76be
7df8f44
f457284
b4abdef
db58a06
074bde3
8d74fcb
090dc73
73e4a63
9f814e4
33e6fae
d98d04e
ae2c82e
c929fc3
270c9f3
a26aae7
0a356c0
91f1321
ec799c8
e1bb1e7
6c3dbf2
d8b1861
9a1d7b1
34799da
7b13b43
7f1e301
caed86c
f62d47b
5f89c99
210c99f
869402e
51bdb2e
33044d5
48bc47a
a0111e0
83d7145
119cde4
5f1c443
00b7652
7e1908f
a9927d1
10c879d
4d595ac
05fe519
6f279f3
057b8eb
b11d0a3
ec5be3d
f9c611d
ade1877
8c1e88f
d20d306
830aad1
1d1875d
5fb2d36
c80cfd7
9aea521
ce341e8
a42dc5b
04b84b6
79252ca
ec23ace
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
import java.util.logging.Logger; | ||
|
||
import org.bukkit.Warning.WarningState; | ||
import org.bukkit.chat.Message; | ||
import org.bukkit.command.CommandException; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.command.ConsoleCommandSender; | ||
|
@@ -236,6 +237,17 @@ public interface Server extends PluginMessageRecipient { | |
*/ | ||
public int broadcastMessage(String message); | ||
|
||
/** | ||
* Broadcast a rich message to all players. | ||
* <p> | ||
* This is the same as calling {@link #broadcast(Message, String)} | ||
* to {@link #BROADCAST_CHANNEL_USERS} | ||
* | ||
* @param message the rich message | ||
* @return the number of players | ||
*/ | ||
public int broadcastMessage(Message message); | ||
|
||
/** | ||
* Gets the name of the update folder. The update folder is used to safely | ||
* update plugins at the right moment on a plugin load. | ||
|
@@ -594,6 +606,17 @@ public interface Server extends PluginMessageRecipient { | |
*/ | ||
public int broadcast(String message, String permission); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so, no. If you just want to broadcast a single |
||
|
||
/** | ||
* Broadcasts the specified rich message to every user with the given | ||
* permission name. | ||
* | ||
* @param message rich message to broadcast | ||
* @param permission the required permission {@link Permissible | ||
* permissibles} must have to receive the broadcast | ||
* @return number of message recipients | ||
*/ | ||
public int broadcast(Message message, String permission); | ||
|
||
/** | ||
* Gets the player by the given name, regardless if they are offline or | ||
* online. | ||
|
@@ -743,9 +766,27 @@ public interface Server extends PluginMessageRecipient { | |
* @param type The type of inventory to create. | ||
* @param title The title of the inventory, to be displayed when it is viewed. | ||
* @return The new inventory. | ||
* @deprecated This method now uses {@link Message} to set the title. Use | ||
* {@link #createInventory(InventoryHolder, InventoryType, Message)} | ||
* instead. | ||
*/ | ||
@Deprecated | ||
Inventory createInventory(InventoryHolder owner, InventoryType type, String title); | ||
|
||
/** | ||
* Creates an empty inventory with the specified type and title. If the type | ||
* is {@link InventoryType#CHEST}, the new inventory has a size of 27; | ||
* otherwise the new inventory has the normal size for its type.<br /> | ||
* It should be noted that some inventory types do not support titles and | ||
* may not render with said titles on the Minecraft client. | ||
* | ||
* @param owner The holder of the inventory; can be null if there's no holder. | ||
* @param type The type of inventory to create. | ||
* @param title The title of the inventory, to be displayed when it is viewed. | ||
* @return The new inventory. | ||
*/ | ||
Inventory createInventory(InventoryHolder owner, InventoryType type, Message title); | ||
|
||
/** | ||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the | ||
* specified size. | ||
|
@@ -767,9 +808,25 @@ public interface Server extends PluginMessageRecipient { | |
* viewed | ||
* @return a new inventory | ||
* @throws IllegalArgumentException if the size is not a multiple of 9 | ||
* @deprecated This method now uses {@link Message} to set the title. Use | ||
* {@link #createInventory(InventoryHolder, int, Message)} instead. | ||
*/ | ||
@Deprecated | ||
Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException; | ||
|
||
/** | ||
* Creates an empty inventory of type {@link InventoryType#CHEST} with the | ||
* specified size and title. | ||
* | ||
* @param owner the holder of the inventory, or null to indicate no holder | ||
* @param size a multiple of 9 as the size of inventory to create | ||
* @param title the title of the inventory, displayed when inventory is | ||
* viewed | ||
* @return a new inventory | ||
* @throws IllegalArgumentException if the size is not a multiple of 9 | ||
*/ | ||
Inventory createInventory(InventoryHolder owner, int size, Message title) throws IllegalArgumentException; | ||
|
||
/** | ||
* Gets user-specified limit for number of monsters that can spawn in a | ||
* chunk. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a
@Deprecation
annotation missing here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, no. If you just want to broadcast a single
String
, eventually withChatcolor
s, there's no problem using this.