Config Firework Options

Discussion in 'Plugin Development' started by Reptar_, Jun 10, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Reptar_

    So I'm trying to set the features of my firework grenades from the config to make my plugin more customizable. Basically, I want where a player can just put in what colors they want the fireworks to be. If an option contains null, then it will be ignored. Here's my code:

    http://pastebin.com/G9jTNuVm

    And here's my config:
    Code:
    #==============================#
    # Add colors to your firework
    # by replacing 'null' with any
    # of the following colors.
    # Reset to 'null' to disable.
    # Note that they must be spelt
    # exactly as I have them listed.
    #==============================#
    # AQUA, BLACK, BLUE, FUCHSIA,
    # GRAY, GREEN, LIME, MAROON,
    # NAVY, OLIVE, ORANGE, PURPLE,
    # RED, SILVER, TEAL, WHITE,
    # YELLOW
    #==============================#
     
    Color1: null
    Color2: null
    Color3: null
    Color4: null
    Color5: null
    Color6: null
    Color7: null
    Color8: null
    Color9: null
    Color10: null
    Color11: null
    Color12: null
    Color13: null
    Color14: null
    Color15: null
    Color16: null
    Color17: null
     
    #==============================#
    # Set the type of firework that
    # will be created when the
    # grenade explodes. You can use
    # the following types.
    # Note that they must be spelt
    # exactly as I have them listed.
    #==============================#
    # BALL, BALL_LARGE, BURST,
    # CREEPER, STAR
    #==============================#
     
    Type: BALL_LARGE
     
    #==============================#
    # You can add the flicker
    # feature to the firework by
    # changing 'false' to 'true'.
    # To disable flicker, set the
    # option to 'false'.
    #==============================#
     
    Flicker: false
     
    #==============================#
    # Add a single fade color to
    # your firework. You can use
    # the following colors.
    # Reset to 'null' to disable.
    # Note that they must be spelt
    # exactly as I have them listed.
    #==============================#
    # AQUA, BLACK, BLUE, FUCHSIA,
    # GRAY, GREEN, LIME, MAROON,
    # NAVY, OLIVE, ORANGE, PURPLE,
    # RED, SILVER, TEAL, WHITE,
    # YELLOW
    #==============================#
     
    Fade: null
     
    #==============================#
    # When the grenade explodes,
    # all players in a radius of 3
    # will be given a potion effect
    # set below. Replace 'null'
    # with a potion effect.
    # Reset to 'null' to disable.
    # You can use the
    # following potion effects.
    # Note that they must be spelt
    # exactly as I have them listed.
    #==============================#
    # BLINDNESS, CONFUSION,
    # DAMAGE_RESISTANCE,
    # FAST_DIGGING,
    # FIRE-RESISTANCE, HUNGER,
    # INCREASE_DAMAGE, INVISIBILITY,
    # JUMP, NIGHT_VISION, POISON,
    # REGENERATION, SLOW,
    # SLOW_DIGGING, SPEED,
    # WATER_BREATHING, WEAKNESS,
    # WITHER
    #==============================#
     
    Potion: null
     
    #==============================#
    # Set how long the potion
    # effect will last. Duration is
    # in ticks.
    # (20 ticks = 1 second)
    #==============================#
     
    Duration: 60
    
    But I don't know how to make them work together! :[

    Updated OP with fully changed code and completed config.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  2. Offline

    Reptar_

    Bump.
     
  3. Offline

    Reptar_

    Bump again.
     
Thread Status:
Not open for further replies.

Share This Page