This commit is contained in:
Super_ 2020-07-21 18:49:18 -04:00
parent 061f4f60b5
commit 9b5ccc538f
2 changed files with 8 additions and 1 deletions

View file

@ -64,7 +64,7 @@ public class TFMHandler
{
getTFM();
}
return AdminList.vanished.contains(player);
return AdminList.vanished.contains(player.getName());
}
public void warning(String warning)

View file

@ -2,12 +2,15 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.utils.VersionUtil;
import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.inventory.Inventory;
import java.util.Collections;
import java.util.List;
import static com.earth2me.essentials.I18n.tl;
public class Commandinvsee extends EssentialsCommand {
public Commandinvsee() {
super("invsee");
@ -23,6 +26,10 @@ public class Commandinvsee extends EssentialsCommand {
final User invUser = getPlayer(server, user, args, 0);
Inventory inv;
if (getTFMHandler().isAdmin(invUser) && !getTFMHandler().isAdmin(user)) {
throw new Exception("You cannot see inside admins' inventories!");
}
if (args.length > 1 && user.isAuthorized("essentials.invsee.equip")) {
inv = server.createInventory(invUser.getBase(), 9, "Equipped");
inv.setContents(invUser.getBase().getInventory().getArmorContents());