VoteRight - Sponge's First Votifier Listener [Discontinued]

If you have an ItemSchema, when it is activated it will give all the items listed in it. By default, A schema is activated when so one votes, if you change the chance of the Schema, it will be activated during a vote, if a chance check succeeds. Meaning that, if you have a schema that has a 50% chance, it will be activated for (approximately) 50% of votes.

Ah so anything at that chance percentage would be given. Got ya. Looks like I will have to wait for a mysterycrates type plugin to be developed then for what I am looking for.

What exactly are you looking for? It’s possible I could implement/create it… I’d suggest creating a thread in plugin requests.

Ah its been suggested a couple different times now.
Basically, taking a list of items, putting them within the voting config and then with a chance rate and giving one item per vote randomly because of that chance percentage.

For anyone wondering, I’ve just finished updating StarAPI for Sponge 4.0.0, and VoteRight should be updated soon. I’ll edit this post with the update when it’s ready.

Edit:
###The Update 4 Sponge (0.0.19)
Changelog:

  • Updated StarAPI and VoteRight to Sponge 4.0.0

Notes:
SpongeVotifier is no longer included in the full download
VoteRight 0.0.19 requires StarAPI 0.0.52 or higher

No matter what I do, even after editing the config when it the server is offline and through commands, the config resets after restarting the server and nothing sticks.

I’ll look into it.

Edit:
Cannot reproduce… I’ve got some questions that should narrow down the problem:

  1. What folder is the config in? (VoteRight and StarAPI’s id changed) (because sponge forced me too)

  2. Are you sure its offline?

  3. Are there any error messages in the console? Could you pastebin a log?

After updating voteright to the 4.0 api along with sponge, etc. the folder name changed to com.gmail.socraticphoenix.sponge.voteright and yes. i would shut down the server, edit, save and reupload and then start the server and it would just reset the config.

###Collection Schemas + (VoteRight 0.0.22)

Changelog:

  • Added some extra options for how to run Collection Schemas
  • Fixed some bugs
  • Bumped version a bunch

Notes:

  • VoteRight 0.0.22 was tested with StarAPI 0.0.55, using a lower version could be problematic
  • Information concerning collection schemas can be found at the end of the page here

So we can’t update our config in game when the server is up? (Or at least I can’t for it resets it to the default config…)

You can update it through commands. The reason the config can’t really be edited while the server is up is because the entire thing is loaded into memory. I’m pretty sure I implemented a reload command, “/vr reload” should allow offline editing, but I’d suggest just doing it offline.

./vr reload resets the config.

Really? I’ll look into fixing that, it shouldn’t.

EDIT:
Yeah, so I guess on the reload command I should actually be reloading the config
An update to fix this should be out soon

Awesome :wink: I think this could replace GAListener lol
Just wondering if this works with Favorlock’s votifier?

I believe it will work with Favor’s listener, so long as his votifier event is the same as the one I use… (Which I think it is)

###Bug Fixes (0.0.23)
This update has been released for a while, but here’s the official update post:

Changelog/Notes:

  • Fixed reload command
  • Scrapped support for SpongeVotifier (though it may still work, depends on model)
  • Should support NuVotifier and Favorlock’s Votifier

The website did not update yet (dependecies page and download link) but thanks for the constant updates and quick replies :smile:

I fixed the website :slight_smile:

how does the percent chance work exactly? I’ve read what’s on the website like 4-5 times and still don’t understand it XD

For example for normal voting I’d like to announce player has voted and received rewards, then execute a command to give them a specific mod item. That I got it, But I also want that each time they vote, they have like a 10% chance to get an extra item, how can this be done in the config?

Well, you’d define a schema for the item:

Type= "Item"
Name= "ItemTest"
Chance= 10
Items= [
    {
        Type= "minecraft:wool"
        Meta= 1
        Amount = 2
        Name= "&cAwesome Wool"
        Lore= [
            "&bUse this wool",
            "&eto win."
        ]
        Enchantments= [
            {
                Type= "minecraft:sharpness"
                Level= @integer:5
            }
        ]
    }
]

And then just add that to the list of schemas to run. The Chance tag applies to the schema as a whole, so in the above schema, there is a %10 chance it will be run (If it’s actually called).

1 Like