VoteRight - Sponge's First Votifier Listener [Discontinued]

###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

Ahh I see, in the auto generated config, it didn’t have the Name= “test” part.
Schemas= {
items= {
Type= “ITEM”
it looked like this ^
So I assumed the italized “items” there is the schema name, no?

Yes, “items” would be the name, but you can always add a new schema:

Schemas={
Items={
}
Items2={
}
}

The Name="test" is only for schemas defined in separate files. I just grabbed the example from the website.

Hmmm for some reason the plugin won’t work when i change schemas.

Voting= {
#The Voting Schemas to activate when a player votes
Schemas= [
“items”,
“announcements”
]

}
OfflineVoting= {
Enabled= true
#The Voting Schemas to save when a known player votes offline. Setting this to ‘null’ or removing it will
#cause the offline vote schemas to be the same as the ones in the voting section.
Schemas= [
“items”,
“announcements”
]
if i change “items” to “commands”, the plugin won’t run. That’s the only one I’ve tested so far

Is there an error message? Can I see the entire config?

Edit: also, are you editing the config or example config?

can’t find the exact error message on the console,
here’s the config, and yes the config not the example config

it still has the items schema, like shown on my previous reply above
if you run it like this, it works. but if you change items to commands, it doesn’t
using the latest versions of both starAPI and voteright, nuvotifier as well

Can I have the server log as well?

Is the server on when you’re editing?

The strange thing is that the comments in the config should be erased on the first save…

You could always try adding schemas through commands…

No it’s not on when I’m editing. I turn it on once I’m done editing.
Editing the config seems easier for me XD but eh yeah I can do that too

this is the log file i believe