parent
64bc6e88d0
commit
c0666d78ac
|
@ -3,7 +3,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'xyz.daviddgtnt.sc.doctorattend'
|
group = 'xyz.daviddgtnt.sc.doctorattend'
|
||||||
version = '1.1'
|
version = '1.1.1'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -14,7 +14,7 @@ public class DoctorAttendCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (sender instanceof ConsoleCommandSender) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,9 @@ public class NeedDoctorCommand implements CommandExecutor {
|
||||||
Player player;
|
Player player;
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
player = (Player) sender;
|
sender.sendMessage(ChatColor.RED + "You can't use that command! Go to the hospital if you need a doctor!");
|
||||||
player.sendMessage(ChatColor.RED + "You can't use that command! Go to the hospital if you need a doctor!");
|
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getLogger().warning("You need to supply a player!");
|
sender.sendMessage("You need to supply a player!");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -32,11 +31,11 @@ public class NeedDoctorCommand implements CommandExecutor {
|
||||||
Bukkit.getLogger().info(args[0] + " called online doctors for help.");
|
Bukkit.getLogger().info(args[0] + " called online doctors for help.");
|
||||||
this.callDoctors(player);
|
this.callDoctors(player);
|
||||||
} else {
|
} 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;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getLogger().warning("Player is not online.");
|
sender.sendMessage("Player is not online.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: SCDoctorAttend
|
name: SCDoctorAttend
|
||||||
version: 1.1
|
version: 1.1.1
|
||||||
author: DavidDGTNT
|
author: DavidDGTNT
|
||||||
main: xyz.daviddgtnt.sc.doctorattend.DoctorAttend
|
main: xyz.daviddgtnt.sc.doctorattend.DoctorAttend
|
||||||
api-version: '1.20'
|
api-version: '1.20'
|
||||||
|
|
Loading…
Reference in New Issue