CRYSTAL WARS [Unlimited Teams - SQL Support] 1.0

CrystalWars for your 1.8 Minecraft server

  1. MSWS
    Native Minecraft Version:
    Legacy (< 1.13)
    Tested Minecraft Versions:
    • 1.8
    Discretion: This project is rather outdated, it will not be worked on in the future.

    [​IMG]
    [​IMG]

    What is CrystalWars?

    CrystalWars is a team wars variant game that features any amount of teams that can be set. Battle enemy teams in the conquest of being the last team standing! CrystalWars is an easy to manage, fun to play, and extremely configurable game that you and your players will enjoy!​

    Features

    Unlimited teams! Create any amount of teams you want! 4v4, 2v2v2, all you need is enough players!

    MySQL Database support! Keep your player's stats up-to-date across multiple servers!

    Easy to use kits! Which are Completely Customizable! CrystalWars comes with 4 premade kits. (Archer, Fighter, Builder, and Ninja

    Everything customizable! Configure all messages, sounds, and game settings!

    No-lag Scoreboard! Also completely customizable! Customize your scoreboard per-world if need be.

    Stats Tracking and GUI! Players can view their own stats using /cw stats. Once again this GUI is completely customizable.

    Simple permissions! Give your admins crystal.* and your regular players crystal.command, crystal.aj (or crystal.autojoin).

    Leaderboards! Easy and simple to manage leaderboards per-world! Track who's playing the most and view other player's stats!

    Name your teams! No more boring "Red" or "Blue" teams! You could have the "Dragons" face off against the "Wizards"!

    All games are completely automatic! You won't need to worry about world or player management.

    Simple GUI management, you can easily modifiy costs, remove and add items, everything simplified for easy configuration!

    Run certain commands based on who wins or loses! You can reward winners and punish losers!

    Double Jump! A brand new item which increases player's mobility! Fight in the skies and create strong fortifications!

    Automatic Ore Respawn! An easy way to motivate other players to venture around the map to get the ores!

    Join with Signs, Entities, or by GUI! All three ways are easy to setup!

    Screenshots / Examples
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    Setup
    Warning. The setup of the teams can be difficult at first. A good guide is /cw help setup
    There is a command (/cw check) that you can use for help on what you need to do to setup your map.
    You just downloaded the plugin, that's great! But! Now, you have to work out how to setup the plugin.

    First of all, you'll need a map. I recommend creating one for now, or you can use a flatworld for testing reasons.
    Generally, there should be islands for each team, and a middle island for all the teams to fight at. The map should be around Y = 20, as players will die at -10. Additionally, Middle should have some sort of ore (whatever is used in the Shop GUI, default is Quartz Ore) to encourage players to go to mid to upgrade their tools.
    You'll want to /cw create at least two teams. Once you've done that, go to the place(s) where you want the team members to spawn.
    For example, stand around Red's base and do /cw create spawn red. You can specify however many spawns you want. The team members will
    be spread out around the spawns.

    The spectator spawnpoint should be in the middle of the map, at a high-ish point. Players will be prevented from placing blocks if they go above the spectator's spawn.

    You can spawn in NPCs extremely easily once their team has been created. To create an NPC for joining a team, the command is

    /cw create NPC [teamName]

    The NPC Command can additionally be used for Server Joining, simply replace the teamName with the world name of the server.

    In order to delete these NPCs, the command is

    /cw delete NPC - This will delete the closest NPC/Leaderboard.

    Once you've created the spawns, you'll want to set the shop, resourceSpawn, and crystal locations for each team.
    To do this, go to the appropriate location and type the appropriate command.

    To set shops: /cw set [coalShop/endShop/teamShop] [teamName]
    To set crystals: /cw set crystal [teamName]
    To set resource generators: /cw set resourceSpawn [teamName]

    Depending on the size of your server, you may want to modify the maxSize of the lobby, and when the game will start.
    To do this, simply type:

    /cw set maxSize [size] (This is the maximum amount of players allowed in the game)
    /cw set startAt [amount] (This is when the countdown will start)

    Assuming you've followed all of these steps correctly, doing /cw check will only tell you that you haven't set the builders.
    The command to do this is simply

    /cw set builders [Builder Names]

    So, for example, /cw set builders MSWS and Notch

    That should be everything! If you're experiencing issues or having trouble setting up the plugin, feel free to contact me at MSWS#9499.

    Permissions
    Main Command:
    - crystal.command - Permission to access /cw
    Sub-Commands:
    - crystal.[command] - Permission for /cw [command]
    - Eg: crystal.start - Allows usage of /cw start
    Kit Permissions:
    - crystal.kit.[kitName] - Permission to access specific kits
    Sign Permissions:
    - crystal.sign - Permission for creating signs
    - crystal.sign.delete - Permission for deleting signs
    Chat Permissions:
    - crystal.teamchat - Permission for using team chat
    - crystal.teamchat.spy - Permission for viewing other team chats
    Miscellaneous:
    - crystal.bypass.limit - Permission to bypass player/world max
    - crystal.stats.others - Allows viewing of other player's stats

    Gameplay
    Players will be spawned on their own respective islands. Depending on what your configuration is, they'll want to collect some coal from their generator. From there, they can get wool and venture around the map. Once a team's crystal is destroyed, they will be notified immediately and will not respawn if they die again. Once there is only one remaining team left, the game is over and players are teleported to the endLocation predefined.

    Support
    If you have any problems, suggestions, or bugs to report, please do so here
    Alternatively, you can also contact me via my Spigot, Discord (MSWS#9499), or Email ([email protected]).

    Configuration
    Code (configyml (Unknown Language)):

    #Thank you for downloading CrystalWars!
    #CrystalWars is a multi-team functional minigame
    #Where your goal is to eliminate other team's crystals
    #Below are the defaults set for games and you can change them however you like
    #I recommend keeping things how they are, however, if you know what you're
    #Doing then go ahead and go crazy
    #Documentation will be listed where necessary
    #If you have any questions feel free to contact me at MSWS#9499


    ################################################
    # +------------------------------------------+ #      
    # |              Quick Settings              | #
    # +------------------------------------------+ #
    ################################################


    Prefix: '&5&l(&dCrystal&5&l)&7'
    HelpLength: 10
    BeginningTimer: 7
    DefaultCountdown: 20
    MaxCrystalHealth: 100
    HealthBarLength: 20
    RespawnTime: 5
    #In Seconds
    LeaderboardRefreshRate: 60
    #Simply say what Class and line logs are sent from
    DetailedLogs: false
    OreRespawn: #In seconds
      Min: 30
      Max: 60
    #Enable this to disguise the /cw command to players without permission.
    FakeInvalidCommand: false


    ################################################
    # +------------------------------------------+ #      
    # |            Database Settings             | #
    # +------------------------------------------+ #
    ################################################


    Database: #If not enabled, then Crystal will use stats.yml
      Enabled: false
      Username: 'plntmc'
      Servername: 'crystalwars'
      Password: 'password'
      IP: '10.0.0.208'
      Port: '3306'


    ################################################
    # +------------------------------------------+ #      
    # |               Chat Settings              | #
    # +------------------------------------------+ #
    ################################################


    ChatFormat: #You can use %prefix% if you have PEX
      Enabled: true
      Format: '%teamColor%%player%&r %message%'
      TeamPrefix: '#'
      TeamChatFormat: '%teamColor%&l%teamName% %teamColor%%player%&r %message%'
      #TeamPrefix is what players will put to chat to their team. Eg: #test
    Status: #Statuses will also appear next to player usernames when they die
      CrystalAlive: "\u2713"
      CrystalDead: '%amo%'
      Dead: "\u2717"


    ################################################
    # +------------------------------------------+ #      
    # |              Sound Settings              | #
    # +------------------------------------------+ #
    ################################################


    #Customize sounds below, make sure to specify a valid sound
    #otherwise you will be spammed errors
    Sounds:
      Countdown: 'NOTE_PLING' #Sound from the scoreboard when the timer is <=10
      ActionSound: 'CLICK' #Sound that the action bar will make when the game starts
      ActionStart: 'NOTE_PLING' #Sound that action bar will make when the action timer ends
      BowCharge: 'NOTE_PLING' #Sound that will be played while an arrow is charing
      ItemGiven: 'ITEM_PICKUP' #Sound played when a player receives an item from their kit
      Kill: 'LEVEL_UP' #Sound that's played to someone when they kill someone
      GameOver: 'LEVEL_UP' #Sound played when game ends
      CrystalHit: 'SILVERFISH_HIT' #Sound played by crystal when it's hit
      PlayerHitCrystal: 'BLAZE_HIT' #Sound played to someone when they damage the crystal
      DoubleJump: 'GHAST_FIREBALL' #Sound played when someone double jumps/leaps
      IncorrectInventory: 'ITEM_BREAK' #Sound played when someone clicks on an empty slot in a GUI
      KitSelected: 'LEVEL_UP' #Sound played when someone selects a kit from /kit
      InvalidBalance: 'HORSE_BREATHE' #Sound played when someone attempts to buy something they can't afford
      Purchase: 'LEVEL_UP' #Sound played when someone purchases an item


    ################################################
    # +------------------------------------------+ #      
    # |               Kit Settings               | #
    # +------------------------------------------+ #
    ################################################


    #Permission for kits: crystal.kit.[kitName], customize GUI in guis.yml
    #You can add whatever kits you want, just make sure to add the
    #Permission to the wanted players
    Kits:
      Archer:
        sword:
          Icon: WOOD_SWORD
          Unbreakable: true
        bow:
          Icon: BOW
          Unbreakable: true
        receive:
          arrow: #Players with kit archer will receive 1 arrow every 7 seconds, max 5
            Icon: ARROW
            Name: '&eArcher Arrow'
            Rate: 7
            Max: 5
        attributes:
          poweredBow: 1000 #Archers can charge a bow for 1 second, the arrow will break wool
      Fighter:
        sword:
          Icon: STONE_SWORD
          Unbreakable: true
        attributes:
        #Fighters will deal 4 more damage points
          damage: 4
      Builder:
        sword:
          Icon: WOOD_SWORD
          Unbreakable: true
        receive:
          wool:
            Icon: WOOL
            Name: '&eBuilder Block'
            SetDataTo: true
            Rate: 2
            Max: 32
      Ninja:
        receive:
          ball:
            Icon: SNOW_BALL
            Name: '&dNinja Star'
            Rate: 5
            Max: 2
        attributes:
          doubleJump: 30 #Ninjas will be able to use double jump every 30 seconds
          fallDamage: false #Ninjas will also not take any fall damage


    ################################################
    # +------------------------------------------+ #      
    # |            Gameplay Settings             | #
    # +------------------------------------------+ #
    ################################################


    MaxGameLength: 30 #In Minutes, modify the message in lang.yml, set to -1 to disable
    InventorySaver: BLAZE_ROD #What material will the inventory saver be?
    LeapWith: #What should item names contain to leap
      Regular: 'Leap Feather'
      Super: 'Super Leap'
    NPC:
      ServerType: SLIME
      TeamType: SHEEP
      Names:
        Team: '%teamColor%&l%teamName%'
        Lobby: '&dWaiting for players &l(%players%/%max%)'
        Countdown: '&d&lStarting in &b&l%startTime%'
        InGame: '&e&lIn Game'
        Title: '&e&l%world%'
    WarnEnding: #Percents to warn players that the game will end (50% of gametime, 75%, etc)
    - 50
    - 75
    - 90
    CommandsOnWin: #Placeholders are %teamName%, %teamColor%, %world%, and %player%
    - 'say %teamColor%%player% has won the game in %world%'
    CommandsOnLose:
    - 'say %player% lost %world%'
    BreakableBlocks:
      default: #Blocks that can be broken in any world unless a manual list is set
      - 'WOOL'
      - 'LONG_GRASS'
      - 'STAINED_GLASS'
      - 'DIAMOND_ORE'
      - 'COAL_ORE'
      - 'REDSTONE_ORE'
      - 'QUARTZ_ORE'
      - 'LAPIS_ORE'
      - 'GOLD_ORE'
      - 'TNT'
      - 'OBSIDIAN'
      - 'LEAVES'
      - 'LEAVES_2'
     #game0: #in game0, only Netherrack would be breakable
     #- NETHERRACK
    ArrowsBreak: #Blocks that can be broken in any world BY AN ARROW (with the poweredBow Attribute) same rules as above
      default:
      - 'WOOL'
     #game0:
     #- 'WOOL'
     #- 'STAINED_GLASS'


    ################################################
    # +------------------------------------------+ #      
    # |           Scoreboard Settings            | #
    # +------------------------------------------+ #
    ################################################


    Scoreboard:
      ActionTimeLeft: '&lGame Start [%progressBar%&r&l] &a%time%'
      Title:
        InGame: '&d&lCRYSTALWARS'
        Lobby: '&d&lWaiting for players...'
        Countdown: '&d&lStarting in &b&l%startTime%'
      Lobby:
      - '&b&lServer'
      - '&d%world%'
      - ' '
      - '&b&lPlayers'
      - '&d%players%/%maxSize%'
      - '  '
      - '&b&lTeam'
      - '%teamColor%%teamName%'
      - '   '
      - '&b&lKit'
      - '&d%kit%'
      #Set separate scoreboards for ingame per world here, if no scoreboard is set then default will be used
      default:
      - '&6&lAlive Teams'
      - '&6%alivePlayers%'
      - ' '
      - '%red_Status% %team_red%'
      - '%yellow_Status% %team_yellow%'
      - '%green_Status% %team_green%'
      - '%blue_Status% %team_blue%'
      - '  '
      - '&c&lPlaytime'
      - '&e%time%'
      #game0:
      #- '&6&lAlive Teams'
      #- '&6%alivePlayers%'
      #- ' '
      #- '%team_red%: %red_Status%'
      #- '%team_blue%: %blue_Status%'
      #- '  '
      #- '&c&lPlaytime'
      #- '&e%time%'
     
    Code (guisyml (Unknown Language)):

    coalShop: #Do NOT change this id
      Size: 27
      Title: 'Coal Shop'
      wool:
        Icon: WOOL
        SetDataTo: true
        Amount: 16
        Cost:
          COAL: 4
      glass:
        Icon: STAINED_GLASS
        SetDataTo: true
        Amount: 16
        Cost:
          COAL: 7
      bow:
        Icon: BOW
        Cost:
          COAL: 12
      snowball:
        Icon: SNOW_BALL
        Cost:
          COAL: 2
      arrow:
        Icon: ARROW
        Amount: 3
        Cost:
          COAL: 6
      stonesword:
        Icon: STONE_SWORD
        Unbreakable: true
        #Should a player be able to buy this once they have it?
        AllowSamePurchase: false
        Cost:
          COAL: 8
      ironhelmet:
        Icon: IRON_HELMET
        AllowSamePurchase: false
        Cost:
          COAL: 5
      ironchest:
        Icon: IRON_CHESTPLATE
        AllowSamePurchase: false
        Cost:
          COAL: 12
      ironlegs:
        Icon: IRON_LEGGINGS
        AllowSamePurchase: false
        Cost:
          COAL: 10
      ironboots:
        Icon: IRON_BOOTS
        AllowSamePurchase: false
        Cost:
          COAL: 5
      stonepick:
        Icon: IRON_PICKAXE
        AllowSamePurchase: false
        Cost:
          COAL: 6
      rod:
        Icon: FISHING_ROD
        Cost:
          COAL: 8
      feather:
        Icon: FEATHER
        Name: '&d&lLeap Feather'
        Cost:
          COAL: 8
      tnt:
        Icon: TNT
        Cost:
          COAL: 14
      flintsteel:
        Icon: FLINT_AND_STEEL
        Cost:
          COAL: 6
      quartz:
        Icon: QUARTZ
        Cost:
          COAL: 5
    endShop: #Again, DO NOT change this id
      Size: 27
      Title: 'End Shop'
      diamondhelmet:
        Icon: DIAMOND_HELMET
        AllowSamePurchase: false
        Cost:
          QUARTZ: 3
      diamondchest:
        Icon: DIAMOND_CHESTPLATE
        AllowSamePurchase: false
        Cost:
          DIAMOND: 12
      diamondlegs:
        Icon: DIAMOND_LEGGINGS
        AllowSamePurchase: false
        Cost:
          QUARTZ: 10
          DIAMOND: 8
      diamondboots:
        Icon: DIAMOND_BOOTS
        AllowSamePurchase: false
        Cost:
          QUARTZ: 3
      diamondpickaxe:
        Icon: DIAMOND_PICKAXE
        AllowSamePurchase: false
        Cost:
          QUARTZ: 8
      obsidian:
        Icon: OBSIDIAN
        Cost:
          QUARTZ: 3
      diamondsword:
        Icon: DIAMOND_SWORD
        Unbreakable: true
        AllowSamePurchase: false
        Cost:
          QUARTZ: 6
      epearl:
        Icon: ENDER_PEARL
        Cost:
          QUARTZ: 4
      superleap:
        Icon: FEATHER
        Name: '&d&lSuper Leap'
        Cost:
          QUARTZ: 4
        Enchantments:
          PROTECTION_ENVIRONMENTAL:
            Level: 1
            Visible: false
      saveInv: #In order for it this work, it must be a BLAZE_ROD
        Icon: BLAZE_ROD
        Name: '&6&lInventory Saver'
        AllowSamePurchase: false
        Cost:
          QUARTZ: 20
        Lore:
        - 'If you die while your crystal is alive'
        - 'you will keep your items'
      gapple:
        Icon: GOLDEN_APPLE
        Data: 1
        Cost:
          QUARTZ: 6
          COAL: 20
    teamShop: #Rates are per tick (20 ticks/second)
      Size: 27
      Title: 'Team Shop'
      coalboost:
        Icon: HOPPER
        Lore:
        - 'Increases coal generated by one'
        AddResources:
          COAL: #Increases the amount that coal is generated by 1
            Amount: 1
        Cost:
          QUARTZ: 7
          COAL: 20
      quartz:
        Icon: QUARTZ
        Lore:
        - 'Resource generator spawns quartz every 10 seconds'
        AllowSamePurchase: false
        AddResources:
          QUARTZ: #Adds Quartz to the resource spawner, being spawned every 5 seconds
            Amount: 1
            Rate: 100
        Cost:
          QUARTZ: 16
      diamond:
        Icon: DIAMOND
        Lore:
        - 'Resource generator spawns diamonds every 5 seconds'
        AllowSamePurchase: false
        AddResources:
          DIAMOND:
            Amount: 1
            Rate: 100
        Cost:
          QUARTZ: 14
          COAL: 30
      protection_I:
        Icon: DIAMOND_CHESTPLATE
        Lore:
        - 'Everyone on your team will receive Protection I'
        AllowSamePurchase: false
        Enchantments:
          PROTECTION_ENVIRONMENTAL:
            Level: 1
            Visible: false
        Cost:
          DIAMOND: 8
        AddEnchantToTeam:
          PROTECTION_ENVIRONMENTAL: 1
      sharpness_I:
        Icon: DIAMOND_SWORD
        Lore:
        - 'Everyone on your team will receive Sharpness I'
        AllowSamePurchase: false
        Enchantments:
          DAMAGE_ALL:
            Level: 1
            Visible: false
        Cost:
          DIAMOND: 8
        AddEnchantToTeam:
          DAMAGE_ALL: 1
      protection_II:
        Icon: DIAMOND_CHESTPLATE
        Lore:
        - 'Everyone on your team will receive Protection II'
        AllowSamePurchase: false
        Enchantments:
          PROTECTION_ENVIRONMENTAL:
            Level: 2
            Visible: false
        Cost:
          DIAMOND: 16
        AddEnchantToTeam:
          PROTECTION_ENVIRONMENTAL: 2
    kitMenu: #Customize kits in config.yml
      Size: 27
      Title: 'Kit Menu'
      Archer:
        Icon: BOW
        Name: '&e&lArcher Kit'
        Permission: crystal.kit.archer
        Lore:
        - ''
        - '&7Shoot other players, or even blocks!'
        - '&7Receives: Wood Sword, Bow, 1 Arrow every 7 seconds (Max 5)'
        - '&7Fully charged arrows break blocks'
      Fighter:
        Icon: STONE_SWORD
        Name: '&e&lFighter Kit'
        Permission: crystal.kit.fighter
        Lore:
        - ''
        - '&7Go all out offense, dealing extra damage per hit'
        - '&7Receives: Stone Sword, 4 extra points of damage'
        - '&7Damage also applies to Crystals'
      Builder:
        Icon: WOOL
        Name: '&e&lBuilder Kit'
        Permission: crystal.kit.builder
        Lore:
        - ''
        - '&7Quickly build up your defenses around the crystal'
        - '&7Receives: Wood Sword, Wool per 2 seconds (max 32)'
        - '&7Regular wool is counted separately from wool kit'
      Ninja:
        Icon: SNOW_BALL
        Name: '&d&lNinja Kit'
        Permission: crystal.kit.ninja
        Lore:
        - ''
        - '&7Be quick and nimble, double jumping to places'
        - '&7Receives: 1 Snowball every 5 seconds, (Max 2)'
        - '&7Double Jump (Cooldown: 30 seconds)'
    gameSelectorItem:
      Icon: COMPASS
      Name: '&a&lGame Selector'
      Lore:
      - '&7Use me to choose what game'
      - '&7you want to join!'
    gameSelectionGui:
      Title: 'Game Selection'
      Size: 54
      Status:
        Offline: '&7Status: &c&lOffline'
        InGame: '&7Status: &b&lInGame &b(%players%)'
        Countdown: '&a&lStarting in %time%'
        Waiting: '&6&lWaiting for Players &6(%players%/%max%)'
    statsGui: #Use these stats for leaderboards (eg: /cw set leaderboard wins)
      Title: '&d&lStats - &9&l%player%'
      Size: 27
      Games:
        Icon: WOOL
        Slot: 10
        Name: '&a&lGames'
        Lore:
        - ''
        - '&dWins: &b%wins%'
        - '&dLosses: &b%losses%'
        - '&dQuits: &b%quits%'
        - '&dTime: &b%time%'
        - '&dWin Ratio: &b%winRatio%'
      PVP:
        Slot: 13
        Icon: DIAMOND_SWORD
        Name: '&c&lPVP'
        Lore:
        - ''
        - '&dKills: &b%kills%'
        - '&dDeaths: &b%deaths%'
        - '&dFinal Kills: &b%finalDeaths%'
        - '&dFinal Deaths: &b%finalDeaths%'
        - '&dKDR: &b%kdr% &dFKDR: &b%fkdr%'
        - '&dDamage Dealt: &b%dmgDealt%'
        - '&dDamage Received: &b%dmgReceived%'
      Misc:
        Slot: 16
        Icon: QUARTZ
        Name: '&d&lMiscellaneous'
        Lore:
        - ''
        - '&dBlocks Broken: &b%blocksBroken%'
        - '&dPurchases: &b%purchases%'
        - '&dCrystals Destroyed: &b%crystalsDestroyed%'
      BACKGROUND_ITEM:
        Icon: STAINED_GLASS_PANE
        Data: 7
        Name: ' '
     
    Code (codesnippet (Unknown Language)):

    if (pManager.getTeam(player).equals(winner)) {
                   pManager.increment(player, "wins", 1);
                   Main.plugin.config.getStringList("CommandsOnWin").forEach((line -> {
                       Bukkit.dispatchCommand(Bukkit.getConsoleSender(),
                               MSG.color(line.replace("%teamName%", MSG.camelCase(winner))
                                       .replace("%teamColor%", getColor(world, winner))
                                       .replace("%player%", player.getName()).replace("%world%", world.getName())));
                   }));
               } else {
                   pManager.increment(player, "losses", 1);
                   Main.plugin.config.getStringList("CommandsOnLose").forEach((line -> {
                       Bukkit.dispatchCommand(Bukkit.getConsoleSender(),
                               MSG.color(line.replace("%teamName%", MSG.camelCase(winner))
                                       .replace("%teamColor%", getColor(world, winner))
                                       .replace("%player%", player.getName()).replace("%world%", world.getName())));
                   }));
               }
     
    [​IMG]
    chuky025 and GabTM like this.

Recent Reviews

  1. TheFrogline
    TheFrogline
    5/5,
    Version: 1.0
    [en]
    Very interesting this plugin, something quite original and I can think of several ideas! , you have a great project in your hands luck!
    [es]
    ¬°Muy interesante este plugin, algo bastante original y puedo pensar en varias ideas! , tienes un gran proyecto en tus manos suerte!
  2. Fakes
    Fakes
    5/5,
    Version: 1.0
    Very good plugin. It would be cool if you also made an API so that I could display wins or losses in the scoreboard. And so very cool plugin!