Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions VotingPlugin/AdvancedPriority-Rewards.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dateCreated: 2026-02-16T22:48:52.659Z

## Overview

`AdvancedPriority` is an advanced reward-selection system available in **AdvancedCore** and used by plugins like **VotingPlugin**. It allows you to create a list of **sub‑rewards** under a single reward entry. When the reward is processed, the system walks through these sub‑rewards in order and executes the **first** one that meets all of its conditions. Conditions can include permissions, chance percentages and any other reward requirement supported by AdvancedCore. This design makes it easy to offer different rewards based on a player’s rank or luck without creating multiple separate reward files. The documentation emphasises that `AdvancedPriority` checks rewards in order of *rarest* to *most likely* and stops at the first match【436168832069236†L192-L195】.
`AdvancedPriority` is an advanced reward-selection system available in **AdvancedCore** and used by plugins like **VotingPlugin**. It allows you to create a list of **sub‑rewards** under a single reward entry. When the reward is processed, the system walks through these sub‑rewards in order and executes the **first** one that meets all of its conditions. Conditions can include permissions, chance percentages and any other reward requirement supported by AdvancedCore. This design makes it easy to offer different rewards based on a player’s rank or luck without creating multiple separate reward files. The documentation emphasises that `AdvancedPriority` checks rewards in order of *rarest* to *most likely* and stops at the first match.

### How it works

Expand All @@ -21,11 +21,11 @@ dateCreated: 2026-02-16T22:48:52.659Z
3. Assign any requirements to these sub‑rewards (permissions, chance, JavaScript expressions, etc.). If the first sub‑reward fails its requirements, the next one is evaluated. This continues until a sub‑reward succeeds.
4. If none of the sub‑rewards succeed, you can provide a **fallback** reward as the last entry so the player still receives something.

The system lets you structure rewards so that the most exclusive or rare outcome is attempted first, followed by more common ones【436168832069236†L192-L195】. This avoids duplicating reward files and keeps all logic in one place.
The system lets you structure rewards so that the most exclusive or rare outcome is attempted first, followed by more common ones. This avoids duplicating reward files and keeps all logic in one place.

## Permission‑based example

You can use `AdvancedPriority` to give different rewards based on permissions. In the example below, the plugin will check whether the player has `permhere`; if so, it runs **Reward1** and stops. If not, it checks for `permhere2`. If neither permission is present, the normal reward (money) is given【436168832069236†L199-L214】.
You can use `AdvancedPriority` to give different rewards based on permissions. In the example below, the plugin will check whether the player has `permhere`; if so, it runs **Reward1** and stops. If not, it checks for `permhere2`. If neither permission is present, the normal reward (money) is given.

```yaml
Rewards:
Expand All @@ -51,7 +51,7 @@ Use this pattern to offer rank‑specific or permission‑based perks without ne

## Chance‑based example

`AdvancedPriority` also supports probabilistic rewards. You can assign a **chance** (out of 100) to each sub‑reward. The system will evaluate the sub‑rewards in order: if the first one fails its chance roll, the next one is attempted【436168832069236†L218-L231】.
`AdvancedPriority` also supports probabilistic rewards. You can assign a **chance** (out of 100) to each sub‑reward. The system will evaluate the sub‑rewards in order: if the first one fails its chance roll, the next one is attempted.

```yaml
Rewards:
Expand All @@ -73,7 +73,7 @@ In this example, there is a 60 % chance to get the first reward, a 30 % chance

## Item‑based and fallback example

You can also give different items with varying chances. This example demonstrates three tiers: a rare diamond, a common iron ingot and a fallback dirt reward. Each sub‑reward includes its own `Items` section and `Chance`【436168832069236†L233-L252】.
You can also give different items with varying chances. This example demonstrates three tiers: a rare diamond, a common iron ingot and a fallback dirt reward. Each sub‑reward includes its own `Items` section and `Chance`.

