Fix
This commit is contained in:
parent
d8d3e8544c
commit
a9cb2d2490
@ -29,12 +29,8 @@ public class PlayerListenerHigherThan18 implements Listener {
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onSwitchHand(PlayerSwapHandItemsEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
if ((!player.isSneaking() || !player.hasPermission("keybindings.use")) &&
|
||||
settings.getProperty(PluginSettings.MENU_UNREGISTER_COMPATIBILITY)) {
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
if (settings.getProperty(PluginSettings.MENU_UNREGISTER_COMPATIBILITY)) {
|
||||
if (player.isSneaking() && player.hasPermission("keybindings.use") && settings.getProperty(PluginSettings.MENU_UNREGISTER_COMPATIBILITY)) {
|
||||
event.setCancelled(true);
|
||||
Bukkit.dispatchCommand(event.getPlayer(), "help");
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ public final class PluginSettings implements SettingsHolder {
|
||||
"If you are using TrMenu, don't enable this because TrMenu already implemented this."
|
||||
})
|
||||
public static final Property<Boolean> MENU_UNREGISTER_COMPATIBILITY =
|
||||
newProperty("3rdPartyFeature.compatibility.menuPlugins", true);
|
||||
newProperty("3rdPartyFeature.compatibility.menuPlugins", false);
|
||||
|
||||
@Comment({
|
||||
"Do you want to enable the session feature?",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user