Mirror von
https://github.com/TheSilentPro/HeadDB.git
synchronisiert 2024-12-28 03:40:06 +01:00
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);
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,4 @@ menu:
|
|||||||
tagSearch: "&c&lHeadDB &8- &eTag Search: %search%"
|
tagSearch: "&c&lHeadDB &8- &eTag Search: %search%"
|
||||||
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