Skip to content

Commit

Permalink
Added Toggle-able Admin mode and other fixes
Browse files Browse the repository at this point in the history
- Change Ver to 2.4.0-DEV
- Added `TOGGLE_ADMIN` command
- Cleaned up Message sending to use Message methods wherever possible
- Added Permissions#isAdminEnabled that checks for internal/external permissions and the users current mode
- Removed un-needed permission check in EditCommand
- Changed Message#sendMessage to use Tuple array for replacements
- Removed Firework Compare options from Config, if re-added all changebale compare options should have a config setting
- Moved updateSign to happen at the end of Shop saving.
  • Loading branch information
KillerOfPie committed Nov 12, 2021
1 parent 7824f0c commit ca25b70
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 157 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>org.shanerx</groupId>
<artifactId>tradeshop</artifactId>
<version>2.3.2-STABLE</version>
<version>2.4.0-DEV</version>
<packaging>jar</packaging>
<name>TradeShop</name>
<url>https://tradeshop.github.io/</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
case CREATE_ITRADE:
cmdRnnr.createITrade();
break;
case TOGGLE_ADMIN:
cmdRnnr.toggleAdmin();
break;
}

return true;
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/org/shanerx/tradeshop/commands/CommandPass.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import com.google.common.collect.Lists;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.shanerx.tradeshop.enumys.Message;
import org.shanerx.tradeshop.utils.Utils;

import java.util.ArrayList;
Expand Down Expand Up @@ -91,13 +90,4 @@ public boolean hasArgs() {
public void sendMessage(String message) {
getSender().sendMessage((new Utils()).colorize(message));
}

/**
* Colors and sends the Message to the sender
*
* @param message Message to send to the sender
*/
public void sendMessage(Message message) {
getSender().sendMessage((new Utils()).colorize(message.getPrefixed()));
}
}
Loading

0 comments on commit ca25b70

Please sign in to comment.