Change from logging to sending messages to console when appropriate

master 1.1.1
dugo3number2 2023-06-29 19:46:56 -05:00
parent 64bc6e88d0
commit c0666d78ac
4 changed files with 7 additions and 8 deletions

View File

@ -3,7 +3,7 @@ plugins {
}
group = 'xyz.daviddgtnt.sc.doctorattend'
version = '1.1'
version = '1.1.1'
repositories {
mavenCentral()

View File

@ -14,7 +14,7 @@ public class DoctorAttendCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (sender instanceof ConsoleCommandSender) {
Bukkit.getLogger().warning("You cannot use this command from the console!");
sender.sendMessage("You cannot use this command from the console!");
return true;
}

View File

@ -16,10 +16,9 @@ public class NeedDoctorCommand implements CommandExecutor {
Player player;
if (args.length < 1) {
if (sender instanceof Player) {
player = (Player) sender;
player.sendMessage(ChatColor.RED + "You can't use that command! Go to the hospital if you need a doctor!");
sender.sendMessage(ChatColor.RED + "You can't use that command! Go to the hospital if you need a doctor!");
} else {
Bukkit.getLogger().warning("You need to supply a player!");
sender.sendMessage("You need to supply a player!");
}
return true;
}
@ -32,11 +31,11 @@ public class NeedDoctorCommand implements CommandExecutor {
Bukkit.getLogger().info(args[0] + " called online doctors for help.");
this.callDoctors(player);
} else {
player.sendMessage(ChatColor.RED + "You can't use that command! Go to the hospital if you need a doctor!");
sender.sendMessage(ChatColor.RED + "You can't use that command! Go to the hospital if you need a doctor!");
return true;
}
} else {
Bukkit.getLogger().warning("Player is not online.");
sender.sendMessage("Player is not online.");
return true;
}

View File

@ -1,5 +1,5 @@
name: SCDoctorAttend
version: 1.1
version: 1.1.1
author: DavidDGTNT
main: xyz.daviddgtnt.sc.doctorattend.DoctorAttend
api-version: '1.20'