VoteRight - Sponge's First Votifier Listener [Discontinued]

welp I messed something up… I’ll look into it.

##I’m Over It!
VoteRight, in the state it’s in, is clearly unusable and broken. Too many patches and quick-fixes have gone into it. Moreover, it’s the next-to-last day of my april vacation and I’ve still done nothing to improve it. I’ve decided to do a complete rewrite of VoteRight, and I’m going to try and maintain backwards compatibility. This does however mean the VoteRight may not recieve an update for a while - I’m trying to design an architecture which will allow me to easily and quickly bug fix or add new features if they’re required, and this may take some time. Hopefully VoteRight 2.0 will exist within a month or two.

Regards,
Socratic_Phoenix

1 Like

Ughhh that’s sad to hear but at the same time nice, in a way. Well, looking forward to 2.0. :wink:

I’m slightly confused on this. I have somewhat of an understanding but I need to know; and maybe you can help me better understand, or someone might. So what I’m wanting to do is create Vote Milestones where when they reach 5 votes they get a reward 15 votes another reward 25votes another etc etc.

I’m thinking that would fall under this:
Counting= {
Enabled= true
Triggers= [
{
Type= “PLAYER_ALL”
Count= 25
Schemas= [
“randomshiny”
]

    }
]

}

somehow but I’m not sure how to go about doing the other milestone markers. Once they reach say 100 votes I want it to reset their votecount back to 0 also.

As of right now, that’s not possible. I’ll try and add it to the next version.

ah; darn :confused: well that is a bummer. how would you go about adding the milestones? like this?

Counting= {
Enabled= true
Triggers= [
{
Type= “PLAYER_ALL”
Count= 5
Schemas= [
“randomshiny”
]

}
   {
        Type= "PLAYER_ALL"
        Count= 10
        Schemas= [
            "randomshiny"
        ]

}

]

}

??

Yes, but your missing a comma:

Counting= {
Enabled= true
Triggers= [
{
Type= "PLAYER_ALL"
Count= 5
Schemas= [
"randomshiny"
]
},
   {
        Type= "PLAYER_ALL"
        Count= 10
        Schemas= [
            "randomshiny"
        ]

}
]

}

###Quick Status Update:
The architecture is nearly complete. Now I have to implement commands, command help, and the handlers for schemas. That will take a few weekends, so unless I screw something up, I’m projecting a 2.0 release around June 1st.

so on the actual schemas would it be something like this?

randomshiny= {
    Type= "COMMAND"
    Commands= [
        {
            Command= "pokerandom %player% s"
            Executor= "CONSOLE"
        }
    ]

}

based on the counting milestone above?

also if the above statement is a yes; are you certain you couldnt do something like this for reseting the players votes?

votereset= {
    Type= "COMMAND"
    Commands= [
        {
            Command= "voteright count set %player% 0"
            Executor= "CONSOLE"
        }
    ]

}

or something?


Here is my config file. It just keeps reseting to default when i reload… Not sure what I’m doing wrong. threw this and the default config into a parser and got errors so I’m not sure what to actually fix. >.<

Resetting the votes would work (although I don’t think the command you have will run. I pretty sure you need to specify whether your setting online or offline votes).

This stupid reset to default bug has been going on forever. I thought I fixed it, but I guess not. If there are any errors (most importantly JLSCExceptions), then the parsing may have failed, but otherwise its a huge bug that won’t go away.

2.0 will be here eventually…

yeah. idk if i’m doing it right or not. like even the default config of the plugin throws a invalid player error.
All i need right now is a vote listener that can do milestone voting 25,50, 75, 100 that is it.

Why i having this error?

[21:55:32] [Server thread/ERROR] [StarAPI/com.gmail.socraticphoenix.sponge.star]: Config could not be loaded!
java.lang.NullPointerException
	at com.gmail.socraticphoenix.sponge.star.plugin.StarPlugin.initializeConfig(StarPlugin.java:337) ~[StarPlugin.class:?]
	at com.gmail.socraticphoenix.sponge.star.plugin.StarPlugin.initialize(StarPlugin.java:115) [StarPlugin.class:?]
	at com.gmail.socraticphoenix.sponge.star.StarMain.onConstruction(StarMain.java:134) [StarMain.class:?]
	at com.gmail.socraticphoenix.sponge.star.plugin.StarPlugin.<init>(StarPlugin.java:96) [StarPlugin.class:?]
	at com.gmail.socraticphoenix.sponge.star.StarMain.<init>(StarMain.java:101) [StarMain.class:?]
	at com.gmail.socraticphoenix.sponge.star.StarMain$$FastClassByGuice$$d0f69507.newInstance(<generated>) [$ReflectUtils.class:?]
	at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) [$FastConstructor.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) [DefaultConstructionProxyFactory$1.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105) [ConstructorInjector.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85) [ConstructorInjector.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267) [ConstructorBindingImpl$Factory.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) [ProviderToInternalFactoryAdapter$1.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103) [InjectorImpl.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) [ProviderToInternalFactoryAdapter.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) [SingletonScope$1.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) [InternalFactoryToProviderAdapter.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016) [InjectorImpl$2$1.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) [InjectorImpl.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) [InjectorImpl$2.class:1.8.9-1808-4.1.0-BETA-1276]
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051) [InjectorImpl.class:1.8.9-1808-4.1.0-BETA-1276]
	at org.spongepowered.mod.plugin.SpongeModPluginContainer.constructMod(SpongeModPluginContainer.java:295) [SpongeModPluginContainer.class:1.8.9-1808-4.1.0-BETA-1276]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74]
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.8.9.jar:?]
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189) [LoadController.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74]
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) [minecraft_server.1.8.9.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:275) [minecraft_server.1.8.9.jar:?]
	at net.minecraftforge.fml.common.LoadController.redirect$onPost$0(LoadController.java:53) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:512) [Loader.class:?]
	at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:87) [FMLServerHandler.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:320) [FMLCommonHandler.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:112) [ko.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:441) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_74]

