CrystalChest [LITE EDITION][ Discontinued] 1.3

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

  1. _True_Religion
    [​IMG]


    About

    Crystal Chest is a plugin written by me, inspired by the Crystal Chest in the popular game, RuneScape. The plugin works like this. There are two halves to the Crystal Key. The "A" half and the "B" half. When a player posses both halves in their inventory, they can combine the keys into one key, a full Crystal Key. Once the player has obtained a full Crystal Key, they may open the Crystal Chest with it.

    When the chest is opened, you may have commands that run every time, such as a guaranteed money pries and an announcement that the player has opened the Crystal Chest, as well as a configurable amount of random commands to be run each time the chest is opened.

    Commands/Permissions
    • /crystalchest help | crystalchest.help - Provides a configurable list of messages to send to the player to inform them about the plugin.
    • /crystalchest combine | crystalchest.combine - Combines the a and b halves if the player posses both.
    • /crystalchest set | crystalchest.set - Sets location of the crystal chest to the block the player is looking at
    • /crystalchest location | crystalchest.location - Sends the player a message of the whereabouts of the Crystal Chest
    • /crystalchest give <playerName> <a/b/full> | crystalchest.give - Gives the specified played the specified key.
    • crystalchest.waste - Allows the player to place their keys as blocks, effectively wasting their key.
    • crystalchest.open - Allows the player to open the Crystal Chest.
    Note: Alias for /crystalchest is /cchest
    Config.yml
    Code (Text):
    #Where /crystalchest set information is stored
    chestLocation:
      world:
      x:
      y:
      z:

    #Info for mobs dropping keys
    mobDrops:
      zombie:
        enable: true
        aKeyChance: 0.25
        bKeyChance: 0.15
        fullKeyChance: 0.10
      skeleton:
        enable: true
        aKeyChance: 0.25
        bKeyChance: 0.15
        fullKeyChance: 0.10
      creeper:
        enable: true
        aKeyChance: 0.25
        bKeyChance: 0.15
        fullKeyChance: 0.10
      enderman:
        enable: true
        aKeyChance: 0.25
        bKeyChance: 0.15
        fullKeyChance: 0.10
      blaze:
        enable: true
        aKeyChance: 0.25
        bKeyChance: 0.15
        fullKeyChance: 0.10

    #Should placing keys be blocked? (Wasting keys)
    blockKeyWaste: true

    #Details for the A half of the key
    aKey:
      name: '&b&lCrystal Key &d&l(&b&lA&d&l)'
      lore:
      - '&bThis is the &dA &bhalf of the key'
      - '&bFind the &dB &bhalf to complete it'

    #Details for the B half of the key
    bKey:
      name: '&b&lCrystal Key &d&l(&b&lB&d&l)'
      lore:
      - '&bThis is the &dB &bhalf of the key'
      - '&bFind the &dA &bhalf to complete it'

    #Details for the full key
    fullKey:
      name: '&b&lCrystal Key &d&l(&b&lFull Key&d&l)'
      lore:
      - '&bThis is the &dfull &bCrystal Key'
      - '&bUse this on the Crystal Chest for prizes'
    Lang.yml
    Code (Text):
    #Displays the help message. Needs crystalchest.help
    helpMessage:
    - '&d[&bCrystalChest&d] &6Help Page 1'
    - '&d[&bCrystalChest&d] &eTo open a Crystal Chest, use a Crystal Key.'
    - '&d[&bCrystalChest&d] &eThe Crystal Chest is south of spawn.'
    - '&d[&bCrystalChest&d] &eCombine the A and B half for a full key.'

    #Message sent when a player tries a crystalchest command that doesn't exist or is missing field(s)
    invalidCommand: '&d[&bCrystalChest&d] &cPlease use this command properly!'

    #Message sent when a player is not found
    playerNotFound: '&d[&bCrystalChest&d] &cThat player is not online!'

    #Message sent when player doesn't have permission
    noPermission: '&d[&bCrystalChest&d] &cYou do not have permission for this!'

    #Message sent when player receives an A key
    receivedAKey: '&d[&bCrystalChest&d] &eYou have received an &dA &eKey half.'

    #Message sent when player receives a B key
    receivedBKey: '&d[&bCrystalChest&d] &eYou have received a &dB &eKey half.'

    #Message sent when player receives a full key
    receivedFullKey: '&d[&bCrystalChest&d] &eYou have received a &dfull &ekey.'

    #Mesage sent from command /crystalchest location
    location: '&d[&bCrystalChest&d] &eThe Crystal Chest is located at World: &c%world%, &eX: &c%x%, &eY: &c%y%, &eZ: &c%z%&e.'

    #Message sent when a player tries to place a key. Permission crystalchest.waste allows them to override this.
    noKeyWaste: '&d[&bCrystalChest&d] &cYou are not allowed to place keys!'

    #Message sent when attempting to use a command from console that you must be a player to use
    mustBePlayer: '&d[&bCrystalChest&d] &cYou must be a player to use this command!'

    #Message sent when combined keys
    combinedKeys: '&d[&bCrystalChest&d] &eYou have combined your keys!'

    #Message sent when player tries to combine keys but doesn't have A and B
    combinedKeysFailed: '&d[&bCrystalChest&d] &cYou do not have the A half and B half of keys!'

    #Message sent when location of CrystalChest is set
    chestLocationSet: '&d[&bCrystalChest&d] &eYou have set the location of the &dCrystal Chest!'

    #Message sent if player tries to open chest without key
    noKey: '&d[&bCrystalChest&d] &cYou must have the full crystal key to open the chest!'

    #Message sent when a player opens the crystal chest
    openedChest: '&d[&bCrystalChest&d] &eYou have opened the &bCrystal Chest!'

    #Message sent when a player kills a mob that drops an "A" key
    mobDropA: '&d[&bCrystalChest&d] &eThe &cA &ehalf of a key has been dropped!'

    #Message sent when a player kills a mob that drops a "B" key
    mobDropB: '&d[&bCrystalChest&d] &eThe &cB &ehalf of a key has been dropped!'

    #Message sent when a player kills a mob that drops a full key
    mobDropFull: '&d[&bCrystalChest&d] &eA &cCrystal key &ehas been dropped!'
    Rewards.yml
    Code (Text):
    #Commands run from console EVERY TIME the crystal chest is opened
    staticRewards:
    - broadcast &b%player% &dhas opened the &bCrystal Chest!
    - eco give %player% 100000

    #How many dynamic commands should run per open?
    amountOfDynamic: 2

    #Commands that have a chance of running when the crystal chest is opened
    dynamicRewards:
    - give %player% 322:1 1
    - give %player% 154 16
    - give %player% 138 1
    - give %player% 3 64
    Godlikewars likes this.

Recent Updates

  1. Updated to Spigot 1.8.8
  2. Fixed bug
  3. Fixed bug with giving keys

Recent Reviews

  1. 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!
  2. Bolean
    Bolean
    5/5,
    Version: 1.2
    Add particles please
  3. 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. _True_Religion
      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
  4. sethrem
    sethrem
    5/5,
    Version: 1.1
    5 stars for Runescape Plugin Name and Idea!
  5. xBRENDYHD
    xBRENDYHD
    5/5,
    Version: 1.1
    Asked him for a update got it within 5mins this is excellent :)
  6. xBRENDYHD
    xBRENDYHD
    5/5,
    Version: 1.0
    Add enderdragon to it :) thanks.
    1. _True_Religion
      Author's Response
      Done, thank you :)
  7. 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.
  8. 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. _True_Religion
      Author's Response
      Have you tried reloading it? A known bug is it might take a few loads for it to work properly. :(