geforkt von Mirrors/HeadDB
shush
Dieser Commit ist enthalten in:
Ursprung
b3c06013de
Commit
c0f1cb28c0
@ -26,7 +26,7 @@ public class Head {
|
|||||||
private int id;
|
private int id;
|
||||||
private List<String> tags;
|
private List<String> tags;
|
||||||
private ItemStack menuItem;
|
private ItemStack menuItem;
|
||||||
private ItemStack itemStack;
|
//Unimplemented private ItemStack itemStack;
|
||||||
|
|
||||||
public Head() {}
|
public Head() {}
|
||||||
|
|
||||||
@ -70,6 +70,7 @@ public class Head {
|
|||||||
return menuItem;
|
return menuItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* For some reason this causes issues with some heads in categories not having lore
|
||||||
public ItemStack getItemStack() {
|
public ItemStack getItemStack() {
|
||||||
if (itemStack == null) {
|
if (itemStack == null) {
|
||||||
itemStack = menuItem;
|
itemStack = menuItem;
|
||||||
@ -85,6 +86,7 @@ public class Head {
|
|||||||
|
|
||||||
return itemStack;
|
return itemStack;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
|
@ -122,7 +122,7 @@ public class CommandHeadDB implements CommandExecutor {
|
|||||||
Utils.sendMessage(sender, "&cCould not find head with id &e" + id);
|
Utils.sendMessage(sender, "&cCould not find head with id &e" + id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ItemStack item = head.getItemStack();
|
ItemStack item = head.getMenuItem();
|
||||||
item.setAmount(amount);
|
item.setAmount(amount);
|
||||||
target.getInventory().addItem(item);
|
target.getInventory().addItem(item);
|
||||||
Utils.sendMessage(sender, "&7Gave &6" + target.getName() + " &ex" + amount + " " + head.getName());
|
Utils.sendMessage(sender, "&7Gave &6" + target.getName() + " &ex" + amount + " " + head.getName());
|
||||||
|
@ -344,7 +344,7 @@ public class InventoryUtils {
|
|||||||
PlayerHeadPurchaseEvent event = new PlayerHeadPurchaseEvent(player, head, getCategoryCost(player, category));
|
PlayerHeadPurchaseEvent event = new PlayerHeadPurchaseEvent(player, head, getCategoryCost(player, category));
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
ItemStack item = head.getItemStack();
|
ItemStack item = head.getMenuItem();
|
||||||
item.setAmount(amount);
|
item.setAmount(amount);
|
||||||
player.getInventory().addItem(item);
|
player.getInventory().addItem(item);
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,3 @@ menu:
|
|||||||
search: "&c&lHeadDB &8- &eSearch: %search%"
|
search: "&c&lHeadDB &8- &eSearch: %search%"
|
||||||
favorites: "&c&lHeadDB &8- &eFavorites: %player%"
|
favorites: "&c&lHeadDB &8- &eFavorites: %player%"
|
||||||
local: "&c&lHeadDB &8- &aLocal Heads &7(%size%)"
|
local: "&c&lHeadDB &8- &aLocal Heads &7(%size%)"
|
||||||
|
|
||||||
# Head item given to players
|
|
||||||
head:
|
|
||||||
name: "%name%"
|
|
||||||
lore:
|
|
||||||
- ''
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren