Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Commit

Permalink
Added /idea
Browse files Browse the repository at this point in the history
Added /tbta and /tbticketadmin list idea
  • Loading branch information
ShakeforProtein committed Dec 16, 2018
1 parent d6b30bd commit 72a184b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.ShakeforProtein</groupId>
<artifactId>TreeboTickets</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<packaging>jar</packaging>

<name>TreeboTickets</name>
Expand Down
13 changes: 12 additions & 1 deletion src/main/java/me/shakeforprotein/treebotickets/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
else if (cmd.getName().equalsIgnoreCase("plots")) {pl.serverSwitch(p, "creative");}
else if (cmd.getName().equalsIgnoreCase("games")) {pl.serverSwitch(p, "games");}
else if (cmd.getName().equalsIgnoreCase("test")) {pl.serverSwitch(p, "test");}
else if (cmd.getName().equalsIgnoreCase("idea")){
pl.getConfig().set("players." + p.getName() + ".ticketstate", (int) 2);
pl.getConfig().set("players." + p.getName() + ".type", "Idea");
p.sendMessage("In your own words, please give a short explanation of the issue you are suffering. You may enter 'cancel' at any time to cancel");
}
//TBTICKET Logic
else if (cmd.getName().equalsIgnoreCase("tbTicket")) {
// TBTICKET COMMAND - With no arguments
Expand Down Expand Up @@ -92,7 +97,7 @@ else if (args[0].equalsIgnoreCase("close")) {
if (args.length < 2) {
p.sendMessage(("XXXNETWORKNAMEXXX - " + ChatColor.RED + "Ticket System").replace("XXXNETWORKNAMEXXX", ChatColor.GOLD + pl.getConfig().getString("networkName")));
p.sendMessage(ChatColor.RED + "INCORRECT USAGE. CORRECT USAGE IS AS FOLLOWS");
p.sendMessage(ChatColor.GOLD + "/tbta list <assigned|unnassigned|open|closed> - Lists all tickets assigned to you");
p.sendMessage(ChatColor.GOLD + "/tbta list <assigned|unnassigned|open|closed|idea> - Lists all tickets assigned to you");
p.sendMessage(ChatColor.GOLD + "/tbta view <ticket_number> - Displays details on specific ticket");
p.sendMessage(ChatColor.GOLD + "/tbta close <ticket_number> - Close ticket with id");
p.sendMessage(ChatColor.GOLD + "/tbta <claim|unclaim> <ticket_number> - Assigns an unassigned ticket to yourself");
Expand All @@ -109,6 +114,9 @@ else if (args[0].equalsIgnoreCase("close")) {
else if (args[1].equalsIgnoreCase("unassigned")) {
pl.staffList(p, "SELECT * FROM `" + pl.getConfig().getString("table") + "` WHERE STAFF='UNASSIGNED'");
}
else if (args[1].equalsIgnoreCase("idea")) {
pl.staffList(p, "SELECT * FROM `" + pl.getConfig().getString("table") + "` WHERE TYPE='Idea'");
}
else if (args[1].equalsIgnoreCase("open")) {
pl.staffList(p, "SELECT * FROM `" + pl.getConfig().getString("table") + "` WHERE STATUS='OPEN'");
}
Expand Down Expand Up @@ -177,6 +185,9 @@ else if (args[1].equalsIgnoreCase("open")) {
else if (args[1].equalsIgnoreCase("closed")) {
pl.staffList(p, "SELECT * FROM `" + pl.getConfig().getString("table") + "` WHERE STATUS='CLOSED'");
}
else if (args[1].equalsIgnoreCase("idea")) {
pl.staffList(p, "SELECT * FROM `" + pl.getConfig().getString("table") + "` WHERE TYPE='Idea'");
}
}
else if(args[0].equalsIgnoreCase("staffList")) {
pl.adminListStaff(p, "SELECT * FROM `" + pl.getConfig().getString("table") + "` WHERE STAFF='" + args[1] + "'", args[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent e) {
p.sendMessage("Your response - " + description);
p.sendMessage("");
p.sendMessage("");
p.sendMessage("Briefly describe what steps you've taken to attempt to fix this issue yourself");
if(pl.getConfig().get("players." + p.getName() + ".type").toString().equalsIgnoreCase("idea")){p.sendMessage("Please list any additional details you'd like to include.");}
else{p.sendMessage("Briefly describe what steps you've taken to attempt to fix this issue yourself");}
}

if (ticketState == 3) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public void onEnable() {
this.getCommand("tbticket").setExecutor(cmds);
this.getCommand("tbta").setExecutor(cmds);
this.getCommand("tbticketadmin").setExecutor(cmds);
this.getCommand("idea").setExecutor(cmds);
this.getCommand("lobby").setExecutor(cmds);
this.getCommand("survival").setExecutor(cmds);
this.getCommand("creative").setExecutor(cmds);
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ commands:
tbTicket:
description: Submits a ticket for the staff team to look into.
usage: /<command>
aliases: ticket
tbTicketAdmin:
description: Submits a ticket for the staff team to look into.
usage: /<command> <subcommand>
tbta:
description: Submits a ticket for the staff team to look into.
usage: /<command> <subcommand>
idea:
description: Allows a player to use the ticket system to submit ideas
usage: /<command>
survival:
description: Takes you to the Survival Server.
description: Takes you to the Survival Serv
usage: /<command>
hardcore:
description: Takes you to the hardcore Server.
Expand Down

0 comments on commit 72a184b

Please sign in to comment.