remove right click profile interact, was rushed.

This commit is contained in:
Joshua 2021-09-03 20:27:20 -05:00
parent d48ac2aaae
commit 15cb4d7aa2

View File

@ -1,19 +1,14 @@
package net.Indyuce.mmocore.listener.option; 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.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.inventory.Inventory;
public class PlayerProfileCheck implements Listener { public class PlayerProfileCheck implements Listener {
@EventHandler @EventHandler
public void a(PlayerInteractEntityEvent event) { 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 || !MythicLib.plugin.getEntities().canTarget(event.getPlayer(), event.getRightClicked(), InteractionType.SUPPORT_ACTION))
return; return;
@ -24,7 +19,10 @@ public class PlayerProfileCheck implements Listener {
* Opening inventories like that to other players does NOT * Opening inventories like that to other players does NOT
* necessarily works for any other custom inventory. * necessarily works for any other custom inventory.
* */ * */
/**
Inventory inv = InventoryManager.PLAYER_STATS.newInventory(PlayerData.get(event.getRightClicked().getUniqueId())).getInventory(); Inventory inv = InventoryManager.PLAYER_STATS.newInventory(PlayerData.get(event.getRightClicked().getUniqueId())).getInventory();
event.getPlayer().openInventory(inv); event.getPlayer().openInventory(inv);
**/
} }
} }