mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-12-30 05:57:41 +01:00
Reintroduced shift-click-player-profile-check, disabled by default this time
This commit is contained in:
parent
717b2cb1d9
commit
def1137d80
@ -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);
|
||||
**/
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user