prepare for finishing rebranding

This commit is contained in:
YouHaveTrouble
2022-01-26 14:41:12 +01:00
parent 1e7adf398a
commit 9a9a44939a
8 changed files with 12 additions and 22 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>me.youhavetrouble</groupId>
<artifactId>PreventStabby</artifactId>
<version>1.3-pre5</version>
<version>1.3</version>
<packaging>jar</packaging>
<name>PreventStabby</name>
@@ -77,7 +77,7 @@ public final class PreventStabby extends JavaPlugin {
worldGuardHook = false;
}
Metrics metrics = new Metrics(this, 10597);
Metrics metrics = new Metrics(this, 14074);
}
public static boolean worldGuardHookEnabled() {
@@ -11,9 +11,7 @@ public class HelpCommand {
public static void help(CommandSender sender, String[] args) {
Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> {
List<String> helpPage = new ArrayList<>();
helpPage.add(PluginMessages.parseMessage("&b&m &bPreventStabby Help&b&m "));
helpPage.add(PluginMessages.parseMessage("&9/pvp &b&lhelp &f- shows this message"));
if (sender.hasPermission("preventstabby.command.toggle")) {
@@ -22,7 +20,6 @@ public class HelpCommand {
}
String[] helpReady = helpPage.toArray(new String[0]);
sender.sendMessage(helpReady);
});
}
@@ -11,9 +11,7 @@ import org.bukkit.entity.Player;
public class PvpToggleCommand {
public static void toggle(CommandSender sender, String[] args) {
Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> {
if (!sender.hasPermission("preventstabby.command.toggle")) {
String message = ChatColor.translateAlternateColorCodes('&', PreventStabby.getPlugin().getConfigCache().getNo_permission());
sender.sendMessage(message);
@@ -47,7 +45,6 @@ public class PvpToggleCommand {
sender.sendMessage(message);
return;
}
if (sender instanceof Player) {
Player player = (Player) sender;
if (CombatTimer.isInCombat(player.getUniqueId())) {
@@ -8,7 +8,6 @@ import org.bukkit.command.CommandSender;
public class ReloadCommand {
public static void reload(CommandSender sender) {
Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> {
if (!sender.hasPermission("preventstabby.command.reload")) {
String message = ChatColor.translateAlternateColorCodes('&', PreventStabby.getPlugin().getConfigCache().getNo_permission());
@@ -17,7 +16,6 @@ public class ReloadCommand {
}
PreventStabby.getPlugin().reloadPluginConfig(sender);
});
}
}
@@ -85,9 +85,9 @@ public class ConfigCache {
}
};
configFile.setDescription("PvP toggle that CARES about your pets!");
configFile.addLink("Spigot", "https://www.spigotmc.org/resources/togglepvp.89376/");
configFile.addLink("Source", "https://github.com/YouHaveTrouble/TogglePvP");
configFile.setDescription("Prevent people from getting stabbed!");
configFile.addLink("Spigot", "https://www.spigotmc.org/resources/89376/");
configFile.addLink("Source", "https://github.com/YouHaveTrouble/PreventStabby");
configFile.load();
FileConfiguration config = configFile.getConfig();
@@ -135,8 +135,6 @@ public class ConfigCache {
this.entering_combat = config.getString("messages.entering_combat", "&cEntering combat");
this.leaving_combat = config.getString("messages.leaving_combat", "&cLeaving combat");
this.cant_do_that_during_combat = config.getString("messages.cant_do_that_during_combat", "&cYou can't do that while in combat!");
}
@@ -24,7 +24,7 @@ public class WorldGuardHook {
public static void init() {
PreventStabby plugin = PreventStabby.getPlugin();
try {
Class.forName("com.sk89q.worldguard.protection.flags.registry.FlagConflictException");
Class.forName("com.sk89q.worldguard.protection.flags.registry.FlagRegistry");
WorldGuardPlugin worldGuardPlugin = WorldGuardPlugin.inst();
if (WorldGuard.getInstance() == null || worldGuardPlugin == null) return;
plugin.getLogger().info("Hooking into WorldGuard");
+6 -6
View File
@@ -12,21 +12,21 @@ commands:
aliases:
- pvp
permissions:
toglepvp.combatcommandblock.bypass:
preventstabby.combatcommandblock.bypass:
default: op
description: Allows to bypass combat command blocker
toglepvp.combatteleportblock.bypass:
preventstabby.combatteleportblock.bypass:
default: op
description: Allows to bypass combat teleport blocker
togglepvp.command:
preventstabby.command:
default: true
description: Allows usage of /pvp command
togglepvp.command.toggle:
preventstabby.command.toggle:
default: true
description: Allows usage of /pvp <toggle/enable/disable> command
togglepvp.command.toggle.others:
preventstabby.command.toggle.others:
default: op
description: Allows usage of /pvp <toggle/enable/disable> <player> command
togglepvp.command.reload:
preventstabby.command.reload:
default: op
description: Allows usage of /pvp reload command