Bug command
This commit is contained in:
@@ -215,6 +215,7 @@ public class Setup {
|
||||
Core.getMainClass().getCommand("addAimTWWin").setExecutor(oc);
|
||||
Core.getMainClass().getCommand("toggleboat").setExecutor(pc);
|
||||
Core.getMainClass().getCommand("toggleboatflight").setExecutor(tc);
|
||||
Core.getMainClass().getCommand("bug").setExecutor(pc);
|
||||
}
|
||||
|
||||
private static void setupInventories() {
|
||||
|
||||
@@ -49,6 +49,21 @@ public class PlayerCommands implements CommandExecutor {
|
||||
Core.getMainClass().getFeatures().enableFeature(P, Features.Feature.BOAT);
|
||||
}
|
||||
return true;
|
||||
} else if (cmd.getName().equalsIgnoreCase("bug")) {
|
||||
if (P == null) {
|
||||
Core.statusMsg(sender, "only_player_cmd", false);
|
||||
return true;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
return false;
|
||||
}
|
||||
String msg = "";
|
||||
for (String part : args) {
|
||||
msg += part + " ";
|
||||
}
|
||||
Errors.bugReport(P, msg, Errors.make("plugin", "core"));
|
||||
Core.statusMsg(P, "bug_report_sent", true);
|
||||
return true;
|
||||
} else if (cmd.getName().equalsIgnoreCase("joinminigame")) {
|
||||
if (P == null) {
|
||||
Core.statusMsg(sender, "only_player_cmd", false);
|
||||
@@ -65,14 +80,6 @@ public class PlayerCommands implements CommandExecutor {
|
||||
o.getScore(P).setScore(1);
|
||||
Core.statusMsg(sender, "joined_xpBattle", true);
|
||||
return true;
|
||||
} else if (args[0].equalsIgnoreCase("pool")) {
|
||||
Objective o = Bukkit.getScoreboardManager().getMainScoreboard().getObjective("poolJoin");
|
||||
if (o == null) {
|
||||
return true;
|
||||
}
|
||||
o.getScore(P).setScore(1);
|
||||
Core.statusMsg(sender, "joined_pool", true);
|
||||
return true;
|
||||
}
|
||||
} else if (cmd.getName().equalsIgnoreCase("leaveminigame")) {
|
||||
if (P == null) {
|
||||
|
||||
@@ -87,4 +87,7 @@ commands:
|
||||
usage: /<command>
|
||||
toggleboat:
|
||||
description: Enables/Disables the boat feature
|
||||
usage: /<command>
|
||||
usage: /<command>
|
||||
bug:
|
||||
description: Reports a bug and collects some server specific server data
|
||||
usage: /<command> <message>...
|
||||
Reference in New Issue
Block a user