mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
#556: Allow sending messages from specific UUIDs
By: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
parent
73f42f8bd4
commit
f341d8d29a
@ -1,8 +1,10 @@
|
||||
package org.bukkit.command;
|
||||
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.permissions.Permissible;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface CommandSender extends Permissible {
|
||||
|
||||
@ -20,6 +22,22 @@ public interface CommandSender extends Permissible {
|
||||
*/
|
||||
public void sendMessage(@NotNull String[] messages);
|
||||
|
||||
/**
|
||||
* Sends this sender a message
|
||||
*
|
||||
* @param message Message to be displayed
|
||||
* @param sender The sender of this message
|
||||
*/
|
||||
public void sendMessage(@Nullable UUID sender, @NotNull String message);
|
||||
|
||||
/**
|
||||
* Sends this sender multiple messages
|
||||
*
|
||||
* @param messages An array of messages to be displayed
|
||||
* @param sender The sender of this message
|
||||
*/
|
||||
public void sendMessage(@Nullable UUID sender, @NotNull String[] messages);
|
||||
|
||||
/**
|
||||
* Returns the server instance that this command is running on
|
||||
*
|
||||
|
@ -1,6 +1,8 @@
|
||||
package org.bukkit.conversations;
|
||||
|
||||
import java.util.UUID;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* The Conversable interface is used to indicate objects that can have
|
||||
@ -54,4 +56,12 @@ public interface Conversable {
|
||||
* @param message Message to be displayed
|
||||
*/
|
||||
public void sendRawMessage(@NotNull String message);
|
||||
|
||||
/**
|
||||
* Sends this sender a message raw
|
||||
*
|
||||
* @param message Message to be displayed
|
||||
* @param sender The sender of this message
|
||||
*/
|
||||
public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
package org.bukkit.conversations;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionAttachment;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
*/
|
||||
@ -48,6 +51,11 @@ public class FakeConversable implements Conversable {
|
||||
lastSentMessage = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendRawMessage(@Nullable UUID sender, @NotNull String message) {
|
||||
this.sendRawMessage(message);
|
||||
}
|
||||
|
||||
public Server getServer() {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user