Reintroduced shift-click-player-profile-check, disabled by default this time

This commit is contained in:
Indyuce 2021-10-30 12:30:21 +02:00
parent 717b2cb1d9
commit def1137d80
2 changed files with 8 additions and 6 deletions

View File

@ -1,15 +1,20 @@
package net.Indyuce.mmocore.listener.option;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.comp.target.InteractionType;
import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.manager.InventoryManager;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.inventory.Inventory;
public class PlayerProfileCheck implements Listener {
@EventHandler
public void a(PlayerInteractEntityEvent event) {
/**
if (event.getRightClicked().getType() != EntityType.PLAYER || !MythicLib.plugin.getEntities().canTarget(event.getPlayer(), event.getRightClicked(), InteractionType.SUPPORT_ACTION))
if (event.getRightClicked().getType() != EntityType.PLAYER || !event.getPlayer().isSneaking() || !MythicLib.plugin.getEntities().canTarget(event.getPlayer(), event.getRightClicked(), InteractionType.SUPPORT_ACTION))
return;
/*
@ -19,10 +24,7 @@ public class PlayerProfileCheck implements Listener {
* Opening inventories like that to other players does NOT
* necessarily works for any other custom inventory.
* */
/**
Inventory inv = InventoryManager.PLAYER_STATS.newInventory(PlayerData.get(event.getRightClicked().getUniqueId())).getInventory();
event.getPlayer().openInventory(inv);
**/
}
}

View File

@ -133,7 +133,7 @@ vanilla-exp-redirection:
override-vanilla-exp: true
# Check the target player's RPG profile when shift when shift right clicking.
shift-click-player-profile-check: true
shift-click-player-profile-check: false
# If main class experience holograms should be displayed
# whenever a player earns main class exp