[1.13.2] HyperPVP - Project Ares (oc.tc) clone (plugin and website) [MySQL]

Quackster

a devbest user says what
Aug 22, 2010
1,763
1,234
HyperPVP

I originally wrote this plugin back in 2014, when I was 16 years old, I was going through my harddrive and thought I should update it to Minecraft 1.13.2 (current Spigot version as of the date of this thread being posted). Basically, this emulates Project Ares like it was back in 2014, which is a map cycling Minecraft server with multiple gamemodes, and the users can break blocks and the map will cycle to the next and by the time it cycles back, it will load the world like it was never touched in the first place.

The plugin relies on a MySQL connection for keeping track of kills, this unfortunately cannot be toggled off as of this moment.

This release includes the following source code:

- HyperPVP (the main plugin)
- HyperLobby (broken; pending update to 1.13.2)
- The maps I created for hyperpvp.us and the configuration
- Website source

The source code is 5 years old, when I was still somewhat only 2 years into learning Java, so the code is quite bad, I'm fully aware of how bad the code is. :)

Since upgrading to 1.13.2 I've noticed name tag colours above players' heads are lacking colours, I'm looking into fixing that right now.

Features
- Multiple gamemodes supported
- Kill logging on website
- Add friends on website
- Map cycling
- Map destruction (can be changed with map flag settings)
- Region handling (define spots where players cannot remove/edit blocks, or the maximum map boundaries)
- Spawn in with correct dyed leather

Gamemodes
- DTC (Destroy The Core)
- FFA (Free For All)
- TDM (Team Death Match)
- RTC (Race To Core)
- DTM (Destroy The Monument)
- Conquest (The first team to run out of tickets loses, or when the timer runs out the team with the most tickets wins)

Commands

