mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:21:37 +01:00
Fixed dupe message when console /says
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
715dcf90c8
commit
48bf69084d
@ -3,6 +3,7 @@ package org.bukkit.command.defaults;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
|
||||
public class SayCommand extends VanillaCommand {
|
||||
public SayCommand() {
|
||||
@ -20,8 +21,18 @@ public class SayCommand extends VanillaCommand {
|
||||
return false;
|
||||
}
|
||||
|
||||
Bukkit.getLogger().info("[" + sender.getName() + "] " + args[1]);
|
||||
Bukkit.broadcastMessage("[Server] " + args[1]);
|
||||
String message = "";
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (i > 0) message += " ";
|
||||
message += args[i];
|
||||
}
|
||||
|
||||
if (!(sender instanceof ConsoleCommandSender)) {
|
||||
Bukkit.getLogger().info("[" + sender.getName() + "] " + message);
|
||||
}
|
||||
|
||||
Bukkit.broadcastMessage("[Server] " + message);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user