mirror of
https://github.com/YouHaveTrouble/PreventStabby.git
synced 2026-05-12 13:26:56 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b361681600 | |||
| 7ada9eab29 | |||
| 78504ee097 | |||
| 7da6ff0ac9 | |||
| c83888837b | |||
| 4052afe4d3 | |||
| 93efa37e77 | |||
| 44a5c6d800 | |||
| 2ee577a08c | |||
| f5d38eefc3 | |||
| e5b566db67 |
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>me.youhavetrouble</groupId>
|
<groupId>me.youhavetrouble</groupId>
|
||||||
<artifactId>PreventStabby</artifactId>
|
<artifactId>PreventStabby</artifactId>
|
||||||
<version>1.6.0</version>
|
<version>1.8.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>PreventStabby</name>
|
<name>PreventStabby</name>
|
||||||
@@ -49,6 +49,10 @@
|
|||||||
<pattern>org.bstats</pattern>
|
<pattern>org.bstats</pattern>
|
||||||
<shadedPattern>bstats</shadedPattern>
|
<shadedPattern>bstats</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>net.kyori</pattern>
|
||||||
|
<shadedPattern>kyori</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -130,25 +134,25 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-api</artifactId>
|
<artifactId>adventure-api</artifactId>
|
||||||
<version>4.11.0</version>
|
<version>4.12.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<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.2.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-text-minimessage</artifactId>
|
<artifactId>adventure-text-minimessage</artifactId>
|
||||||
<version>4.11.0</version>
|
<version>4.12.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-text-serializer-legacy</artifactId>
|
<artifactId>adventure-text-serializer-legacy</artifactId>
|
||||||
<version>4.11.0</version>
|
<version>4.12.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,43 +1,34 @@
|
|||||||
<h2>PreventStabby ⚔</h2>
|
<h1>PreventStabby ⚔</h1>
|
||||||
|
|
||||||
Use Issues section to report bugs or submit suggestions.
|
Use Issues section to report bugs or submit suggestions.
|
||||||
|
|
||||||
<h3>Commands</h3>
|
<h3>Commands</h3>
|
||||||
Permission: <code>preventstabby.command</code> (given by default to everyone) :
|
You can find available commands <a href="https://github.com/YouHaveTrouble/PreventStabby/wiki/Commands">HERE</a>.
|
||||||
|
|
||||||
|
<h3>Configuration</h3>
|
||||||
|
Explanation of all available config options is <a href="https://github.com/YouHaveTrouble/PreventStabby/wiki/Config">HERE</a>.
|
||||||
|
|
||||||
|
<h3>Placeholders</h3>
|
||||||
|
List of all PlaceholderAPI placeholders can be found <a href="https://github.com/YouHaveTrouble/PreventStabby/wiki/Placeholders">HERE</a>.
|
||||||
|
|
||||||
|
<h3>Developer API</h3>
|
||||||
|
Developer API documetation is <a href="https://github.com/YouHaveTrouble/PreventStabby/wiki/Developer-API">HERE</a>!
|
||||||
|
|
||||||
|
<h2>Features</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>/pvp help- displays help message</li>
|
<li>Per-player PvP Toggle</li>
|
||||||
|
<li>Global PvP override, allowing to ignore personal toggles temporarily</li>
|
||||||
|
<li>Block all forms of player-induced damage when PvP off</li>
|
||||||
|
<li>Block damage done to pets and mounts when PvP off</li>
|
||||||
|
<li>Block the ability to pour lava and set fire under player's feet</li>
|
||||||
|
<li>Block channeling tridents spawning fire under players with PvP off</li>
|
||||||
|
<li>Block fishing pole pulling for players with PvP off</li>
|
||||||
|
<li>Pets do not attack players with PvP off</li>
|
||||||
|
<li>Configurable PvP protection after login</li>
|
||||||
|
<li>Configurable PvP protection after teleport</li>
|
||||||
|
<li>Kill players that logged out during combat</li>
|
||||||
|
<li>Block specific commands while in combat</li>
|
||||||
|
<li>Block teleports in combat (might cause issues with some plugins)</li>
|
||||||
|
<li>Toggles for eggs and snowballs applying knockback</li>
|
||||||
|
<li>Extensive developer API</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
Permission: <code>preventstabby.command.toggle</code> (given by default to everyone) :
|
|
||||||
<ul>
|
|
||||||
<li>/pvp toggle - toggles PvP</li>
|
|
||||||
<li>/pvp on - enables PvP (aliases: enable)</li>
|
|
||||||
<li>/pvp off - disables PvP (aliases: disable)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
Permission: <code>preventstabby.command.toggle.others</code> (given by default to ops) :
|
|
||||||
<ul>
|
|
||||||
<li>/pvp toggle [player] - toggles other player's PvP</li>
|
|
||||||
<li>/pvp on [player] - enables other player's PvP (aliases: enable)</li>
|
|
||||||
<li>/pvp off [player] - disables other player's PvP (aliases: disable)</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h3>Features</h3>
|
|
||||||
Player who disables PvP cannot get hurt by any player induced damage.
|
|
||||||
They also can't deal any damage to other players.
|
|
||||||
This includes basic attacks, projectiles, splash potions,
|
|
||||||
lingering potions and lightning strikes from channeling trident enchant.
|
|
||||||
Additionally lightning strikes from channeling cannot spawn fire under
|
|
||||||
players, who have pvp disabled and it's impossible to use
|
|
||||||
fishing rod on players who have pvp disabled.
|
|
||||||
|
|
||||||
There is also a feature that disallows pouring lava or using
|
|
||||||
flint and steel nearby players with disabled pvp. You can
|
|
||||||
either disable it in config or set its radius.
|
|
||||||
|
|
||||||
All the protections are extended to tameable entities (pets) that set player's uuid as their owner on tame.
|
|
||||||
|
|
||||||
Pets will not attack players with pvp off or if their owner has pvp off.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -150,11 +150,7 @@ public class PreventStabbyAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Sets forced PvP state until server restart or changed with override command or this method.
|
||||||
* @param newForcedPvpState<br>
|
|
||||||
* true - force enable PvP for every player<br>
|
|
||||||
* false - force disable PvP for every player<br>
|
|
||||||
* null - don't force PvP state<br>
|
|
||||||
*/
|
*/
|
||||||
public static void setForcedPvpState(PvpState newForcedPvpState) {
|
public static void setForcedPvpState(PvpState newForcedPvpState) {
|
||||||
PreventStabby.getPlugin().getPlayerManager().setForcedPvpState(newForcedPvpState);
|
PreventStabby.getPlugin().getPlayerManager().setForcedPvpState(newForcedPvpState);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package me.youhavetrouble.preventstabby.commands;
|
|||||||
import me.youhavetrouble.preventstabby.PreventStabby;
|
import me.youhavetrouble.preventstabby.PreventStabby;
|
||||||
import me.youhavetrouble.preventstabby.config.PreventStabbyPermission;
|
import me.youhavetrouble.preventstabby.config.PreventStabbyPermission;
|
||||||
import me.youhavetrouble.preventstabby.util.PluginMessages;
|
import me.youhavetrouble.preventstabby.util.PluginMessages;
|
||||||
import net.kyori.adventure.audience.MessageType;
|
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@@ -11,6 +10,12 @@ import org.bukkit.command.CommandSender;
|
|||||||
public class HelpCommand {
|
public class HelpCommand {
|
||||||
public static void help(CommandSender sender, String[] args) {
|
public static void help(CommandSender sender, String[] args) {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> {
|
Bukkit.getScheduler().runTaskAsynchronously(PreventStabby.getPlugin(), () -> {
|
||||||
|
|
||||||
|
if (!PreventStabbyPermission.COMMAND_HELP.doesCommandSenderHave(sender)) {
|
||||||
|
PluginMessages.sendMessage(sender, PreventStabby.getPlugin().getConfigCache().getNo_permission());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Component helpComponent = PluginMessages.MINIMESSAGE
|
Component helpComponent = PluginMessages.MINIMESSAGE
|
||||||
.deserialize("<aqua><strikethrough> </strikethrough> PreventStabby Help <strikethrough> </strikethrough>")
|
.deserialize("<aqua><strikethrough> </strikethrough> PreventStabby Help <strikethrough> </strikethrough>")
|
||||||
.append(Component.newline())
|
.append(Component.newline())
|
||||||
@@ -23,7 +28,7 @@ public class HelpCommand {
|
|||||||
.append(Component.newline())
|
.append(Component.newline())
|
||||||
.append(PluginMessages.MINIMESSAGE.deserialize("<blue>/pvp <aqua><bold>toggle</bold> <white>- toggles PvP status"));
|
.append(PluginMessages.MINIMESSAGE.deserialize("<blue>/pvp <aqua><bold>toggle</bold> <white>- toggles PvP status"));
|
||||||
}
|
}
|
||||||
PreventStabby.getAudiences().sender(sender).sendMessage(helpComponent, MessageType.SYSTEM);
|
PreventStabby.getAudiences().sender(sender).sendMessage(helpComponent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class MainCommand implements TabExecutor {
|
|||||||
private final HashMap<String, PreventStabbyPermission> subCommands = new HashMap<>();
|
private final HashMap<String, PreventStabbyPermission> subCommands = new HashMap<>();
|
||||||
|
|
||||||
public MainCommand() {
|
public MainCommand() {
|
||||||
subCommands.put("help", PreventStabbyPermission.COMMAND);
|
subCommands.put("help", PreventStabbyPermission.COMMAND_HELP);
|
||||||
subCommands.put("toggle", PreventStabbyPermission.COMMAND_TOGGLE);
|
subCommands.put("toggle", PreventStabbyPermission.COMMAND_TOGGLE);
|
||||||
subCommands.put("on", PreventStabbyPermission.COMMAND_TOGGLE);
|
subCommands.put("on", PreventStabbyPermission.COMMAND_TOGGLE);
|
||||||
subCommands.put("enable", PreventStabbyPermission.COMMAND_TOGGLE);
|
subCommands.put("enable", PreventStabbyPermission.COMMAND_TOGGLE);
|
||||||
@@ -36,34 +36,35 @@ public class MainCommand implements TabExecutor {
|
|||||||
PluginMessages.sendMessage(sender, PreventStabby.getPlugin().getConfigCache().getNo_permission());
|
PluginMessages.sendMessage(sender, PreventStabby.getPlugin().getConfigCache().getNo_permission());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.length >= 1) {
|
if (args.length == 0) {
|
||||||
switch (args[0].toLowerCase()) {
|
PvpToggleCommand.toggle(sender, args);
|
||||||
case "help":
|
return true;
|
||||||
HelpCommand.help(sender, args);
|
}
|
||||||
break;
|
|
||||||
case "toggle":
|
switch (args[0].toLowerCase()) {
|
||||||
PvpToggleCommand.toggle(sender, args);
|
case "help":
|
||||||
break;
|
HelpCommand.help(sender, args);
|
||||||
case "on":
|
break;
|
||||||
case "enable":
|
case "toggle":
|
||||||
PvpToggleCommand.enable(sender, args);
|
PvpToggleCommand.toggle(sender, args);
|
||||||
break;
|
break;
|
||||||
case "off":
|
case "on":
|
||||||
case "disable":
|
case "enable":
|
||||||
PvpToggleCommand.disable(sender, args);
|
PvpToggleCommand.enable(sender, args);
|
||||||
break;
|
break;
|
||||||
case "reload":
|
case "off":
|
||||||
ReloadCommand.reload(sender);
|
case "disable":
|
||||||
break;
|
PvpToggleCommand.disable(sender, args);
|
||||||
case "override":
|
break;
|
||||||
GlobalToggleCommand.globalToggle(sender, args);
|
case "reload":
|
||||||
break;
|
ReloadCommand.reload(sender);
|
||||||
default:
|
break;
|
||||||
PluginMessages.sendMessage(sender, PreventStabby.getPlugin().getConfigCache().getNo_such_command());
|
case "override":
|
||||||
break;
|
GlobalToggleCommand.globalToggle(sender, args);
|
||||||
}
|
break;
|
||||||
} else {
|
default:
|
||||||
HelpCommand.help(sender, args);
|
PluginMessages.sendMessage(sender, PreventStabby.getPlugin().getConfigCache().getNo_such_command());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class PvpToggleCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 1) {
|
if (args.length <= 1) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
if (CombatTimer.isInCombat(player.getUniqueId())) {
|
if (CombatTimer.isInCombat(player.getUniqueId())) {
|
||||||
@@ -60,12 +60,6 @@ public class PvpToggleCommand {
|
|||||||
message = PreventStabby.getPlugin().getConfigCache().getPvp_disabled_other();
|
message = PreventStabby.getPlugin().getConfigCache().getPvp_disabled_other();
|
||||||
}
|
}
|
||||||
PluginMessages.sendMessage(sender, PluginMessages.parsePlayerName(player, message));
|
PluginMessages.sendMessage(sender, PluginMessages.parsePlayerName(player, message));
|
||||||
} else {
|
|
||||||
if (PreventStabbyPermission.COMMAND_TOGGLE_OTHERS.doesCommandSenderHave(sender)) {
|
|
||||||
PluginMessages.sendMessage(sender, "Try /pvp toggle <player>");
|
|
||||||
} else {
|
|
||||||
PluginMessages.sendMessage(sender, "Try /pvp toggle");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class ConfigCache {
|
|||||||
|
|
||||||
@Getter private final boolean pvp_enabled_by_default, lava_and_fire_stopper_enabled, channeling_enchant_disabled,
|
@Getter private final boolean pvp_enabled_by_default, lava_and_fire_stopper_enabled, channeling_enchant_disabled,
|
||||||
punish_for_combat_logout, punish_for_combat_logout_announce, only_owner_can_interact_with_pet,
|
punish_for_combat_logout, punish_for_combat_logout_announce, only_owner_can_interact_with_pet,
|
||||||
snowballs_knockback, egg_knockback, block_commands_in_combat, block_teleports_in_combat;
|
snowballs_knockback, egg_knockback, block_commands_in_combat, block_teleports_in_combat, allow_fishing_rod_pull;
|
||||||
@Getter private final String pvp_enabled, pvp_disabled, cannot_attack_victim, cannot_attack_attacker,
|
@Getter private final String pvp_enabled, pvp_disabled, cannot_attack_victim, cannot_attack_attacker,
|
||||||
cannot_attack_pets_victim, cannot_attack_pets_attacker, no_permission, no_such_command, pvp_enabled_other,
|
cannot_attack_pets_victim, cannot_attack_pets_attacker, no_permission, no_such_command, pvp_enabled_other,
|
||||||
pvp_disabled_other, punish_for_combat_logout_message, entering_combat, leaving_combat,
|
pvp_disabled_other, punish_for_combat_logout_message, entering_combat, leaving_combat,
|
||||||
@@ -57,6 +57,8 @@ public class ConfigCache {
|
|||||||
|
|
||||||
addDefault("settings.eggs_do_knockback", false, "Set to true if eggs should cause knockback to players");
|
addDefault("settings.eggs_do_knockback", false, "Set to true if eggs should cause knockback to players");
|
||||||
|
|
||||||
|
addDefault("settings.allow_fishing_rod_pull", false, "Allows players with pvp off to be pulled by fishing rods");
|
||||||
|
|
||||||
addComment("settings.block_in_combat", "Set what actions should be blocked while in combat");
|
addComment("settings.block_in_combat", "Set what actions should be blocked while in combat");
|
||||||
addDefault("settings.block_in_combat.block_commands.enabled", true);
|
addDefault("settings.block_in_combat.block_commands.enabled", true);
|
||||||
List<String> defaultCommandsBlocked = new ArrayList<>();
|
List<String> defaultCommandsBlocked = new ArrayList<>();
|
||||||
@@ -113,6 +115,7 @@ public class ConfigCache {
|
|||||||
this.punish_for_combat_logout_message = config.getString("settings.punish_for_combat_logout.message", "%player%<reset><white> logged out while in combat. What a loser.");
|
this.punish_for_combat_logout_message = config.getString("settings.punish_for_combat_logout.message", "%player%<reset><white> logged out while in combat. What a loser.");
|
||||||
this.only_owner_can_interact_with_pet = config.getBoolean("settings.only_owner_can_interact_with_pet", false);
|
this.only_owner_can_interact_with_pet = config.getBoolean("settings.only_owner_can_interact_with_pet", false);
|
||||||
|
|
||||||
|
this.allow_fishing_rod_pull = config.getBoolean("settings.allow_fishing_rod_pull", false);
|
||||||
this.snowballs_knockback = config.getBoolean("settings.snowballs_do_knockback", false);
|
this.snowballs_knockback = config.getBoolean("settings.snowballs_do_knockback", false);
|
||||||
this.egg_knockback = config.getBoolean("settings.eggs_do_knockback", false);
|
this.egg_knockback = config.getBoolean("settings.eggs_do_knockback", false);
|
||||||
this.block_commands_in_combat = config.getBoolean("settings.block_in_combat.block_commands", true);
|
this.block_commands_in_combat = config.getBoolean("settings.block_in_combat.block_commands", true);
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ public enum PreventStabbyPermission {
|
|||||||
COMMAND_TOGGLE("command.toggle"),
|
COMMAND_TOGGLE("command.toggle"),
|
||||||
COMMAND_TOGGLE_OTHERS("command.toggle.others"),
|
COMMAND_TOGGLE_OTHERS("command.toggle.others"),
|
||||||
COMMAND_RELOAD("command.reload"),
|
COMMAND_RELOAD("command.reload"),
|
||||||
COMMAND_GLOBAL_TOGGLE("command.toggle.global");
|
COMMAND_GLOBAL_TOGGLE("command.toggle.global"),
|
||||||
|
|
||||||
|
COMMAND_HELP("command.help");
|
||||||
|
|
||||||
private final String permission;
|
private final String permission;
|
||||||
PreventStabbyPermission(String permission) {
|
PreventStabbyPermission(String permission) {
|
||||||
|
|||||||
@@ -37,16 +37,24 @@ public class PlacoholderApiHook extends PlaceholderExpansion {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onRequest(OfflinePlayer player, String params) {
|
public String onRequest(OfflinePlayer player, String params) {
|
||||||
if (params.equalsIgnoreCase("combat_time")) {
|
switch (params) {
|
||||||
return getCombatTimePlaceholder(player.getUniqueId());
|
case "pvp":
|
||||||
|
if (!player.isOnline()) return String.valueOf(false);
|
||||||
|
return String.valueOf(plugin.getPlayerManager().getPlayer(player.getUniqueId()).isPvpEnabled());
|
||||||
|
case "combat_time":
|
||||||
|
return getCombatTimePlaceholder(player.getUniqueId(), player);
|
||||||
|
case "in_combat":
|
||||||
|
if (!player.isOnline()) return String.valueOf(false);
|
||||||
|
return String.valueOf(plugin.getPlayerManager().getPlayer(player.getUniqueId()).isInCombat());
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
if (params.equalsIgnoreCase("in_combat")) {
|
|
||||||
return String.valueOf(plugin.getPlayerManager().getPlayer(player.getUniqueId()).isInCombat());
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getCombatTimePlaceholder(UUID uuid) {
|
private String getCombatTimePlaceholder(UUID uuid, OfflinePlayer player) {
|
||||||
|
if (!player.isOnline()) {
|
||||||
|
return legacyComponentSerializer.serialize(PluginMessages.parseMessage(plugin.getConfigCache().getPlaceholder_not_in_combat()));
|
||||||
|
}
|
||||||
long seconds = plugin.getPlayerManager().getPlayer(uuid).getCombattime() - Instant.now().getEpochSecond();
|
long seconds = plugin.getPlayerManager().getPlayer(uuid).getCombattime() - Instant.now().getEpochSecond();
|
||||||
if (seconds > 0) {
|
if (seconds > 0) {
|
||||||
String msg = plugin.getConfigCache().getPlaceholder_combat_time();
|
String msg = plugin.getConfigCache().getPlaceholder_combat_time();
|
||||||
|
|||||||
+1
@@ -19,6 +19,7 @@ public class FishingListener implements Listener {
|
|||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onFish(org.bukkit.event.player.PlayerFishEvent event) {
|
public void onFish(org.bukkit.event.player.PlayerFishEvent event) {
|
||||||
if (event.getCaught() instanceof Player) {
|
if (event.getCaught() instanceof Player) {
|
||||||
|
if (PreventStabby.getPlugin().getConfigCache().isAllow_fishing_rod_pull()) return;
|
||||||
UUID damager = event.getPlayer().getUniqueId();
|
UUID damager = event.getPlayer().getUniqueId();
|
||||||
UUID victim = event.getCaught().getUniqueId();
|
UUID victim = event.getCaught().getUniqueId();
|
||||||
if (damager == victim)
|
if (damager == victim)
|
||||||
|
|||||||
@@ -22,15 +22,28 @@ permissions:
|
|||||||
preventstabby.command:
|
preventstabby.command:
|
||||||
default: true
|
default: true
|
||||||
description: Allows usage of /pvp command
|
description: Allows usage of /pvp command
|
||||||
|
preventstabby.command.help:
|
||||||
|
default: true
|
||||||
|
description: Allows usage of /pvp help command
|
||||||
|
children:
|
||||||
|
preventstabby.command: true
|
||||||
preventstabby.command.toggle:
|
preventstabby.command.toggle:
|
||||||
default: true
|
default: true
|
||||||
description: Allows usage of /pvp <toggle/enable/disable> command
|
description: Allows usage of /pvp <toggle/enable/disable> command
|
||||||
|
children:
|
||||||
|
preventstabby.command: true
|
||||||
preventstabby.command.toggle.others:
|
preventstabby.command.toggle.others:
|
||||||
default: op
|
default: op
|
||||||
description: Allows usage of /pvp <toggle/enable/disable> <player> command
|
description: Allows usage of /pvp <toggle/enable/disable> <player> command
|
||||||
|
children:
|
||||||
|
preventstabby.command: true
|
||||||
preventstabby.command.toggle.global:
|
preventstabby.command.toggle.global:
|
||||||
default: op
|
default: op
|
||||||
description: Allows usage of /pvp override <enabled/disabled/none> command
|
description: Allows usage of /pvp override <enabled/disabled/none> command
|
||||||
|
children:
|
||||||
|
preventstabby.command: true
|
||||||
preventstabby.command.reload:
|
preventstabby.command.reload:
|
||||||
default: op
|
default: op
|
||||||
description: Allows usage of /pvp reload command
|
description: Allows usage of /pvp reload command
|
||||||
|
children:
|
||||||
|
preventstabby.command: true
|
||||||
Reference in New Issue
Block a user