- /join <name> (team name is OPTIONAL can only be used if their rank is higher than 1 in the database or the player is OP/operator)
- /cycle <name> (<name> is map world name and it's optional, can only be used if player is operator or from server console)
- /matchinfo - shows current match info
- /register (creates a pin code to register on website)
- /pin (shows the pin code again)
- /report <message> (alerts staff about a user report)
- /score (increments own team score by 1, for debug purposes)
- /spectate (leaves game and goes into spectate mode)
- /t, /teamchat, /tchat <message> (chat but within team only)

Source Code

The code can be found here:

The compiled JAR can be found here:

This is for Spigot 1.13.2, the folder layout should be like follows:

HyperPVP will create the /HyperPVP/config.yml for you but the maps folder can be found here:

The worlds can be found here:

You must be registered for see images attach

Screenshots (in-game)
You must be registered for see images attach


You must be registered for see images attach


(Demonstration of how spectator works

CzsmhnE.jpg

Screenshots (website)

V82lGqZ.png


a6OG1fa.png


jH9ffd7.png

Map Configuration

A standard map configuration looks like this:

Code:
Settings:
  World: egypt
  Name: Sands of Egypt
  Mode: DTC
  X: -48.0
  Y: 64.0
  Z: 86.0
  Minutes: 60
  MaxPerTeam: '20'
  Features:
  - specialtntplace
  Authors:
  - Quackdot
  Teams:
  - BLUE
  - DARK_RED
  Spawns:
  - DARK_RED,-20,47,16
  - BLUE,27,47,160
  Items:
  - IRON_SWORD,1
  - BOW,1|ARROW_INFINITE,1
  - IRON_PICKAXE,1
  - TNT,2
  - LOG,64
  - GLASS,64
  - COOKED_BEEF,32
  - GOLDEN_APPLE,3
  - ARROW,1
  Regions:
    '1':
      Blocks: ''
      Alert: You have reached the end of the map.
      Type: MAP
      MaxX: 201
      MaxY: 109
      MaxZ: 201
      MinX: -201
      MinY: -10001
      MinZ: -201
    '2':
      TeamWhitelist:
      - DARK_RED
      Blocks: ''
      Alert: You cannot enter red teams spawn
      Type: TEAM
      MaxX: -15
      MaxY: 52
      MaxZ: 22
      MinX: -27
      MinY: 43
      MinZ: 9
    '3':
      TeamWhitelist:
      - BLUE
      Blocks: ''
      Alert: ''
      Type: TEAM
      MaxX: 33
      MaxY: 52
      MaxZ: 166
      MinX: 22
      MinY: 42
      MinZ: 154
    '4':
      TeamWhitelist:
      - BLUE
      Blocks: ''
      Alert: ''
      Type: DTC
      MaxX: 10
      MaxY: 64
      MaxZ: 134
      MinX: 4
      MinY: 58
      MinZ: 128
    '5':
      TeamWhitelist:
      - DARK_RED
      Blocks: ''
      Alert: ''
      Type: DTC
      MaxX: 2
      MaxY: 64
      MaxZ: 48
      MinX: -4
      MinY: 58
      MinZ: 42
    '6':
      TeamWhitelist:
      - BLUE
      Blocks:
      - TNT
      Alert: ''
      Type: BLOCK_PLACE_DESTORY
      MaxX: -27
      MaxY: 1000
      MaxZ: 166
      MinX: 33
      MinY: -9001
      MinZ: 106
    '7':
      TeamWhitelist:
      - DARK_RED
      Blocks:
      - TNT
      Alert: ''
      Type: BLOCK_PLACE_DESTORY
      MaxX: 33
      MaxY: 1000
      MaxZ: 10
      MinX: -27
      MinY: -9001
      MinZ: 70

Spawn Configuration

You can have multiple spawns for a team like so, defined as TEAM COLOUR,X,Y,Z

Code:
  Spawns:
  - GOLD,16,41,22
  - GOLD,-3,42,-12
  - GOLD,15,44,-4
  - GOLD,-16,41,19

The first part is pretty self explanatory, the second part with the regions however is not.

Map Regions

The region types mean the following below:

- MAP (defines map boundaries where you cannot go further than the defined area)
- BLOCK_PLACE_DESTORY (does not allow blocks being placed nor destroyed here if defined in the blocks list, UNLESS the team has been whitelisted - by colour)
- TEAM (region is only enterable for a certain team, this is for spawn points to stop spawn killing)

The gamemode region types for the map gamemode:

- DTC (defined with a ball of obsidian with lava inside it - THERE MUST BE ONE ONLY FOR EACH TEAM, AND THE WHITELIST IS FOR THAT SPECIFIC TEAM THAT IS DEFENDING IT)
- DTM (defined as obsidian blocks where ALL must be broken to win the game - THERE MUST BE ONE ONLY FOR EACH TEAM, AND THE WHITELIST IS FOR THAT SPECIFIC TEAM THAT IS DEFENDING IT)
- RTC (the single ball of obsidian defined to destroy to leak lava from it)

Map Flags (features)

These are optional, unlike the globally defined gamemode for each map, which is required.

- oneshotarrow (a single shot will kill a player immediately, you'll get an arrow back on successful kill)
- specialtntplace (immediately ignites tnt once placed)
- noblockbreak (disallow block breaking across the entire map)
- tntarrows (when firing an arrow, you'll fire an ignited tnt instead)
- highvelocity (higher velocity arrows, for further accuracy)
- deadlysnowball (when throwing a snowball and landing a successful hit on another player, it will deal 2 hearts damage to other users)
- nohunger (stops hunger draining)
- fastregen (faster health regeneration)
- jumppreassureplate (stepping on a stone pressure plate will make the player fly up in the air)
 
Last edited:

griimnak

You're a slave to the money then you die
Jul 20, 2013
955
794
Damn lol, that's a shit load of features you wrote.

I admire how clean your main class is
I learned a few things just by reading your source, like how you use getLogger.info() instead of System.out.println("[ugly] >>") and how you did your mysql setup
Good job man :up:
 

Quackster

a devbest user says what
Aug 22, 2010
1,763
1,234
Damn lol, that's a shit load of features you wrote.

I admire how clean your main class is
I learned a few things just by reading your source, like how you use getLogger.info() instead of System.out.println("[ugly] >>") and how you did your mysql setup
Good job man :up:

Thanks :)

HyperPVP.java is actually awfully messy though, it was written 5 years ago when I was still somewhat of a learner in Java. I mean, that's just my opinion of it anyways! And you're welcome, glad you could learn some new things from it. The source code is really, really bad though, lol, like for example I had a massive where it would wait to see if new threads needed to be created, etc, I don't know how it works to be honest without causing any concurrency errors!

Also yeah, this project was started in 2013 so it had over a year worth of development into it, that's why it has so many features. I remember at the start this didn't track kills and only supported DTC gamemode :)

Also it has a limitation of only supporting two teams... which kinda sucks, might have to rewrite it in future.
 

Users who are viewing this thread

Top