```yaml
AdvancedPriority:
Expand All @@ -100,7 +100,7 @@ The player first has a 5 % chance to receive the diamond, then a 50 % chance f

## Rarity tiers example

If you want to weight rewards based on rarity without specifying low percentages manually, you can arrange the sub‑rewards from rarest to most common. The following example shows a **Rarest**, **SecondRarest** and **Fallback** tier【436168832069236†L255-L276】.
If you want to weight rewards based on rarity without specifying low percentages manually, you can arrange the sub‑rewards from rarest to most common. The following example shows a **Rarest**, **SecondRarest** and **Fallback** tier.

```yaml
AdvancedPriority:
Expand Down Expand Up @@ -156,7 +156,7 @@ Rewards:

### Inline configuration example

You may also define `AdvancedPriority` directly within a plugin configuration, such as `VoteSites.yml` in VotingPlugin. The syntax is the same; place `AdvancedPriority` under the `Rewards` section of the site configuration. The following snippet shows a vote site that gives a diamond if the 50 % chance succeeds, then an emerald with a 20 % chance, otherwise a fallback message【436168832069236†L218-L231】.
You may also define `AdvancedPriority` directly within a plugin configuration, such as `VoteSites.yml` in VotingPlugin. The syntax is the same; place `AdvancedPriority` under the `Rewards` section of the site configuration. The following snippet shows a vote site that gives a diamond if the 50 % chance succeeds, then an emerald with a 20 % chance, otherwise a fallback message.

