-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
72 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
package gg.quartzdev.qxpboosts.commands; | ||
|
||
public class CMDlist { | ||
import gg.quartzdev.qxpboosts.qXpBoosts; | ||
import gg.quartzdev.qxpboosts.util.Language; | ||
import gg.quartzdev.qxpboosts.util.qUtil; | ||
import net.kyori.adventure.text.Component; | ||
import net.kyori.adventure.text.minimessage.MiniMessage; | ||
import org.bukkit.command.CommandSender; | ||
|
||
import java.util.Set; | ||
|
||
public class CMDlist extends qCMD{ | ||
|
||
public CMDlist(String name, String label) { | ||
super(name, label); | ||
this.permissionGroup = "qmbde.admin"; | ||
this.permissionNode = "qmbde.command.reload"; | ||
} | ||
|
||
@Override | ||
public boolean logic(CommandSender sender, String[] args) { | ||
|
||
Set<String> boostList = qXpBoosts.getInstance().boostManager.listBoosts(); | ||
|
||
String message = String.join("<new-line>", boostList); | ||
MiniMessage mm = MiniMessage.miniMessage(); | ||
Component component = mm.deserialize(message); | ||
sender.sendMessage(component); | ||
|
||
return false; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters