mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 19:46:42 +00:00
add magical saddle to shop
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
package me.totalfreedom.totalfreedommod.shop;
|
||||
|
||||
import com.vexsoftware.votifier.model.Vote;
|
||||
import com.vexsoftware.votifier.model.VotifierEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
@ -21,6 +19,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
@ -28,6 +27,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
public class Shop extends FreedomService
|
||||
{
|
||||
|
||||
private BukkitTask reactions;
|
||||
public String reactionString = "";
|
||||
public Date reactionStartTime;
|
||||
@ -248,6 +248,18 @@ public class Shop extends FreedomService
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public ItemStack getMagicalSaddle()
|
||||
{
|
||||
ItemStack itemStack = new ItemStack(Material.SADDLE);
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
itemMeta.setDisplayName(ChatColor.DARK_GREEN + "Magical Saddle");
|
||||
itemMeta.setLore(Arrays.asList(ChatColor.GREEN + "Ride anything you want..."));
|
||||
itemMeta.addEnchant(Enchantment.DURABILITY, 1, true);
|
||||
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public boolean canAfford(int price, int coins)
|
||||
{
|
||||
if (coins >= price)
|
||||
|
@ -12,17 +12,18 @@ public enum ShopItem
|
||||
FIRE_BALL("Fire Ball", Material.FIRE_CHARGE, 14, ConfigEntry.SHOP_PRICES_FIRE_BALL, ChatColor.RED, "fireBall", "/fireball"),
|
||||
RIDEABLE_PEARL("Rideable Ender Pearl", Material.ENDER_PEARL, 16, ConfigEntry.SHOP_PRICES_RIDEABLE_PEARL, ChatColor.DARK_PURPLE, "rideablePearl", "/rideablepearl"),
|
||||
STACKING_POTATO("Stacking Potato", Material.POTATO, 20, ConfigEntry.SHOP_PRICES_STACKING_POTATO, ChatColor.YELLOW, "stackingPotato", "/stackingpotato"),
|
||||
MAGICAL_SADDLE("Magical Saddle", Material.SADDLE, 22, ConfigEntry.SHOP_PRICES_MAGICAL_SADDLE, ChatColor.DARK_GREEN, "magicalSaddle", "/magicalsaddle"),
|
||||
CLOWN_FISH("Clown Fish", Material.TROPICAL_FISH, 24, ConfigEntry.SHOP_PRICES_CLOWN_FISH, ChatColor.GOLD, "clownFish", "/clownfish");
|
||||
|
||||
/*
|
||||
Shop GUI Layout:
|
||||
|
||||
Dimensions: 9x4 = 36
|
||||
Key: g = Grappling Hook, l = Lightning Rod, f = Fire Ball, r = Rideable Ender Pearl, s = Stacking Potato, c = Clown Fish, $ = Coins}
|
||||
Key: g = Grappling Hook, l = Lightning Rod, f = Fire Ball, r = Rideable Ender Pearl, s = Stacking Potato, c = Clown Fish, m = Magical Saddle $ = Coins}
|
||||
|
||||
---------
|
||||
-g-l-f-r-
|
||||
--s---c--
|
||||
--s-m-c--
|
||||
--------$
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user