mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-09 14:14:59 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59d0295b18 | ||
|
|
af908f2eb6 | ||
|
|
c86e96e200 | ||
|
|
8061293810 | ||
|
|
656e265006 | ||
|
|
507813f106 |
12
pom.xml
12
pom.xml
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<groupId>lol.hyper</groupId>
|
<groupId>lol.hyper</groupId>
|
||||||
<artifactId>toolstats</artifactId>
|
<artifactId>toolstats</artifactId>
|
||||||
<version>1.4.2</version>
|
<version>1.4.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>ToolStats</name>
|
<name>ToolStats</name>
|
||||||
@@ -121,14 +121,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>lol.hyper</groupId>
|
<groupId>lol.hyper</groupId>
|
||||||
<artifactId>github-release-api</artifactId>
|
<artifactId>github-release-api</artifactId>
|
||||||
<version>1.0.2</version>
|
<version>1.0.4</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.json</groupId>
|
|
||||||
<artifactId>json</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
@@ -139,7 +133,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-platform-bukkit</artifactId>
|
<artifactId>adventure-platform-bukkit</artifactId>
|
||||||
<version>4.1.1</version>
|
<version>4.1.2</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||||
if (!sender.hasPermission("toolstats.use")) {
|
if (!sender.hasPermission("toolstats.command")) {
|
||||||
audiences.sender(sender).sendMessage(Component.text("You do not have permission for this command.").color(NamedTextColor.RED));
|
audiences.sender(sender).sendMessage(Component.text("You do not have permission for this command.").color(NamedTextColor.RED));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,15 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case "reset": {
|
case "reset": {
|
||||||
|
if (!sender.hasPermission("toolstats.reset")) {
|
||||||
|
audiences.sender(sender).sendMessage(Component.text("You do not have permission for this command.").color(NamedTextColor.RED));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (args.length == 2 && args[1].equalsIgnoreCase("confirm")) {
|
if (args.length == 2 && args[1].equalsIgnoreCase("confirm")) {
|
||||||
|
if (!sender.hasPermission("toolstats.reset.confirm")) {
|
||||||
|
audiences.sender(sender).sendMessage(Component.text("You do not have permission for this command.").color(NamedTextColor.RED));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
ItemStack heldItem = player.getInventory().getItemInMainHand();
|
ItemStack heldItem = player.getInventory().getItemInMainHand();
|
||||||
if (heldItem.getType() == Material.AIR) {
|
if (heldItem.getType() == Material.AIR) {
|
||||||
|
|||||||
@@ -7,12 +7,17 @@ description: Track various tool stats!
|
|||||||
commands:
|
commands:
|
||||||
toolstats:
|
toolstats:
|
||||||
usage: /toolstats
|
usage: /toolstats
|
||||||
description: Main command.
|
permission: toolstats.command
|
||||||
permission: toolstats.main
|
|
||||||
permissions:
|
permissions:
|
||||||
toolstats.main:
|
toolstats.command:
|
||||||
description: Allows the usage of /toolstats
|
description: Allows the usage of /toolstats.
|
||||||
default: true
|
default: true
|
||||||
toolstats.reload:
|
toolstats.reload:
|
||||||
description: Allows the usage of /toolstats reload
|
description: Allows the usage of /toolstats reload.
|
||||||
default: op
|
default: op
|
||||||
|
toolstats.reset:
|
||||||
|
description: Allows the usage of /toolstats reset.
|
||||||
|
default: true
|
||||||
|
toolstats.reset.confirm:
|
||||||
|
description: Allows the usage of /toolstats reset confirm.
|
||||||
|
default: true
|
||||||
Reference in New Issue
Block a user