# Head hunting

A player is randomly selected from all players on the server to hide, because a reward has been announced for him. All players will receive hints about where he is after a while, and there will be particles around the victim and TNT on his head. If the player holds out for the specified time, he will receive an even greater reward.

### Commands <a href="#commands" id="commands"></a>

| Description                                                                                                                                          | Command                                                        |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| View mode commands                                                                                                                                   | /headhunt help                                                 |
| Adds an item to your hand as a prize when you win. You need to specify the drop chance. Be sure to change the drop type in the config for this mode. | /headhunt additem <mark style="color:purple;">\<chance></mark> |
| Quick restart                                                                                                                                        | /headhunt trigger                                              |

### Permissions <a href="#permissions" id="permissions"></a>

{% hint style="danger" %}
You **must** use a permission manager like [LuckPerms](https://luckperms.net/download) which supports `.*` permissions notation. Bukkit doesn't support this notation by default!
{% endhint %}

| For what                                         | Permission           |
| ------------------------------------------------ | -------------------- |
| Gives all mode access to the player              | fun.headhunt.\*      |
| Gives the player permission to restart this mode | fun.headhunt.trigger |

### Main config (config.yml)

```yaml
Head hunting enable: true #If "false", this mode will not be available
Head hunting time interval: [600, 3000] #Min and Max values. In this range of time head hunting starts
Head hunting animation: true #Will there be particles around the victim?
Head hunting hat enable: true #Will a block be placed on the victim's head?
Head hunting hat material: 'TNT' #Material that will be placed on the victim's head.
Head hunting messages while searching: true #Will there be hints in the chat while searching for a victim?
Head hunting title enable: true #Will the title be displayed when you win?
Head hunting title fade in time: 10 #In ticks
Head hunting title stay time: 60 #In ticks
Head hunting title fade out time: 10 #In ticks
Head hunting time for hiding: 5 #In minutes. How long will the player be a victim?
Head hunting min server online: 10 #How much online must be on the server for the mode to work
Head hunting the hunt ends immediately when the player leaves: false #If "true", when the victim leaves the server, he will be removed from the hunt. If "false" - he will have a minute to log in
Head hunting fireworks: #Victory animations. You can set 1 and more animations. Or set [] to disable
  - 'SALUT_4'
```

### Mode config (head\_hunting.yml)

```yaml
Head hunting rewards:
  Drop mode: MONEY
  Money reward: 10000.0
  Items reward: [] #Set by command
  Command reward: []
  Drop mode for survivor: MONEY
  Money reward for survivor: 1000.0
  Items reward for survivor: [] #Set by command
  Command reward for survivor: []
```

You can change the type of reward. Just change it in the config above. Here are what they are:

1\) **MONEY** - Gives only money

2\) **ITEM** - Gives only one item with some chance

3\) **ALLITEMS** - Gives all items in list

4\) **COMMAND** - Executes commands. Example:

```
Command reward:
- eco give %player% 1000
- say Cool
```
