TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/shop/ShopItem.java
Video a29392cab2 Squashed commit of the following:
commit 706229004c
Merge: a42cb6af a4adfa9b
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 03:00:15 2021 -0700

    Merge pull request #131 from AtlasMediaGroup/FS-273

    Moves /rainbowtrail to the shop (FS-273)

commit a4adfa9bee
Merge: 1b5bbd1c a42cb6af
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:46:41 2021 -0700

    Merge branch 'development' into FS-273

commit a42cb6aff9
Merge: 2ecfb886 01fdf766
Author: Video <videogamesm12@gmail.com>
Date:   Mon Nov 29 02:41:34 2021 -0700

    Merge pull request #125 from AtlasMediaGroup/shitcan-savedflags

    Shitcans SavedFlags

commit 01fdf766ee
Merge: 58c21bb1 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:28:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit 1b5bbd1c05
Merge: 8356e831 2ecfb886
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:16:21 2021 -0700

    Merge branch 'development' into FS-273

commit 2ecfb88604
Merge: 42143c11 bb2ddf11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:15:16 2021 -0700

    Merge pull request #130 from AtlasMediaGroup/FS-215

    Makes [Discord] a hyperlink (FS-215)

commit 8356e831a5
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 09:11:16 2021 -0700

    Redundancy fix and better protection system

commit ab00cb840f
Merge: ecce62f6 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:45 2021 -0700

    Merge branch 'development' into FS-273

commit bb2ddf1129
Merge: cf9fdc6f 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:31:19 2021 -0700

    Merge branch 'development' into FS-215

commit 58c21bb1aa
Merge: fdba119d 42143c11
Author: Video <videogamesm12@gmail.com>
Date:   Tue Nov 23 03:30:48 2021 -0700

    Merge branch 'development' into shitcan-savedflags

commit ecce62f6b4
Merge: d8148530 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Sat Oct 9 00:01:22 2021 -0600

    Merge branch 'development' into FS-273

commit cf9fdc6fe4
Merge: 387ea6f7 a598c933
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 8 01:43:33 2021 -0600

    Merge branch 'development' into FS-215

commit 387ea6f71e
Merge: a1ecf881 180cd811
Author: Video <videogamesm12@gmail.com>
Date:   Fri Oct 1 00:35:12 2021 -0600

    Merge branch 'development' into FS-215

commit d814853036
Merge: 47e63869 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:49:05 2021 +0100

    Merge branch 'development' into FS-273

commit a1ecf88109
Merge: bd647afe 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:59 2021 +0100

    Merge branch 'development' into FS-215

commit fdba119d5d
Merge: 61857dd0 213a4338
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Sep 12 13:48:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 61857dd06f
Merge: 2d18d461 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 03:01:37 2021 -0600

    Merge branch 'development' into shitcan-savedflags

commit bd647afe92
Merge: 69f17ef2 0e12f5e7
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:50:39 2021 -0600

    Merge branch 'development' into FS-215

commit 69f17ef2d7
Merge: ee1b27fa aebe1ace
Author: Video <videogamesm12@gmail.com>
Date:   Sun Sep 12 02:01:56 2021 -0600

    Merge branch 'development' into FS-215

commit ee1b27fa0d
Merge: 2bdf14f3 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:24:00 2021 +0100

    Merge branch 'development' into FS-215

commit 2d18d461fe
Merge: a4c81f20 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:44 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit 47e6386907
Merge: b1062fbb 0a9b95bf
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 11 01:23:13 2021 +0100

    Merge branch 'development' into FS-273

commit 2bdf14f38c
Merge: f6d46b61 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 15:26:13 2021 -0600

    Merge branch 'development' into FS-215

commit b1062fbb6c
Merge: f69feed4 44ff621d
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 14:39:32 2021 -0600

    Merge branch 'development' into FS-273

commit f69feed469
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:14:21 2021 -0600

    fixed

commit 8253f94ac4
Merge: daf0126f 54cb0cfa
Author: Video <videogamesm12@gmail.com>
Date:   Mon Sep 6 01:12:00 2021 -0600

    Merge branch 'development' into FS-273

