Minigames-Api 3.3.1

Spigot Minigames-Api

  1. McVier3ck
    This a Api that makes Coding Minigames Plugins easier.

    Features
    -Config
    -Teams
    -MySQL
    -Stats System (Use MySQL)

    How To Install

    1. Go to Properties from your Projekt.
    2. Go to Java Build Path.
    3. Click on "Add External Jars"
    4. Select the Minigames Api.jar

    [​IMG]

    How To Use

    Code (Text):

    Team TutorialTeam = new Team(TeamName);
    --Creates new Team

    Team.joinRandomTeam(Player)
    --The player joins the team with
    fewest player

    TutorialTeam.containsPlayer(player)
    --Returns true if player in Team

    TutorialTeam.leaveTeam(player)
    --Remove Player from Team

    TutorialTeam.JoinTeam(player)
    --Add Player to Team

    TutorialTeam.setColor(color);
    --Set the Color From Team

    TutorialTeam.setCanBreak(canBreak);
    --Set Block Breaking On/Off

    --Set Interact with world On/Off
    TutorialTeam.setCanInteract(canInteract);

    --Set Block Placeing On/Off
    TutorialTeam.setCanPlace(canPlace);

    --Get a Array of Player in the Team
    TutorialTeam.getPlayers();

    --Set FriendlyFire On/Off
    TutorialTeam.setFriendlyFire(friendlyFire);

    --Set Returns Spawn
    TutorialTeam.getSpawn();

    --Set the spawn Location
    TutorialTeam.setSpawn(Location);

     

    Code (Text):

    --New Config in Plugin Folder
    Config TutorialConfig = new Config(filename, pluginname);

    --New Config in Plugin Folder + Extra Folder
    Config TutorialConfig = new Config(filename, pluginname, Folder);

    --Creates the File
    TutorialConfig.create();

    --Deletes the File
    TutorialConfig.delete();

    --Add location to Config
    TutorialConfig.addLocation(LocationName, location);

    --Returns Location
    --Returns with Yaw and Ptich if yawandpitch == true
    TutorialConfig.getLocation(LocationName, yawandpitch)

    --Can Interact with Yml Methods
    TutorialConfig.getConfig()


     

    Code (Text):

    --Creates new Stats
    --Use Mysql
    Stats TutorialStats = new Stats(mysql, tablename);

    --Returns the stat from player
    TutorialStats.getStat(player, stat);

    --Set the stat from Player
    TutorialStats.setStat(player, stat, statvalue);
     

    Code (Text):

    --Creates new MySql
    MySQL TutorialMySQL = new MySQL(host, port, user, password, database);

    -- Close the Connection
    TutorialMySQL.closeConnection();

    -- Close open Ressources
    TutorialMySQL.closeRessources(rs, st);

    --Makes a Query update
    TutorialMySQL.queryUpdate(query);

    --Open the Connection
    TutorialMySQL.openConnection();
     

    Code (Text):

    --Creates new ScoreBoard
    CustomScoreboard TutorialScoreboard = new CustomScoreboard(Name, displaySlot);

    --Sets the Scoreboard for the Player
    TutorialScoreboard.setScoreboard(player);

    --Sets the Scoreboard for all Player from Team
    TutorialScoreboard.setScoreboard(team);

    -Get Score
    TutorialScoreboard.getScore(name)

    --Sets Score
    TutorialScoreboard.setScore(name, value)

     

    Code (Text):

    --Creates new Arena
    Arena TutorialArena = new Arena(X1, Y1, Z1, X2, Y2, Z2, world, name);

    --Creates new Arena with WorldEdit Cords from Player
    Arena TutorialArena = new Arena(Player, name);

    --Save the Arena area
    TutorialArena.save();

    --Save the Arena area to specific File
    TutorialArena.save(Filename);

    --Load the Arena area to specific File
    TutorialArena.load(Filename);

    --Reset the Arena area
    TutorialArena.reset()

    --Set Block Breaking On/Off
    TutorialArena.setCanBreak(canBreak);

    --Set Interact with world On/Off
    TutorialArena.setCanInteract(canInteract);

    --Set Block Placeing On/Off
    TutorialArena.setCanPlace(canPlace);

    --Returns if Player int
    TutorialArena.isPlayerIn(player);

    --Set Returns Spawn
    TutorialTeam.getSpawn();

    --Set the spawn Location
    TutorialTeam.setSpawn(Location);

    --Set Returns Location by name
    TutorialTeam.getLocation(Name);

    --Set the Location by name
    TutorialTeam.setLocation(Name, Location);

    --Return a Hashmap with all Locations
    TutorialTeam.getLocations();

    --Finds a Player from all Areanas
    TutorialTeam.findPlayer(Player)
     

    Code (Text):

    --Creates new Countdown
    --Countdowntimes are the time when displayed use a Array
    --like [1,2,3,4,5,10,15] and when then countdown reach
    --this value the message comes
    Countdown TutorialCountdown = new Countdown(Countdowntimes, Startvalue);

    Countdown TutorialCountdown = new Countdown(Countdowntimes, Startvalue, Player[] players);

    Countdown TutorialCountdown = new Countdown(Countdowntimes, Startvalue, Team team);

    --Starts Countdown for all Player on server
    -- Placeing %time% in message will be replaced with the CurentCount
    TutorialCountdown.StartForAll(message);
    --Starts for All Player there was Set in the Constructor
    TutorialCountdown.StartForPlayers(message);

    --Stop the Countdown
    TutorialCountdown.Stop();

    --Use Title for Countdown
    TutorialCountdown.setUseTitle(useTitle);

    --Use Xp for Countdown
    TutorialCountdown.setUseXp(useXp);

    --Set the color for the Title
    TutorialCountdown.setTitleColor(titleColor);

    MinigamesApi.countDownEvent.registeCountDownEvent(listener.class);
    --Listener.class = implements CountdownEventListener
    --In the method CountdownEventOccurred goes you code when finshed the countdown

     

    Code (Text):

    --Creates Kit
    Kit TutorialKit = new Kit();

    --Gives the kit a Player
    TutorialKit.giveKit(Player)

    --Adds a Item to the kit
    TutorialKit.addItem(Slot, Item)


     
    [​IMG]


    Information


    1. You Can See the SourceCode

    2. If you have some ideas or improvements then send them me.


