CrystalChest | Unique Gameplay Experience 2.1

Chest to be unlocked by keys. Yields configurable rewards. Great for factions or survival.

  1. TRSoftware
    Tested Minecraft Versions:
    • 1.15
    • 1.16
    • 1.17
    Languages Supported:
    Language is configurable | Default is English
    [​IMG]

    [​IMG]

    CrystalChest is a plugin inspired by an old feature from the popular MMORPG, RuneScape. The idea behind the plugin is that there is a special chest or “crate” that can be unlocked using a Full Crystal Chest Key, and the player will receive rewards. These rewards can vary and are highly configurable! To obtain a full Crystal Chest key, a place must obtain both the “A” half of the key and the “B” half of the key, and the combine them with a command.

    Keys can be given by either using a command, killing certain mobs or breaking certain blocks. These mobs and blocks, along with the odds of each key being dropped are all configurable. Also, the CrystalChest API can be used to give keys in any way server owners desire.

    [​IMG]

    [​IMG]
    All CrystalChest commands begin with /crystal chest or /cc.​
    • /cc help - Brings up a help menu of all cc commands.
    • /cc combine - Combines 'A' keys and 'B' keys into Full Keys.
    • /cc set chest - Sets the location of the CrystalChest to the block you're looking at.
    • /cc location - Tells you the exact location of the CrystalChest.
    • /cc give <player> <key type> <amount> - Give a player any amount of any of the types of Crystal Keys.
    • /cc giveall <key type> <amount> - Give all online players any amount of any of the types of Crystal Keys.
    [​IMG]
    • crystalchest.admin.help - /cc help (admin version)
    • crystalchest.admin.give - /cc give <player> <key type> <amount>
    • crystalchest.admin.give.all - /cc giveall <key type> <amount>
    • crystalchest.admin.setchest - /cc set chest
    • crystalchest.help - /cc help
    • crystalchest.open - Ability to open the CrystalChest
    • crystalchest.combine - /cc combine
    • crystalchest.location - /cc location


    [​IMG]
    Code (YAML):
    # Set this to true if you don't want players to be able to place keys on other blocks.
    blockKeyWaste
    : true

    # The "keys" section details the item data for the Crystal Keys
    keys
    :
      a
    :
        name
    : "&7&lCrystal Key (&a&lA Half&7&l)"
        glowing
    : true
        lore
    :
       - "&eCombine this with a &7&lCrystal Key (&a&lB Half&7&l)"
        - "&ein order to make a &7&lCrystal Key (&b&lFull&7&l)."
        - "&cUse /cc combine"
      b
    :
        name
    : "&7&lCrystal Key (&a&lB Half&7&l)"
        glowing
    : true
        lore
    :
         - "&eCombine this with a &7&lCrystal Key (&a&lA Half&7&l)"
          - "&ein order to make a &7&lCrystal Key (&b&lFull&7&l)."
          - "&cUse /cc combine"
      full
    :
        name
    : "&7&lCrystal Key (&b&lFull&7&l)"
        glowing
    : true
        lore
    :
         - "&eUse this on the Crystal Chest to unlock"
          - "&eyour reward."

    # Set this to true if you want certain mobs to drop keys
    mobDropKeys
    : true

    # Mobs that spawn via these methods should not drop keys
    # A full list of spawn methods can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
    excludeMobsSpawnedBy
    :
    - "SPAWNER"

    # You can add whatever mob types you choose here, as well as whatever odds for whatever keys
    # A full list of mobs (Entity Types) can be found here: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
    mobDrops
    :
      ZOMBIE
    :
        aKeyOdds
    : 10.00
        bKeyOdds
    : 30.00
        fKeyOdds
    : 1.50
      SKELETON
    :
        aKeyOdds
    : 20.00
        bKeyOdds
    : 5.00
        fKeyOdds
    : 2.50
      CREEPER
    :
        aKeyOdds
    : 50.00
        bKeyOdds
    : 1.00
        fKeyOdds
    : 0.50
      WITCH
    :
        aKeyOdds
    : 5.00
        bKeyOdds
    : 35.00
        fKeyOdds
    : 7.25


    # Set this to true if you want certain blocks to drop keys
    # NOTE: This requires that you have mcMMO installed on your server
    blockDropKeys
    : true

    # Set this to true if you only want blocks that were NOT manually placed by players to count
    onlyNaturalBlocks
    : true

    # You can add whatever block types you want here
    # A full list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
    # NOTE: Only materials that can be placed as blocks will work
    blockDrops
    :
      DIAMOND_ORE
    :
        aKeyOdds
    : 50.00
        bKeyOdds
    : 25.00
        fKeyOdds
    : 5.00
      STONE
    :
        aKeyOdds
    : 2.50
        bKeyOdds
    : 3.75
        fKeyOdds
    : 1.00

    # This is the location of the CrystalChest
    # Set this in-game by looking at a block and using /cc set chest
    chest
    :
      location
    :
        world
    : "world"
        x
    : 1
        y
    : 1
        z
    : 1

    rewards
    :
      static
    :
        commands
    :
       - "broadcast &c&l%player% &fhas just opened the Crystal Chest!"
        - "eco give %player% 10000"

      # Dynamic commands are formatted as followed
      #"command to be run from console/message sent to the player/chance of the reward being given"

      dynamic
    :
        minimumRewards
    : 2
        maximumRewards
    : 4
        commands
    :
       - "give %player% diamond 3/&fYou've won &b&l3 &fDiamonds!/25"
        - "eco give %player% 5000//20"
        - "eco give %player% 100000//10"
        - "give %player% emerald 5/&fYou've won &a&l5 &fEmeralds!/15"
        - "give %player% 322:1 1/&fYou've won &6&l1 &fGod Apple!/20"
        - "give %player% 322:1 3/&fYou've won &6&l3 &fGod Apple!/10"

    Code (YAML):
    # Sent when a player tries to do something without the correct permission node
    noPermission
    : "&c&lSorry, &7you don't have permission for that."

    # Sent when a player-only command is attempted by console
    mustBePlayer
    : "&c&lSorry, &7only players can do this command!"

    # Sent when the targeted player is offline
    playerOffline
    : "&c&lSorry, &7that player is not online!"

    # Sent if you try to give an invalid key type
    invalidKey
    : "&c&lSorry, &7that isn't a valid key type!"

    # Sent when an argument is supposed to be an integer but isn't
    invalidInteger
    : "&c&lSorry, &7that isn't a valid integer argument!"

    # Sent to the console or admin player who used /cc give
    gaveKey
    : "&fYou gave &c%amount% &fof &c%type% &fto &c%player%&f."

    # Sent to a player when they receive a key
    receivedKey
    : "&fYou've received &c%amount% &fof &c%type%&f!"

    # Sent when a player tries to combine keys without 1 of each A and B
    notEnoughKeys
    : "&c&lSorry, &7you need to have at least 1 'A' key and 1 'B' key!"

    # Sent when a player creates a full crystal key using /cc combine
    combinedKeys
    : "\n&7You've created &b&l%amount% Full Crystal Key&7(&b&ls&7)!\n "

    # Sent when a player sets the Crystal Chest location
    setChestLocation
    : "\n&7You've successfully set the &b&lCrystal Chest &7location!\n "

    # Sent when a player uses /cc location
    chestLocation
    : "\n&7The Crystal Chest is located in world &c&l%world% &7at x: &c&l%x% &7y: &c&l%y% &7z: &c&l%z%&7.\n "

    # Sent when a player interacts with the Crystal Chest with something other than a full key
    needFullKey
    : "&c&lSorry, &7you need a %fullKey% &7to do this."

    # Sent to a player when they try to use a Crystal Key on something other than the chest
    noKeyWaste
    : "&c&lSorry, &7you can't use your Crystal Key like that!"

    # Sent to a player when they open the Crystal Chest
    openedChest
    : "&7Congratulations, you've opened the &b&lCrystal Chest&7!"

    # Help menu for players with permission "crystalchest.admin.help"
    adminHelp
    :
    - "&7&m------&7>> &4CrystalChest Admin Help &7<<&7&m------"
      - "&b&l/cc help &f- Bring up this help menu."
      - "&b&l/cc combine &f- Combine the two keys into a full key."
      - "&b&l/cc location &f- See the location of the Crystal Chest."
      - "&b&l/cc set chest &f- Set the location of the Crystal chest to the block you're looking at."
      - "&b&l/cc give <player> <key type> <amount> &f- Give crystal key(s) to a player."
      - "&b&l/cc giveall <key type> <amount> &f- Give crystal key(s) to all online players."

    # Help menu for players with permission "crystalchest.help"
    userHelp
    :
     - "&7&m------&7>> &cCrystalChest Help &7<<&7&m------"
      - "&b&l/cc help &f- Bring up this help menu."
      - "&b&l/cc combine &f- Combine the two keys into a full key."
      - "&b&l/cc location &f- See the location of the Crystal Chest."

    [​IMG]
    There are no required plugins that a server must be running in order to use CrystalChest. However, servers must be running mcMMO if they wish to use the "natural blocks only" feature of key-dropping from blocks. This is because CrystalChest relies on mcMMO to determine which blocks are natural and which have been placed by players.

    [​IMG]
    CrystalChest's native Minecraft version is 1.17 and will continue to be updated to the latest server versions that are released. This plugin does work on all of the following versions:​
    • 1.15
    • 1.15.1
    • 1.15.2
    • 1.16.1
    • 1.16.2
    • 1.16.3
    • 1.16.4
    • 1.16.5
    • 1.17
    [​IMG]
    Access with:
    Code (Java):
    CrystalAPI.api
    Methods:​
    Code (Java):
    void giveKeyToPlayer(Player p, String type, int amount);

    void chanceToGiveKey(Player p, double odds, String type, int amount);

    boolean isItemKey(ItemStack item);

    [​IMG]
    If you have any question or concerns regarding this plugin, feel free to send me a private message on this platform.


    Want to send me a donation as a thank you for this free resource? Feel free, click the link below.
    [​IMG]
    Godlikewars likes this.

