mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixed #310
This commit is contained in:
parent
df5167813a
commit
81806a06f4
@ -22,6 +22,7 @@ package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
@ -49,7 +50,6 @@ public class Inventory extends SubCommand {
|
||||
for (final SubCommand cmd : cmds) {
|
||||
inventory.addItem(getItem(cmd));
|
||||
}
|
||||
// FIXME unchecked cast
|
||||
((BukkitPlayer) plr).player.openInventory(inventory);
|
||||
return true;
|
||||
}
|
||||
@ -61,9 +61,9 @@ public class Inventory extends SubCommand {
|
||||
meta.setDisplayName(ChatColor.GREEN + cmd.cmd + ChatColor.DARK_GRAY + " [" + ChatColor.GREEN + cmd.alias + ChatColor.DARK_GRAY + "]");
|
||||
meta.setLore(new ArrayList<String>() {
|
||||
{
|
||||
add(ChatColor.RED + "Category: " + ChatColor.GOLD + cmd.category.toString());
|
||||
add(ChatColor.RED + "Description: " + ChatColor.GOLD + cmd.description);
|
||||
add(ChatColor.RED + "Usage: " + ChatColor.GOLD + "/plot " + cmd.usage);
|
||||
add(C.INVENTORY_CATEGORY.s().replace("{category}", cmd.category.toString()));
|
||||
add(C.INVENTORY_DESC.s().replace("{desc}", cmd.description));
|
||||
add(C.INVENTORY_USAGE.s().replace("{usage}", "/plot " + cmd.usage));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import com.intellectualsites.translation.bukkit.BukkitTranslation;
|
||||
* @author Citymonstret
|
||||
*/
|
||||
public enum C {
|
||||
|
||||
/*
|
||||
* Confirm
|
||||
*/
|
||||
@ -126,6 +127,14 @@ public enum C {
|
||||
*/
|
||||
NOT_CONSOLE("$2For safety reasons, this command can only be executed by console.", "Console"),
|
||||
IS_CONSOLE("$2This command can only be executed by a player.", "Console"),
|
||||
|
||||
/*
|
||||
Inventory
|
||||
*/
|
||||
INVENTORY_USAGE("&cUsage: &6{usage}", "Inventory"),
|
||||
INVENTORY_DESC("&cDescription: &6{desc}", "Inventory"),
|
||||
INVENTORY_CATEGORY("&cCategory: &6{category}", "Inventory"),
|
||||
|
||||
/*
|
||||
* Clipboard
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user