mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-02 13:33:47 +01:00
Remove the info inventory as it's 100% broken
This commit is contained in:
parent
5b7b0d9971
commit
1ae3e68998
@ -6,14 +6,9 @@ import com.github.intellectualsites.plotsquared.plot.config.Settings;
|
|||||||
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
|
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
|
||||||
import com.github.intellectualsites.plotsquared.plot.flags.implementations.HideInfoFlag;
|
import com.github.intellectualsites.plotsquared.plot.flags.implementations.HideInfoFlag;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
import com.github.intellectualsites.plotsquared.plot.object.Plot;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.PlotInventory;
|
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack;
|
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
|
||||||
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
|
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.expiry.ExpireManager;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@CommandDeclaration(command = "info", aliases = "i", description = "Display plot info", usage = "/plot info <id> [-f, to force info]", category = CommandCategory.INFO)
|
@CommandDeclaration(command = "info", aliases = "i", description = "Display plot info", usage = "/plot info <id> [-f, to force info]", category = CommandCategory.INFO)
|
||||||
public class Info extends SubCommand {
|
public class Info extends SubCommand {
|
||||||
@ -88,37 +83,6 @@ public class Info extends SubCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 1 && args[0].equalsIgnoreCase("inv")) {
|
|
||||||
PlotInventory inv = new PlotInventory(player) {
|
|
||||||
@Override public boolean onClick(int index) {
|
|
||||||
// TODO InfoInventory not implemented yet!!!!!!!!
|
|
||||||
// See plot rating or musicsubcommand on examples
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
UUID uuid = player.getUUID();
|
|
||||||
String name = MainUtil.getName(plot.getOwner());
|
|
||||||
inv.setItem(1, new PlotItemStack(388, (short) 0, 1, "&cPlot Info",
|
|
||||||
"&cID: &6" + plot.getId().toString(), "&cOwner:&6" + name,
|
|
||||||
"&cAlias: &6" + plot.getAlias(),
|
|
||||||
"&cBiome: &6" + plot.getBiome().toString().replaceAll("_", "").toLowerCase(),
|
|
||||||
"&cCan Build: &6" + plot.isAdded(uuid),
|
|
||||||
"&cSeen: &6" + MainUtil.secToTime((int) (ExpireManager.IMP.getAge(plot) / 1000)),
|
|
||||||
"&cIs Denied: &6" + plot.isDenied(uuid)));
|
|
||||||
inv.setItem(1, new PlotItemStack(388, (short) 0, 1, "&cTrusted",
|
|
||||||
"&cAmount: &6" + plot.getTrusted().size(),
|
|
||||||
"&8Click to view a list of the trusted users"));
|
|
||||||
inv.setItem(1, new PlotItemStack(388, (short) 0, 1, "&cMembers",
|
|
||||||
"&cAmount: &6" + plot.getMembers().size(),
|
|
||||||
"&8Click to view a list of plot members"));
|
|
||||||
inv.setItem(1, new PlotItemStack(388, (short) 0, 1, "&cDenied", "&cDenied",
|
|
||||||
"&cAmount: &6" + plot.getDenied().size(),
|
|
||||||
"&8Click to view a list of denied players"));
|
|
||||||
inv.setItem(1, new PlotItemStack(388, (short) 0, 1, "&cFlags", "&cFlags",
|
|
||||||
"&cAmount: &6" + plot.getFlagContainer().getFlagMap().size(), "&8Click to view a list of plot flags"));
|
|
||||||
inv.openInventory();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
boolean hasOwner = plot.hasOwner();
|
boolean hasOwner = plot.hasOwner();
|
||||||
// Wildcard player {added}
|
// Wildcard player {added}
|
||||||
boolean containsEveryone = plot.getTrusted().contains(DBFunc.EVERYONE);
|
boolean containsEveryone = plot.getTrusted().contains(DBFunc.EVERYONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user