Coder Social home page Coder Social logo

uhc's Introduction

UHC

A simple UHC plugin!

Build and Artifact

Features

  • Moving configurable world border
  • Reset world to first day
  • Disable player passive regeneration
  • Reset player stats and inventory
  • Player health displayed in player list
  • Disable totem of undying
  • Disable villager damage and trades
  • Removed suspicious stew recipe
  • Block new players from joining after a game has started

Commands

/uhc start - Starts the game

Permissions

uhc.admin - Allows players to use administrative commands (Default: op)

Contributing

General workflow

  1. First, pull any changes from main to make sure you're up-to-date
  2. Create a branch from main
    • Give your branch a name that describes your change (e.g. add-scoreboard)
    • Focus on one change per branch
    • Keep your commits small, and write descriptive commit messages
  3. When you're ready, create a pull request to main with a descriptive title, and listing any changes made in its description
    • Link any issues that your pull request is related to as well

Example:

Create scoreboard for total points

ADDED - Scoreboard displayed in-game at game end  
CHANGED - Updated `StorageManager` class to persist scoreboard data

After the pull request has been reviewed, approved, and passes all automated checks, it will be merged into main.

Building locally

Thanks to Gradle, building locally is easy no matter what platform you're on. Simply run the following command:

macOS/Linux/Unix/

./gradlew build

Windows

gradlew.bat build

This build step will also run all checks, making sure your code is clean.

uhc's People

Contributors

dependabot[bot] avatar leviem1 avatar zupmine avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

montras5959

uhc's Issues

Make an event for a player death

Is your feature request related to a problem? Please describe.
Yes, we need the event for other things to work

Describe the solution you'd like
Make a lifeStatusEvent for a player's alive status changing

Describe alternatives you've considered
Make a player death event which detects a player's status changing from alive to dead

Player health scoreboard inconsistent

Describe the bug
When all players are full health and a new player joins, only their health is shown until other players take damage.

Expected behavior
All players' health should be shown at all times.

Cancel villager trades

Cancel all villager trades with the intent of re-enabling them in the future with custom trades. This can be done by cancelling a PlayerInteractEntityEvent where the type of the entity is an AbstractVillager.

Disable PvP for first day

Is your feature request related to a problem? Please describe.
No, new feature

Describe the solution you'd like
Players should not be able to damage each other until sunrise of the second day

  • Send a message when PvP is re-enabled

Fix Player XP Reset

Describe the bug
Player XP is not reset on game start, wrong function used

Expected behavior
Player XP should be set to 0

Shrink border when a player dies

Is your feature request related to a problem? Please describe.
No, its a new feature

Describe the solution you'd like
Whenever a player dies the border should shrink

  • Border should not shrink if there are only 2 players alive or less

Add health scoreboard in player list

Set time to day on game start

Is your feature request related to a problem? Please describe.
Game should start at the beginning of the day

Describe the solution you'd like
Set time to day when start command is used

Add end command

  • End game
  • Check if > 2 players alive
  • Set all players to creative
  • Expand world border
  • Send Message

Reset player inventories on start

Is your feature request related to a problem? Please describe.
Players can collect items before the start of the game and will have an unfair advantage.

Describe the solution you'd like
Player's inventories should be reset.

Create a way to add recipes

Is your feature request related to a problem? Please describe.
Yes, we will need this for God-Apples and potions

Describe the solution you'd like
Have a simple way to add recipes in the future

Disable suspicious stew

Cancel suspicious stew from by removing any crafting recipes containing both mushrooms, a bowl, and any flower (determined by item tags).

Prevent new players from joining

Prevent new players from joining the game after the game is started. This will consist of a few parts:

  • Create a HashSet inside of the GameState class that will store all players in the game.
  • Create a storeGamePlayers() method in GameState, store all online players in that Set if the input is true.
  • Create a getGamePlayers() method which returns a copy of the HashSet (it has to be a copy otherwise the code that uses it could accidentally modify the data)
  • Create a method in GameState named isGamePlayer() to search if a Player is in the Set.
  • Create a listener to check if a Player from a PlayerJoinEvent is in the list of online players when the game is running.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.