Recent Reviews

  1. matrix033
    matrix033
    5/5,
    Version: 2.0
    excelente que bueno que este gran plugin regreso a la vida esperemos que se quede por muchos años
  2. Godlikewars
    Godlikewars
    5/5,
    Version: 1.3
    Fantastic plugin idea, I haven't tried it yet, however I use to be a huge Runescape fan, and remember when these chests could get you huge rewards, before the nerfs! thanks! I will give it a shot here before long 5 stars for the idea!
  3. Bolean
    Bolean
    5/5,
    Version: 1.2
    Add particles please
  4. Shardless
    Shardless
    4/5,
    Version: 1.1.2
    Do you think it would be possible to support lore and custom items in the rewards?
    1. TRSoftware
      Author's Response
      You can run any command you want for a reward... What do you mean? You can literally do whatever you want with it O.o
  5. sethrem
    sethrem
    5/5,
    Version: 1.1
    5 stars for Runescape Plugin Name and Idea!
  6. xBRENDYHD
    xBRENDYHD
    5/5,
    Version: 1.1
    Asked him for a update got it within 5mins this is excellent :)
  7. xBRENDYHD
    xBRENDYHD
    5/5,
    Version: 1.0
    Add enderdragon to it :) thanks.
    1. TRSoftware
      Author's Response
      Done, thank you :)
  8. xBRENDYHD
    xBRENDYHD
    5/5,
    Version: 0.9
    nice add a api for giving keys so i can make keys drop from the likes of mob bosses.
  9. Scorpion
    Scorpion
    5/5,
    Version: 0.9
    As a guy that maxed out the skills on RS and done all quests to gain a quest cape...IM def doing to try this now!


    Edit: it loads up and all but no errors and no commands are excecuted. What version is this for, im running 1.8.7
    1. TRSoftware
      Author's Response
      Have you tried reloading it? A known bug is it might take a few loads for it to work properly. :(