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