Recent Updates

  1. Update Spigot Version
  2. Wishes from HSIkMy
  3. fixing

Recent Reviews

  1. retrooper
    retrooper
    4/5,
    Version: 3.3.1
    FEEDBACKThis is an amazing API, my previous custom minigames were made manually without an API, took me 15+ days average for one minigame.
    Using this API makes simple stuff much easier for your game, (like storing locations, saving things as a file, having teams, countdowns, scorebords.). take less time, I manage to make minigames in 2-3 days

    IMPROVEMENT:
    I would like an improvement for the kit saving system, I have done it before it is very simple, please add a feature that gets a players inventory and saves the player's inventory's contents and armor contents, if you cannot do this, there are many people showing this in the forums, adding this feature would help me not have to remake it all the time.

    OVERALL this APIis amazing, I hope the creator reads this and tries to add this.

    From Developer,

    Retrooper
  2. WailTosti
    WailTosti
    4/5,
    Version: 3.3.1
    How you can a player let join a Arena. Because i have the Arena. But how to join one. Further nice plugin
  3. Defalt
    Defalt
    2/5,
    Version: 3.3.1
    Ansich ein paar gute ansätze, aber ich kann nicht damit arbeiten. Vorallem bei MySql wurde nicht mal eine Methode für einen ResultSet erstellt. Die Stats erstellen für jeden Kill/Death eine neue Row. So dinge halten einfach mega auf. Das Arenaprinzip hingegen ist mega gut gelungen. Das Kitsystem hätte man noch mit einer Fileconfig verknüpfen können, aber es geht auch so. Also naja dadurch dass das MySql system nicht richtig funktioniert, ist die halbe api für mich nutzlos. Hat gute sachen dabei, aber für mich relativ unbrauchbar. Wenn das mit der MySql und den Stats gefixt wird gibts schon mal 4Sterne. Bei verbesserungen zb im Kitsystem kommt auch der 5te stern hinzu ;)
  4. TakenUsername
    TakenUsername
    5/5,
    Version: 3.3.1
    Awesome API. Really helps make minigames a lot cleaner and simpler. The developer is also helpful and patient while answering my questions.
  5. minecrafters
    minecrafters
    5/5,
    Version: 3.3
    Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Very Good!
  6. ZathrusWriter
    ZathrusWriter
    4/5,
    Version: 3.3
    It's not a bad API but man, saving and resetting arenas is heavily unoptimized and halts the server. Why not use WE snapshots if you already support WE in creating an area? Also, XP is never reset in the countdown, always leaving players as 0 EXP level (or 60, if they exit MC at the start of it).
  7. Sebka97
    Sebka97
    4/5,
    Version: 3.3
    Would give you 5 stars if the JavaDoc there online :) Could you fix it please it would help. And are you planning any updates soon ?
  8. redzulu1
    redzulu1
    5/5,
    Version: 3.3
    Arena testArena = new Arena(-306, 79, 270, -296, 77, 279, world, test);
    I have an error under world and test, why. The world im using is "world" and i want to call the arena "test'. why isn't this working?
  9. ExtendedCodek
    ExtendedCodek
    5/5,
    Version: 3.3
    Great API! Awesome Developer! 500+ Stars For You! I Will Make Sure To Use This API On My Server! :D :D
  10. Aditya
    Aditya
    5/5,
    Version: 3.3
    5+5 stars for you!! Amazing API man! I will love to contribute more features to this API! :) Keep up the awesome work.