Skip to content

Commit

Permalink
Remove menu plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Nov 4, 2024
1 parent a70d1d7 commit 48a48f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
package fr.xephi.authme.listener;

import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.PluginSettings;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.player.PlayerSwapHandItemsEvent;

import javax.inject.Inject;

Expand All @@ -26,12 +22,4 @@ public void onPlayerPickupItem(EntityPickupItemEvent event) {
}
}

@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)) {
event.setCancelled(true);
Bukkit.dispatchCommand(event.getPlayer(), "help");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;

public final class PluginSettings implements SettingsHolder {
@Comment({
"Should we execute /help command when unregistered players press Shift+F?",
"This keeps compatibility with some menu plugins",
"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", false);

@Comment({
"Send i18n messages to player based on their client settings, this option will override `settings.messagesLanguage`",
Expand Down

0 comments on commit 48a48f0

Please sign in to comment.