```yaml
VoteSites:
Expand Down Expand Up @@ -190,12 +190,12 @@ VoteSites:

## Best practices

* **Order matters** – always list the rarest or most exclusive rewards first and put common or fallback rewards last【436168832069236†L192-L195】.
* **Order matters** – always list the rarest or most exclusive rewards first and put common or fallback rewards last.
* **Unique names** – ensure each sub‑reward name under `AdvancedPriority` is unique to avoid configuration conflicts.
* **Include a fallback** – adding a fallback reward ensures players always receive something if earlier rewards fail.
* **Combine with requirements** – you can combine chance with other requirements such as permissions, world restrictions or JavaScript expressions. If any requirement fails, the system moves on to the next reward.
* **Use `&` color codes** – when adding messages in reward files, remember to use Minecraft color codes (e.g. `&a` for green) if you want colored text.

## Conclusion

`AdvancedPriority` provides a flexible way to manage complex reward logic within AdvancedCore and associated plugins. By listing sub‑rewards in order, you can create tiered loot tables, rank‑based rewards and fallback strategies without duplicating reward files. Use the examples above as a starting point and adjust the chances, permissions or item lists to fit your server’s needs.
`AdvancedPriority` provides a flexible way to manage complex reward logic within AdvancedCore and associated plugins. By listing sub‑rewards in order, you can create tiered loot tables, rank‑based rewards and fallback strategies without duplicating reward files. Use the examples above as a starting point and adjust the chances, permissions or item lists to fit your server’s needs.
12 changes: 8 additions & 4 deletions VotingPlugin/Bedrock-Player-Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ editor: markdown
dateCreated: 2025-08-30T22:17:57.836Z
---

> Bedrock support generally works most of the time, if you have trouble please contact BenCodez
{.is-info}
# Bedrock Player Support

> Bedrock support generally works most of the time. If you have trouble, please contact BenCodez.
{.is-info}

Bedrock player support is still a work in progress, but can work well if players vote with the prefix.

#### Options on proxy/spigot servers (set the same prefix to all servers)
## Proxy and backend configuration

BedrockPlayerPrefix: '.'
Use the same prefix on the proxy and all backend servers:

```yaml
BedrockPlayerPrefix: '.'
```
19 changes: 12 additions & 7 deletions VotingPlugin/Commands-&-Permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ editor: markdown
dateCreated: 2025-08-30T22:18:03.502Z
---

## Commands and Permissions (From /av perms, use /av perms (player) to see what the specific player has):
# Commands and Permissions

## Generated command reference

Use `/av perms` or `/av perms <player>` to view the permissions available to
the sender or a specific player.

| splits permissions up, meaning it can be either one before/after the |

Expand Down Expand Up @@ -43,7 +48,7 @@ dateCreated: 2025-08-30T22:18:03.502Z
See your last votes
/vote ToggleBroadcast
VotingPlugin.Commands.Vote.ToggleBroadcast|VotingPlugin.Player
Toggle whether or not you will recieve vote broadcasts
Toggle whether or not you will receive vote broadcasts
/vote Next (player)
VotingPlugin.Commands.Vote.Next.Other|VotingPlugin.Mod
See other players next votes
Expand Down Expand Up @@ -208,7 +213,7 @@ dateCreated: 2025-08-30T22:18:03.502Z
List permissions from the plugin the player has
/av Perms (Number) (Player)
VotingPlugin.Commands.AdminVote.Perms.Other|VotingPlugin.Admin
List permissions from the plugin the specificed player has
List permissions from the plugin the specified player has
/av PermsDebug
VotingPlugin.Commands.AdminVote.PermsDebug
Dev permission list, generate this list, requires dev debug
Expand Down Expand Up @@ -349,7 +354,7 @@ dateCreated: 2025-08-30T22:18:03.502Z
Enable extra debug, effective until reload/restart
/av VoteSite (sitename) SetServiceSite (string)
VotingPlugin.Commands.AdminVote.VoteSite.Edit|VotingPlugin.Admin
Set VoteSite SerivceSite
Set VoteSite ServiceSite
/av CheckVoteCoolDownRewards
VotingPlugin.Commands.AdminVote.VoteSite.CheckVoteCoolDownRewards|VotingPlugin.Admin
Force check all vote cooldown rewards
Expand Down Expand Up @@ -610,10 +615,10 @@ dateCreated: 2025-08-30T22:18:03.502Z
Let user pick his choice preferences
/av ConvertToData (UserStorage)
VotingPlugin.Commands.AdminVote.ConvertToData|VotingPlugin.Admin
Convert user storage from current storage type the one specificed
Convert user storage from current storage type to the one specified
/av ConvertFromData (UserStorage)
VotingPlugin.Commands.AdminVote.ConvertFromData|VotingPlugin.Admin
Convert user storage from current storage type from the one specificed
Convert user storage from the specified storage type to the current one
VotingPlugin.Player : Allows basic access player commands
VotingPlugin.Mod : Allows mod commands
VotingPlugin.Admin : Allows admincommands
Expand All @@ -638,4 +643,4 @@ dateCreated: 2025-08-30T22:18:03.502Z
/votingpluginproxy voteparty force - Force a vote party
/votingpluginproxy voteparty setvotecount (number) - Set current vote party votes
/votingpluginproxy multiproxystatus
```
```
4 changes: 3 additions & 1 deletion VotingPlugin/Delayed-reward-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ editor: markdown
dateCreated: 2025-08-30T22:18:07.057Z
---

# Delayed Reward Command

In this example fly will be enabled with /fly and disable with /fly one hour later. Works with any reward

Rewards:
Expand All @@ -22,4 +24,4 @@ In this example fly will be enabled with /fly and disable with /fly one hour lat
Minutes: 0
Seconds: 0
Commands:
- fly %player%
- fly %player%
2 changes: 2 additions & 0 deletions VotingPlugin/File-Layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ editor: markdown
dateCreated: 2025-08-30T22:18:09.653Z
---

# File Layout

> 📁 **Default configurations are available here:**
> [https://github.com/BenCodez/VotingPlugin/tree/master/VotingPlugin/src/main/resources](https://github.com/BenCodez/VotingPlugin/tree/master/VotingPlugin/src/main/resources)
{.is-info}
Expand Down
2 changes: 2 additions & 0 deletions VotingPlugin/Item-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ editor: markdown
dateCreated: 2025-08-30T22:18:13.003Z
---

# Item Configuration

The following item format works throughout the plugin anywhere an item is specified.

Items:
Expand Down
4 changes: 3 additions & 1 deletion VotingPlugin/Minecraft-Server-Lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ editor: markdown
dateCreated: 2025-08-30T22:18:13.937Z
---

# Minecraft Server Lists

This list is a work in progress, but end goal is to contain all websites with their service sites to help simplify setting up.

Want me to add one? Please message me (BenCodez) and I will add it, you also need to specify the service site if you do this.
Expand Down Expand Up @@ -38,4 +40,4 @@ Domain - Service site
* minecraft-serverlist.com - minecraft-serverlist-com
* play-minecraft-servers.com - play-minecraft-servers.com
* minecraftservers.blog - minecraftservers.blog
* top-mcservers.com - TOPMCSERVERS
* top-mcservers.com - TOPMCSERVERS
4 changes: 3 additions & 1 deletion VotingPlugin/Multi-Proxy-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ editor: markdown
dateCreated: 2025-08-30T22:18:15.618Z
---

# Multi-Proxy Setup

> This should only be used if each proxy has different backend servers, otherwise votes will duplicate
{.is-warning}

> Setup each proxy as it's own proxy network for VotingPlugin before setting multi-proxy up, each proxy can use a different proxy method
> Setup each proxy as its own proxy network for VotingPlugin before setting multi-proxy up, each proxy can use a different proxy method
{.is-info}

> Note if using REDIS (Not for multi-proxy method) you will need to set a different redis prefix for each proxy network (This is so that all proxies can use REDIS at the same time without issue)
Expand Down
14 changes: 8 additions & 6 deletions VotingPlugin/Multi-Proxy-Sockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ editor: markdown
dateCreated: 2025-08-30T22:18:16.369Z
---

> Each proxy needs a open port for communication
# Multi-Proxy Sockets

> Each proxy needs an open port for communication
{.is-warning}


> Setup each proxy as it's own proxy network for VotingPlugin before setting multi-proxy up, each proxy can use a different proxy method
> Setup each proxy as its own proxy network for VotingPlugin before setting multi-proxy up, each proxy can use a different proxy method
{.is-info}

> Note if using REDIS (Not for multi-proxy method) you will need to set a different redis prefix for each proxy network (This is so that all proxies can use REDIS at the same time without issue)
Expand All @@ -23,15 +25,15 @@ dateCreated: 2025-08-30T22:18:16.369Z

Additional things required:
- Primary server/main proxy needs to be set as primary server (by enabling option). This server will handle adding totals and such and forward the vote to the other proxies.
- Each sub proxy needs a host/port and needs to be set in the primary proxy under MutliProxyServers.
- Each sub proxy needs a host/port and needs to be set in the primary proxy under MultiProxyServers.
- You also need to have the same secretkey.key file across all proxies (copy/paste from one server after it generates)

Check connection status with /votingpluginbungee multiproxystatus

##########################################
# Multi-proxy setup
# This is still a WIP, use with caution
# Primary server needs votifier and config option enabled
# Primary server needs votifier and config option enabled
# Set socket host on each proxy and primary server set sub proxies
# All servers should be on pluginmessaging or sockets setup
##########################################
Expand All @@ -53,7 +55,7 @@ Check connection status with /votingpluginbungee multiproxystatus
MultiProxyMethod: SOCKET

##########################################
# SOCKET settings for mutli-proxy
# SOCKET settings for multi-proxy
##########################################

# Set this for each proxy
Expand All @@ -66,4 +68,4 @@ Check connection status with /votingpluginbungee multiproxystatus
MultiProxyServers:
secondproxy:
Host: 0.0.0.0
Port: 1235
Port: 1235
2 changes: 1 addition & 1 deletion VotingPlugin/PlaceHolderAPI-placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ Some placeholders take a dynamic segment:

> 🧠 **Performance tip:**
> Use caching (`AUTO` or `SPECIFIC`) for placeholders displayed frequently (like scoreboards).
> The `_process` or `_nocache` suffixes should only be used on async operations.
> The `_process` or `_nocache` suffixes should only be used on async operations.
2 changes: 1 addition & 1 deletion VotingPlugin/Proxy-Setups.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ The proxy receives and manages votes from Votifier before forwarding them to bac
---

*For a deeper technical breakdown, see the implementation in
[`VotingPluginProxy.java`](https://github.com/BenCodez/VotingPlugin/blob/master/VotingPlugin/src/main/java/com/bencodez/votingplugin/proxy/VotingPluginProxy.java).*
[`VotingPluginProxy.java`](https://github.com/BenCodez/VotingPlugin/blob/master/VotingPlugin/src/main/java/com/bencodez/votingplugin/proxy/VotingPluginProxy.java).*
12 changes: 7 additions & 5 deletions VotingPlugin/Reward-Examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ editor: markdown
dateCreated: 2025-08-30T22:18:21.108Z
---

# Reward Examples

The following is from ExampleBasic and ExampleAdvanced reward files.

# This is a reward file
# Define rewards in here (Items, commands, etc)
# File name is the reward name, without file extention
# File name is the reward name, without file extension
# This reward is named "ExampleBasic"
# That is what you put as a reward for other plugins, like VotingPlugin
# DO NOT HAVE DUPLICATE NAMES!!
Expand All @@ -25,7 +27,7 @@ The following is from ExampleBasic and ExampleAdvanced reward files.
# Below are some basic things you can have, see the advanced example for more

# You can just remove values you don't want (just delete it)
# If you just want money just have a reward file containg only "Money: 100", for example
# If you just want money just have a reward file containing only "Money: 100", for example
# You can simply copy and paste from here what you want
# in other reward files, that is the way they are designed

Expand Down Expand Up @@ -165,7 +167,7 @@ The following is from ExampleBasic and ExampleAdvanced reward files.

# This is a reward file
# Define rewards in here (Items, commands, etc)
# File name is the reward name, without file extention
# File name is the reward name, without file extension
# This reward is named "ExampleAdvanced"
# That is what you put as a reward for other plugins, like VotingPlugin
# DO NOT HAVE DUPLICATE NAMES!!
Expand All @@ -174,7 +176,7 @@ The following is from ExampleBasic and ExampleAdvanced reward files.
# https://github.com/BenCodez/AdvancedCore/wiki/Reward-files

# You can just remove values you don't want (just delete it)
# If you just want money just have a reward file containg only "Money: 100", for example
# If you just want money just have a reward file containing only "Money: 100", for example
# Don't use this file as a reward, example only

# This is the advanced example, if you only want an item or command then look
Expand Down Expand Up @@ -561,4 +563,4 @@ The following is from ExampleBasic and ExampleAdvanced reward files.
# Will execute for every player online at time of execution
RepeatOnStartup: false
# If any reward requirement fails to pass, the reward will stop repeating
AutoStop: truee
AutoStop: truee
6 changes: 4 additions & 2 deletions VotingPlugin/Reward-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ editor: markdown
dateCreated: 2025-08-30T22:18:22.178Z
---

# Reward Files

![](http://i.imgur.com/hKOAj4Z.png)

Reward files is how player gets reward. They can be given on voting, or via Rewards.yml (First vote, all sites, Number of votes)

Requirements to give reward possiblities:
Requirements to give reward possibilities:
- Permission
- World
- Chance
Expand All @@ -36,4 +38,4 @@ Advanced:

See [ExampleReward](https://github.com/Ben12345rocks/AdvancedCore/blob/master/AdvancedCore/Rewards/ExampleReward.yml) for examples on the above!

[Examples](https://gist.github.com/Ben12345rocks/c913ba94878327c1a5bad69dd0c6de85)
[Examples](https://gist.github.com/Ben12345rocks/c913ba94878327c1a5bad69dd0c6de85)
Loading