Skip to content

Commit

Permalink
feat: add cmd to query history nicknames
Browse files Browse the repository at this point in the history
  • Loading branch information
IllTamer committed Nov 5, 2024
1 parent 8327483 commit 4cf19bf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ Forked from IgnitusCo/MySQLNicks/fork, without CMI, supports high version server
- `mysqlnicks.nick.magic`
- `/nick <player> <nickname/off>` Edit another player's nickname
- permission:
- `mysqlnicks.staff`
- `mysqlnicks.staff`
- `/nickhis <player>` Query one's history nicknames
- permission
- `mysqlnicks.nickhis`
4 changes: 3 additions & 1 deletion src/main/java/co/ignitus/mysqlnicks/MySQLNicks.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public void onEnable() {
cs.sendMessage(ChatColor.GREEN + "[MySQLNicks] Hooked to PlaceholderAPI");

nameCacheService = new NameCacheService();
getCommand("nick").setExecutor(new NickCMD());
NickCMD cmd = new NickCMD();
getCommand("nick").setExecutor(cmd);
getCommand("nickhis").setExecutor(cmd);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/co/ignitus/mysqlnicks/commands/NickCMD.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class NickCMD implements CommandExecutor {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if ("nickhistory".equalsIgnoreCase(label)) {
if ("nickhis".equalsIgnoreCase(label)) {
if (args.length < 1) {
sender.sendMessage(MessageUtil.getMessage("nickhis.insufficient-arguments"));
return true;
Expand Down
18 changes: 6 additions & 12 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: MySQLNicks
version: ${project.version}
main: co.ignitus.mysqlnicks.MySQLNicks
api-version: "1.13"
softdepend: [PlaceholderAPI]
softdepend: [PlaceholderAPI, Vault]
authors: ["Ignitus Co", "IllTamer"]
description: Share nicknames across servers with mysql
website: https://ignitus.co

commands:
nick:
description: Set your nickname
aliases: [onick, remotenick]
nickhistory:
aliases: []
nickhis:
description: Query one's history nicknames
aliases: [ nickhis ]
aliases: []

permissions:
mysqlnicks.staff:
Expand All @@ -30,11 +30,5 @@ permissions:
description: Allow player to use color formatting in their nicknames.
mysqlnicks.nick.magic:
description: "Allow player to use magic (&k) in their nicknames."
mysqlnicks.importnicks:
description: Grant permission to import nicknames from supported plugins.
mysqlnicks.exportnicks:
description: Grant permission to export nicknames to supported plugins.
mysqlnicks.bypass.nocolor:
description: Shows colors in the nocolor placeholder
mysqlnicks.bypass.limit:
description: Grants permission to bypass character limit
mysqlnicks.nickhis:
description: Allow permission to query one's history nicknames

0 comments on commit 4cf19bf

Please sign in to comment.