Skip to content

Commit

Permalink
add resource id and rename command
Browse files Browse the repository at this point in the history
  • Loading branch information
Badbird5907 committed Jul 22, 2021
1 parent ef41b7f commit e6a462c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.Setter;
import lombok.SneakyThrows;
import net.badbird5907.anticombatlog.commands.AntiCombatLogCommand;
import net.badbird5907.anticombatlog.commands.ResetCooldownCommand;
import net.badbird5907.anticombatlog.commands.ResetTagCommand;
import net.badbird5907.anticombatlog.listener.CombatListener;
import net.badbird5907.anticombatlog.listener.ConnectionListener;
import net.badbird5907.anticombatlog.listener.NPCListener;
Expand All @@ -25,8 +25,6 @@

import java.io.*;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger;

public final class AntiCombatLog extends JavaPlugin { //TODO config editor in game
@Getter
Expand All @@ -49,7 +47,7 @@ public void onEnable() {
Metrics metrics = new Metrics(this,12150);
ConfigValues.enable(this);
getCommand("anticombatlog").setExecutor(new AntiCombatLogCommand());
getCommand("resetcooldown").setExecutor(new ResetCooldownCommand());
getCommand("resettag").setExecutor(new ResetTagCommand());
file = new File(getInstance().getDataFolder().getAbsolutePath() + "/data.json");
if (!file.exists()){
file.createNewFile();
Expand All @@ -64,7 +62,7 @@ public void onEnable() {
updateRunnable = new UpdateRunnable();
updateRunnable.runTaskTimer(this, 40L, 20L);
if (getConfig().getBoolean("update-check")){
new UpdateChecker(this,-1).getVersion(version ->{
new UpdateChecker(this,94540).getVersion(version ->{
if (!this.getDescription().getVersion().equalsIgnoreCase(version)){
getLogger().info("There a new update available! Download at https://badbird5907.xyz/anticombatlog");
}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class ResetCooldownCommand implements CommandExecutor {
public class ResetTagCommand implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (args.length != 1){
sender.sendMessage(CC.RED + "Usage: /resetcooldown <player>");
sender.sendMessage(CC.RED + "Usage: /resettag <player>");
return true;
}
String target = args[0];
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ commands:
anticombatlog:
description: main command
aliases: [combat,combatlog]
resetcooldown:
description: reset cooldown
permission: anticombatlog.command.resetcooldown
resettag:
description: reset combat tag
aliases: [resetcombattag]
permission: anticombatlog.command.resettag

0 comments on commit e6a462c

Please sign in to comment.