mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
hi
This commit is contained in:
parent
061f4f60b5
commit
9b5ccc538f
2 changed files with 8 additions and 1 deletions
|
@ -64,7 +64,7 @@ public class TFMHandler
|
||||||
{
|
{
|
||||||
getTFM();
|
getTFM();
|
||||||
}
|
}
|
||||||
return AdminList.vanished.contains(player);
|
return AdminList.vanished.contains(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void warning(String warning)
|
public void warning(String warning)
|
||||||
|
|
|
@ -2,12 +2,15 @@ package com.earth2me.essentials.commands;
|
||||||
|
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.utils.VersionUtil;
|
import com.earth2me.essentials.utils.VersionUtil;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.earth2me.essentials.I18n.tl;
|
||||||
|
|
||||||
public class Commandinvsee extends EssentialsCommand {
|
public class Commandinvsee extends EssentialsCommand {
|
||||||
public Commandinvsee() {
|
public Commandinvsee() {
|
||||||
super("invsee");
|
super("invsee");
|
||||||
|
@ -23,6 +26,10 @@ public class Commandinvsee extends EssentialsCommand {
|
||||||
final User invUser = getPlayer(server, user, args, 0);
|
final User invUser = getPlayer(server, user, args, 0);
|
||||||
Inventory inv;
|
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")) {
|
if (args.length > 1 && user.isAuthorized("essentials.invsee.equip")) {
|
||||||
inv = server.createInventory(invUser.getBase(), 9, "Equipped");
|
inv = server.createInventory(invUser.getBase(), 9, "Equipped");
|
||||||
inv.setContents(invUser.getBase().getInventory().getArmorContents());
|
inv.setContents(invUser.getBase().getInventory().getArmorContents());
|
||||||
|
|
Loading…
Reference in a new issue