Using StartApi 0.0.66 and VoteRight 0.0.24

@FabioZumbi12
Can I see the whole log?

Excluded FML start logs: http://hastebin.com/rebahawuco.vhdl

And can you add the command “/votetop” as alias to “/vote count view” or to we see the top voters, like top 10… or similar?

@FabioZumbi12
I don’t have access to the StarAPI 0.0.66 code, it’s been updated since then. I’m not sure what’s causing the issue, but VoteRight is currently being rewritten. Moreover, I have a final tomorrow… I also have a separate coding project for school, and lots of homework. I’m sorry I can’t currently uphold this project, but I should be able to return to it next week.

1 Like

I ask because VoteRight have the same problen when load the configuration. But thats OK, i wait you release another version ^^

#VoteRight 1.0.0 Pre-Release
I’m putting this here to prove I have been working on VoteRight… :slight_smile:

Changelog

  • Decided on 1.0.0 instead of 2.0
  • Now using semantic versioning (like sponge’s versioning) in both Star and VoteRight
  • Re-wrote VoteRight from the bottom up to be more expandable and efficient
  • Re-wrote the command system in Star
  • Configuration files now accept most of HOCON’s syntax, and all of JSON’s. Therefore, if you’re having trouble with the config, try making it a JSON and checking it here.
  • Moved all schemas to a single, seperate file
  • Deleted all schema types
  • Made everything case-sensitive
    • Most keys in the config and schemas start with an uppercase and are lowercase for the rest of the word
    • Any key called “Type” will have a fully uppercase value
  • Implemented CommandSchema
  • Moved VoteCount and other data to the data.cjlsc file (I’ll be providing a viewer for this file at some point)
  • Removed mapped command syntax from star (I doubt anyone even knew this was a feature)
  • Expanded and re-implemented conversations in Star
  • Advanced help system now available, type “/vr help” to get started
  • Removed all commands
  • Added /voteright main command
  • Added /votetop command
  • Offline voting now works even if the player hasn’t joined the server

Migrating:
Currently only CommandSchemas are implemented, which technically make “anything” possible, but for now don’t try to migrate. VoteRight 1.0.0 generates a different configuration directory, so it won’t overwrite any of your old files. I’ll be providing a /migrate command in the full release.

Planned Features

  • Implement the remaining schemas (Item, Announcement, Collection, Money)
  • Implement the remaining commands (VoteCount view, edit, remove, add)
  • Add /migrate command
  • Implement VoteTriggers
  • Update the website
  • Move to Ore
  • Release StarAPI (eventually)

Some Notes:

  • Some configuration details have changed, the website does not (yet) accurately document this version
  • Default configuration files are generated, so if you’d like to start configuring, go ahead.
  • Feel free to ask any questions here

Downloads

####To-Do List
This list is mainly for me to track development progress, and for you all to check how development is going.

Strikeout = finished
Strikeout + Italicized = decided against implementing

  • Schemas

  • Command

  • Announcement

  • Collection

  • Money

  • Collection

  • Item

  • Triggers

  •   TOTAL_ONLINE,
    
  •   TOTAL_OFFLINE,
    
  •   TOTAL_ALL,
    
  •   PLAYER_ONLINE,
    
  •   PLAYER_OFFLINE,
    
  •   PLAYER_ALL,
    
  •   TOTAL_ONLINE_INCREMENT,
    
  •   TOTAL_OFFLINE_INCREMENT,
    
  •   TOTAL_ALL_INCREMENT,
    
  •   PLAYER_ONLINE_INCREMENT,
    
  •   PLAYER_OFFLINE_INCREMENT,
    
  •   PLAYER_ALL_INCREMENT</s>All triggers are now implemented (not released yet)
    
  • Commands

  • Help

  • Vote

  • VoteTop

  • Simulate

  • Online, Offline

  • Trigger add, trigger remove, trigger edit

  • Schema add, schema remove, schema edit

  • VoteCount view, VoteCount set

  • Migrate

  • Website

  • Delete, move to Ore

  • Ore

  • Command list

  • Config basics

  • Schema tutorials

  • Trigger tutorialsI’ve decided to wait until Ore is in at least Beta, and has ironed out some of its bugs.

  • StarAPI

  • Release on Ore See above. I’ll try and release Star on the forums

  • Basic feature list

UPDATE:
Everything but the Migrate command and documentation is fully completed. The current version is published as 1.0.0-pre2, and it requires star api 1.5.9. The final release should come next weekend, with the migrate command and documentation.

It’s nice to see the plugin back on progress again. Would like to add this back as soon as it’s on a stable enough stage :smiley:

#Status Update - 1.0.0
It’s done! The final release should be out tomorrow once I get documentation wrapped up and iron out all the bugs. Most user probably won’t see a huge difference, but VoteRight now has a developer API and utilizes Star even more than it used to. Performance should be improved, and configurations are now handled much better in the code.

####For the Techies
VoteRight used to work by creating a Java object for every Schema registered. This made it incredibly difficult to reload, as each object had to be re-created every time. VoteRight now uses a system linked directly to the configuration file. It works by verifying the format of the configuration file, and then calling the appropriate Schema handler when the schema needs to be run. These Schema handlers are registered in a registry, so any developer can register a Schema. The edit commands for the Schemas will be created automatically by VoteRight (so long as the Schemas are registered during pre-initialization).