Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/regulad/advancementhunt

Minigame Plugin for Minecraft.
https://github.com/regulad/advancementhunt

bukkit bukkit-plugin java java-11 minecraft minecraft-plugin mysql player spigot spigot-plugin yml

Last synced: 9 days ago
JSON representation

Minigame Plugin for Minecraft.

Awesome Lists containing this project

README

        

# AdvancementHunt

AdvancementHunt is a minigame plugin.

The objective of the game is to obtain a certain advancement within the time limit without dying.

There are two teams, the Hunters and the Hunted.

At the beginning of the game, the Hunted will recieve the name of an advancement and are tasked with completing it.

They must first figure out what the advancement is and then obtain it.

Also, at the beginning of the game, the Hunters are tasked with killing the Hunted before they obtain the advancement.
The Hunters may not know what the advancement is.

All games have a time limit, and if it is reached, the game will stalemate.

Game stats are logged and can be accessed via PlaceholderAPI placeholders.

## Requirements

1. The following plugins:
* Multiverse-Core
* Multiverse-NetherPortals
* Multiverse-Inventories
* PlaceholderAPI
2. Paper 1.20.4+

## Setup

AdvancementHunt is ready to go out of the box.

## Use

### Commands

* `/gamestart [Hunted player] [Advancement]

## Placeholders

### Identifier is `ah`

* `wins`: The total amount of wins a player has.
* `losses`: The total amount of losses a player has.
* `kills`: Shows total kills of the player.
* `deaths`: Shows total deaths of the player.
* `id`: The advancement ID.
* `advancement`: The name of the advancement.
* `hunted`: Shows the display name of the player being hunted.
* `hunters`: Shows a list of display names for the players that are hunting. Seperated by commas.
* `time`: Shows time remaining, in `HH:MM:SS` format.

Example:

```
%ah_time% | %ah_advancement%
```

Will produce:

```
10:10 | Stone Age
```

(Provided there are 10 minutes and 10 seconds left, and the current advancement is Stone Age)

## Developers

### Maven

Please note that this plugin uses NMS via reflection. This is against my will, and may not be required
after https://github.com/PaperMC/Paper/pull/6175 is merged.

Insert the following snippets into your POM.xml.

For the repository:

```xml

...

github
GitHub Packages
https://maven.pkg.github.com/EnderQuestMC/AdvancementHunt

...

```

For the dependency:

```xml

...

quest.ender
advancementhunt
{version}

...

```

Replace `{version}` with the current version. You can see the current version below. Don't include the "v".

![Current Version](https://img.shields.io/github/v/release/EnderQuestMC/AdvancementHunt)

### Use

You can get the instance of the AdvancementHunt plugin like any other plugin.

```java
final AdvancementHunt plugin = (AdvancementHunt) Bukkit.getServer().getPluginManager().getPlugin("AdvancementHunt");
```

If you want to change the game state, see the `startGame()` or `endGame()` methods of `AdvancementHunt`.

If you only want to listen to events, look at the events `PreGameStateChangeEvent` or `PostGameStateChangeEvent`.