commit a4c81f202c
Merge: 0d09c3a5 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:23:06 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit daf0126f45
Merge: a51f5c9b 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:39 2021 +0100

    Merge branch 'development' into FS-273

commit f6d46b6178
Merge: ee804d52 23caa4e8
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sat Sep 4 01:07:33 2021 +0100

    Merge branch 'development' into FS-215

commit a51f5c9bbf
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 13:53:33 2021 -0600

    FS-273

commit ee804d52ff
Author: Video <videogamesm12@gmail.com>
Date:   Fri Sep 3 12:52:15 2021 -0600

    Makes [Discord] a hyperlink (FS-215)

    I've decided to overhaul the implementation of DiscordToMinecraftListener to make it more easily workable. This overhaul allows me to implement FS-215 more easily.

commit 0d09c3a550
Merge: e2ccd14e 4c3f188b
Author: Ryan <Wild1145@users.noreply.github.com>
Date:   Sun Aug 29 20:09:03 2021 +0100

    Merge branch 'development' into shitcan-savedflags

commit e2ccd14eb3
Author: Video <videogamesm12@gmail.com>
Date:   Fri Aug 27 16:54:55 2021 -0600

    Unsaves SavedFlags
2021-11-29 03:03:00 -07:00

116 lines
3 KiB
Java

package me.totalfreedom.totalfreedommod.shop;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import org.bukkit.ChatColor;
import org.bukkit.Material;
public enum ShopItem
{
GRAPPLING_HOOK("Grappling Hook", Material.FISHING_ROD, 10, ConfigEntry.SHOP_PRICES_GRAPPLING_HOOK, ChatColor.GREEN, "grapplingHook", "/grapplinghook"),
LIGHTNING_ROD("Lightning Rod", Material.BLAZE_ROD, 12, ConfigEntry.SHOP_PRICES_LIGHTNING_ROD, ChatColor.LIGHT_PURPLE, "lightningRod", "/lightningrod"),
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, 19, ConfigEntry.SHOP_PRICES_STACKING_POTATO, ChatColor.YELLOW, "stackingPotato", "/stackingpotato"),
CLOWN_FISH("Clown Fish", Material.TROPICAL_FISH, 21, ConfigEntry.SHOP_PRICES_CLOWN_FISH, ChatColor.GOLD, "clownFish", "/clownfish"),
LOGIN_MESSAGES("Login Messages", Material.NAME_TAG, 23, ConfigEntry.SHOP_PRICES_LOGIN_MESSAGES, ChatColor.DARK_GREEN, "loginMessages", "/loginmessage"),
RAINBOW_TRAIL("Rainbow Trail", Material.RED_WOOL, 25, ConfigEntry.SHOP_PRICES_RAINBOW_TRAIL, ChatColor.DARK_RED, "rainbowTrail", "/trail");
/*
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
x = Login Messages
t = Rainbow Trail
$ = Coins
---------
-g-l-f-r-
-s-c-x-t-
--------$
*/
private final String name;
private final Material icon;
private final int slot;
private final ConfigEntry cost;
private final ChatColor color;
private final String dataName;
private final String command;
ShopItem(String name, Material icon, int slot, ConfigEntry cost, ChatColor color, String dataName, String command)
{
this.name = name;
this.icon = icon;
this.slot = slot;
this.cost = cost;
this.color = color;
this.dataName = dataName;
this.command = command;
}
public static ShopItem findItem(String string)
{
try
{
return ShopItem.valueOf(string.toUpperCase());
}
catch (Exception ignored)
{
}
return null;
}
public String getColoredName()
{
return color + name;
}
public int getCost()
{
return cost.getInteger();
}
public String getName()
{
return name;
}
public Material getIcon()
{
return icon;
}
public int getSlot()
{
return slot;
}
public ChatColor getColor()
{
return color;
}
public String getDataName()
{
return dataName;
}
public String getCommand()
{
return command;
}
}