Bridge Plugin

Discussion in 'Plugin Requests' started by Xp10d3, Jan 8, 2021.

  1. Offline

    Xp10d3

    This... is arguably the most complex plugin I'm requesting, BUT HEAR ME OUT. I hopefully explain this well. But first:
    PLEASE FIRST UNDERSTAND HOW HYPIXEL/LUNAR BRIDGE WORKS. It is key that you understand that otherwise what I'm explaining might be a bit confusing.

    Plugin Category: Complex plugins, fun, admin, PvP.
    Version: 1.8
    Suggested Name: The Bridge
    What I want:

    Alright, so I literally want the Hypixel Bridge plugin. Being a novice plugin developer and experience server manager, I think I know how it works. This is only for 1v1's; if anything, I can attempt to code in 2v2's, 3v3's, etc. But since Lunar is the only other Bridge server, I think 1v1's are fine for now. Anyways I'm getting off topic. I'll be separating this into categories.
    - How to start the game: How starting the game works, obviously.
    - Arenas: How arenas work, where the player spawns, resetting the arena, etc.
    - Scoring: How scoring works, how goals work, etc.
    - Finishing a duel: How finishing a duel works, such as how winning will work and how to track it.
    - API expansion: Future goals for this plugin and consent.

    How to Start the Game
    I plan on integrating this into Duel's API so I can have players duel each other in the bridge, but to make things easier I'll have this simple command:
    /bridgesstart {player1} {player2} {arena_name}
    That will then teleport player1 and player2 into the arena (specified by arena_name) which I'll explain in the Arenas section. This ties into API expansion. If possible, please add a start event to the plugin. This will allow me to integrate this into other plugins, such as bridges cosmetics (customizable cages, trails, etc.) and Duels API (hopefully). Also please add placeholders such as %player1%, %player2%, and %arena_name% using PlaceHolderAPI if possible. When the game starts, multiple commands should be ran (to allow configurability of kits and such). See the config section at the bottom.

    Arenas
    Obviously in order for the plugin to work, we need arenas. This will be much like the popular Duels plugin. Admins manually create an arena in the middle of nowhere, then set the player 1's position and the player 2's position. This should be quite similar, but with a few additional twists. First off creating the arena. Typing the command /bridges createarena <arena_name> just adds a path to the arenas.yml file; it doesn't actually do anything until the player positions and goals positions are set up. Now onto setting those positions. The command /bridges set player1 <arena_name> will set the player 1's position, or where player 1 spawns in arena_name once the game starts. The command /bridges set player2 <arena_name> will set the position for player 2 when the game starts. Finally, the goals. The command /bridges set goal1 <arena_name> sets the goal for player1 (hence goal1), and the command /bridges set goal2 <arena_name> sets the goal for player2 (hence goal2). However for scoring,I honestly do not really know how tracking whether the player jumped through the goal works on Hypixel or Lunar for that matter. The goal isn't a 1x1 hole, rather it's a "circle" with a diameter of about 4 blocks, meaning you will have to track whether the player passes through this hole or not. Finally, we have resetting the arena. If you can't do this, let me know. That's perfectly fine. I'm pretty sure I can set up a plugin that once the game is over the arena is reset. It is preferred that you set this up, but if you can't, that's fine. Arena resetting is just removing the blocks that the player placed and broke. That's it. Nothing else to it. It's complex on it's own, but the concept is simple.

    Scoring
    Scoring... is a bit tricky. This is something that requires quite a bit of skill to code in my opinion, and it's a wonder Hypixel and Lunar were able to do it. But anyways, once a player passes through goal1 or goal2 (depending on which team their on), their score increases. Please, PLEASE add scoreboard support. You should be able to see what each player's score is and if possible how many kills you have on that game. Once a player reaches 5 goals, the game ends and the event is fired (see API Expansion below).

    Finishing a Duel
    Pretty simple (except for the API part and resetting the arena of course). Once a player reaches 5 goals, the event BridgesGameOver is fired and a message is sent saying, "<player> won!" Please set up commands to be ran when the duel is finished. Configurable options for when the duel is done should be added (see config at the bottom).

    API Expansion
    I want this to be usable as an API if possible. This will not only make things easier when attempting to integrate this into Duels, but also make things easier when editing the source code. I very, very likely will edit this plugin in case I missed something here or just to add cosmetics. So here are some events I would like added:
    Code:
    BridgeStartEvent:
      Fired when a game starts. Contains player1, player2, and the arena name.
    BridgeScoreEvent:
      Fired when a player scores. Contains player who scored and the current score during the game.
    BridgeKillEvent:
      Fired when a player kills another player ONLY during a game. Contains killer and killed.
    BridgeEndEvent:
      Fired when the game ends. Contains who won, who lost, and the score.
    
    Config Examples
    These are some config examples and ARE NOT FINAL. Feel free to change them to your liking.
    config.yml
    Code:
    #Commands ran when the game starts. {player1} is the first player or who initiated the duel, and {player2} is the second player or who accepted the duel.
    whenGameStarts:
    - msg {player1} example
    - kick {player2} example
    
    #Commands that are ran when the game ends. {winner} is the player who won the duel, and {loser} is who lost the duel.
    whenGameEnds:
    - money give {winner} 10000000000
    - tell {loser} L YOU LOST BAD LLLLL
    
    #Whether to teleport players once the game is done and which world to teleport them to.
    teleportPlayers: true
    worldTeleported: world
    
    #Whether to teleport players to world spawn once game is done
    teleportToSpawn: true
    
    #OPTIONAL. You do NOT need to add this. Basically worlds you can't start duels in.
    disabled-worlds
    - test
    - spawn
    
    Permissions
    Since I went over commands above, here are the permissions:
    bridge.*: Allows use of all bridge commands
    bridge.start: Allows use of /bridgestart. Default: OP
    bridge.admin: Allows use of /bridgestart and /bridges set <player1/player2/goal1/goal2> [arena_name] and /bridges create <arena_name>.

    When I'd like this by
    NO RUSH. This is a future project of mine and I know this will take FOREVER. But PLEASE let me know if you're interested or have any questions. I'm open to feedback.

    On a side note...
    I'd for sure like permission to edit the source code, so if you could send the src that would be amazing. Thanks again.
     
    Last edited by a moderator: Jan 8, 2021
  2. Offline

    Xp10d3

    Bump. If you want any changes to this let me know.
     
  3. Offline

    Xp10d3

  4. Offline

    Xp10d3

    Bumpp
     
  5. Offline

    Xp10d3

    Bumppp
     
  6. Offline

    Xp10d3

    Bumpppp
     
  7. Offline

    Xp10d3

    Bumppppp
     
  8. Offline

    Xp10d3

    Bumpppppp
     

Share This Page