mirror of
https://github.com/YouHaveTrouble/PreventStabby.git
synced 2026-05-12 05:16:55 +00:00
prepare for finishing rebranding
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user