mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-28 18:21:19 +01:00
Fix /npc scoreboard
This commit is contained in:
parent
8366b977ed
commit
683ffc08f7
@ -1043,13 +1043,8 @@ public class NPCCommands {
|
||||
Messaging.sendTr(sender, Messages.PROFESSION_SET, npc.getName(), profession);
|
||||
}
|
||||
|
||||
@Command(
|
||||
aliases = { "npc" },
|
||||
usage = "remove|rem (all|id|name)",
|
||||
desc = "Remove a NPC",
|
||||
modifiers = { "remove", "rem" },
|
||||
min = 1,
|
||||
max = 2)
|
||||
@Command(aliases = { "npc" }, usage = "remove|rem (all|id|name)", desc = "Remove a NPC", modifiers = { "remove",
|
||||
"rem" }, min = 1, max = 2)
|
||||
@Requirements
|
||||
public void remove(final CommandContext args, final CommandSender sender, NPC npc) throws CommandException {
|
||||
if (args.argsLength() == 2) {
|
||||
@ -1141,11 +1136,11 @@ public class NPCCommands {
|
||||
@Requirements(selected = true, ownership = true, types = EntityType.PLAYER)
|
||||
public void scoreboard(CommandContext args, CommandSender sender, NPC npc) {
|
||||
Scoreboard main = Bukkit.getScoreboardManager().getMainScoreboard();
|
||||
String objective = args.getString(0);
|
||||
String criteria = args.getString(1);
|
||||
String objective = args.getString(1);
|
||||
String criteria = args.getString(2);
|
||||
Objective obj = main.getObjective(objective);
|
||||
if (obj == null) {
|
||||
Bukkit.getScoreboardManager().getMainScoreboard().registerNewObjective(objective, criteria);
|
||||
obj = Bukkit.getScoreboardManager().getMainScoreboard().registerNewObjective(objective, criteria);
|
||||
}
|
||||
Player entity = (Player) npc.getEntity();
|
||||
if (args.hasValueFlag("team")) {
|
||||
|
Loading…
Reference in New Issue
Block a user