BenCodez / VotingPlugin

Plugin on SpigotMC
Other
83 stars 68 forks source link

Offline vote party issue #444

Closed LogGits closed 5 years ago

LogGits commented 5 years ago

Players are reporting not getting rewards from the vote party. Most of them were offline but i think some were online. Is there something wrong with my setup (i did a test and while im online i get a reward):

VoteParty:
  # Wether or not vote party is enabled
  Enabled: true
  # Number of votes required to give rewards
  VotesRequired: 60
  # Increase the amount of votes required on each vote party reached
  #IncreaseVotesRquired: 10
  # If true, players who did not vote to reach the votes required will 
  # recieve the reward
  GiveAllPlayers: false
  # If true, the vote count will reset each day
  ResetEachDay: false
  # Reset at the end of the month
  ResetMonthly: false
  # Count votes from /av vote?
  CountFakeVotes: true
  # Number of user votes that apply to vote party total the user needs to get rewards
  UserVotesRequired: 3
  # Broadcast when vote party reached
  Broadcast: '[Party] The vote party has been reached. Goto /spawn to use your keys!'
  # List of commands to execute, these only execute once.
  # %player% does not work here
  Commands: []
  # Rewards to give
  Rewards: 
    Commands:
    - cr give to %player% Party 1
    ActionBar:
      Message: 'Thank you for voting, use the keys at /spawn!'
BenCodez commented 5 years ago

Set GiveAllPlayers to true.

On Sat, Nov 10, 2018, 9:52 AM LogGits <notifications@github.com wrote:

Players are reporting not getting rewards from the vote party. Most of them were offline but i think some were online. Is there something wrong with my setup (i did a test and while im online i get a reward):

VoteParty:

Wether or not vote party is enabled

Enabled: true

Number of votes required to give rewards

VotesRequired: 60

Increase the amount of votes required on each vote party reached

IncreaseVotesRquired: 10

If true, players who did not vote to reach the votes required will

recieve the reward

GiveAllPlayers: false

If true, the vote count will reset each day

ResetEachDay: false

Reset at the end of the month

ResetMonthly: false

Count votes from /av vote?

CountFakeVotes: true

Number of user votes that apply to vote party total the user needs to get rewards

UserVotesRequired: 3

Broadcast when vote party reached

Broadcast: '[Party] The vote party has been reached. Goto /spawn to use your keys!'

List of commands to execute, these only execute once.

%player% does not work here

Commands: []

Rewards to give

Rewards: Commands:

  • cr give to %player% Party 1 ActionBar: Message: 'Thank you for voting, use the keys at /spawn!'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Ben12345rocks/VotingPlugin/issues/444, or mute the thread https://github.com/notifications/unsubscribe-auth/AQSIN7DLAIH6vvmOnIAidPXEtNUoz7W2ks5utugVgaJpZM4YYBBR .

LogGits commented 5 years ago

Im trying to have it only for people who have voted regardless of if they are online.

BenCodez commented 5 years ago

It will do that by default. It's probably the UserVotesRequired is where the problem lies.

LogGits commented 5 years ago

Yeah, we use 3 votes to get entered into the vote party.

BenCodez commented 5 years ago

That might be the only thing I can think of.

LogGits commented 5 years ago

Ok can confirm it doesn't trigger for offline players only.

BenCodez commented 5 years ago

Try it with GiveAllPlayers set to true?

On Mon, Nov 12, 2018, 12:39 AM LogGits <notifications@github.com wrote:

Ok can confirm it doesn't trigger for offline players only.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ben12345rocks/VotingPlugin/issues/444#issuecomment-437762765, or mute the thread https://github.com/notifications/unsubscribe-auth/AQSIN0ltsM1j53rbULv7uyjy-kzYGbaMks5uuQmlgaJpZM4YYBBR .

LogGits commented 5 years ago
  # If true, players who did not vote to reach the votes required will 
  # recieve the reward
  GiveAllPlayers: false

This isn't what I'm trying to achieve. I set debug mode to true and this is the result:

[02:21:42] [Craft Scheduler Thread - 1010/INFO]: [VotingPlugin] Debug: Attempting to give <user1> reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 1009/INFO]: [VotingPlugin] Debug: Attempting to give <user2>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 987/INFO]: [VotingPlugin] Debug: Attempting to give <user3>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 989/INFO]: [VotingPlugin] Debug: Attempting to give <user4>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 985/INFO]: [VotingPlugin] Debug: Attempting to give <user5>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 985/INFO]: [VotingPlugin] Debug: Attempting to give <user6>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 1012/INFO]: [VotingPlugin] Debug: Attempting to give <user7>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 989/INFO]: [VotingPlugin] Debug: Attempting to give <user8>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 1013/INFO]: [VotingPlugin] Debug: Attempting to give <user9>  reward VoteParty_Rewards
[02:21:42] [Craft Scheduler Thread - 1013/INFO]: [VotingPlugin] Debug: Executing console command: cr give to <user9> Party 1
[02:21:42] [Craft Scheduler Thread - 1013/INFO]: [VotingPlugin] Debug: Gave <user9> reward VoteParty_Rewards

<user9> was online at the time. Everyone else didn't get the reward. Even when they login. Version: 5.16.1

LogGits commented 5 years ago

user3 logs in (note how there is no mention of VoteParty or even rewards for it):

[02:36:43] [Server thread/INFO]: [ChatControl] * <user3> has entered the overworld.
[02:36:44] [Craft Scheduler Thread - 1049/INFO]: [VotingPlugin] Debug: Attempting to give <user3> reward AllSites
[02:36:44] [Craft Scheduler Thread - 1045/INFO]: [VotingPlugin] Debug: Attempting to give <user3> reward Cumulative_3_Rewards
[02:36:44] [Craft Scheduler Thread - 1049/INFO]: [VotingPlugin] Debug: Executing console command: cr give to <user3> Vote 1
[02:36:44] [Craft Scheduler Thread - 1045/INFO]: [VotingPlugin] Debug: Gave <user3> reward Cumulative_3_Rewards
[02:36:44] [Craft Scheduler Thread - 1049/INFO]: [VotingPlugin] Debug: Gave <user3> reward AllSites
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: PlanetMinecraft_com
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: <user3> voted for the server!
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: MCSL_com
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: <user3> voted for the server!
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: Minecraft-MP_com
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: <user3> voted for the server!
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: Topg_org
[02:36:44] [Craft Scheduler Thread - 1035/INFO]: <user3> voted for the server!
[02:36:44] [Craft Scheduler Thread - 1054/INFO]: [VotingPlugin] Debug: Attempting to give <user3> reward EverySiteReward
[02:36:44] [Craft Scheduler Thread - 1051/INFO]: [VotingPlugin] Debug: Attempting to give <user3> reward EverySiteReward
[02:36:44] [Craft Scheduler Thread - 1050/INFO]: [VotingPlugin] Debug: Attempting to give <user3> reward EverySiteReward
[02:36:44] [Craft Scheduler Thread - 1031/INFO]: [VotingPlugin] Debug: Attempting to give <user3> reward EverySiteReward
[02:36:44] [Craft Scheduler Thread - 1050/INFO]: [VotingPlugin] Debug: Executing console command: give <user3> gold_ore 10
[02:36:44] [Craft Scheduler Thread - 1031/INFO]: [VotingPlugin] Debug: Executing console command: give <user3> gold_ore 10
[02:36:44] [Craft Scheduler Thread - 1031/INFO]: [VotingPlugin] Debug: Gave <user3> reward EverySiteReward
[02:36:44] [Craft Scheduler Thread - 1050/INFO]: [VotingPlugin] Debug: Gave <user3> reward EverySiteReward
[02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give <user3> gold_ore 10
[02:36:44] [Server thread/INFO]: Giving 1 of gold ore to <user3>.
[02:36:44] [Craft Scheduler Thread - 1051/INFO]: [VotingPlugin] Debug: Executing console command: give <user3> gold_ore 10
[02:36:44] [Craft Scheduler Thread - 1054/INFO]: [VotingPlugin] Debug: Executing console command: give <user3> gold_ore 10
[02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give <user3> gold_ore 10
[02:36:44] [Server thread/INFO]: Giving 1 of gold ore to <user3>.
[02:36:44] [Craft Scheduler Thread - 1054/INFO]: [VotingPlugin] Debug: Gave <user3> reward EverySiteReward
[02:36:44] [Craft Scheduler Thread - 1051/INFO]: [VotingPlugin] Debug: Gave <user3> reward EverySiteReward
[02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give <user3> gold_ore 10
[02:36:44] [Server thread/INFO]: Giving 1 of gold ore to <user3>.
[02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give <user3> gold_ore 10
[02:36:44] [Server thread/INFO]: Giving 1 of gold ore to <user3>.
BenCodez commented 5 years ago

It would give everyone who voted atleast 3 times, in theory, if that option was enabled.

On Tue, Nov 13, 2018, 3:19 AM LogGits <notifications@github.com wrote:

logs in:

[02:36:43] [Server thread/INFO]: [ChatControl] * has entered the overworld. [02:36:44] [Craft Scheduler Thread - 1049/INFO]: [VotingPlugin] Debug: Attempting to give reward AllSites [02:36:44] [Craft Scheduler Thread - 1045/INFO]: [VotingPlugin] Debug: Attempting to give reward Cumulative_3_Rewards [02:36:44] [Craft Scheduler Thread - 1049/INFO]: [VotingPlugin] Debug: Executing console command: cr give to Vote 1 [02:36:44] [Craft Scheduler Thread - 1045/INFO]: [VotingPlugin] Debug: Gave reward Cumulative_3_Rewards [02:36:44] [Craft Scheduler Thread - 1049/INFO]: [VotingPlugin] Debug: Gave reward AllSites [02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: PlanetMinecraft_com [02:36:44] [Craft Scheduler Thread - 1035/INFO]: voted for the server! [02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: MCSL_com [02:36:44] [Craft Scheduler Thread - 1035/INFO]: voted for the server! [02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: Minecraft-MP_com [02:36:44] [Craft Scheduler Thread - 1035/INFO]: voted for the server! [02:36:44] [Craft Scheduler Thread - 1035/INFO]: [VotingPlugin] Debug: Giving offline site reward: Topg_org [02:36:44] [Craft Scheduler Thread - 1035/INFO]: voted for the server! [02:36:44] [Craft Scheduler Thread - 1054/INFO]: [VotingPlugin] Debug: Attempting to give reward EverySiteReward [02:36:44] [Craft Scheduler Thread - 1051/INFO]: [VotingPlugin] Debug: Attempting to give reward EverySiteReward [02:36:44] [Craft Scheduler Thread - 1050/INFO]: [VotingPlugin] Debug: Attempting to give reward EverySiteReward [02:36:44] [Craft Scheduler Thread - 1031/INFO]: [VotingPlugin] Debug: Attempting to give reward EverySiteReward [02:36:44] [Craft Scheduler Thread - 1050/INFO]: [VotingPlugin] Debug: Executing console command: give gold_ore 10 [02:36:44] [Craft Scheduler Thread - 1031/INFO]: [VotingPlugin] Debug: Executing console command: give gold_ore 10 [02:36:44] [Craft Scheduler Thread - 1031/INFO]: [VotingPlugin] Debug: Gave reward EverySiteReward [02:36:44] [Craft Scheduler Thread - 1050/INFO]: [VotingPlugin] Debug: Gave reward EverySiteReward [02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give gold_ore 10 [02:36:44] [Server thread/INFO]: Giving 1 of gold ore to . [02:36:44] [Craft Scheduler Thread - 1051/INFO]: [VotingPlugin] Debug: Executing console command: give gold_ore 10 [02:36:44] [Craft Scheduler Thread - 1054/INFO]: [VotingPlugin] Debug: Executing console command: give gold_ore 10 [02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give gold_ore 10 [02:36:44] [Server thread/INFO]: Giving 1 of gold ore to . [02:36:44] [Craft Scheduler Thread - 1054/INFO]: [VotingPlugin] Debug: Gave reward EverySiteReward [02:36:44] [Craft Scheduler Thread - 1051/INFO]: [VotingPlugin] Debug: Gave reward EverySiteReward [02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give gold_ore 10 [02:36:44] [Server thread/INFO]: Giving 1 of gold ore to . [02:36:44] [Server thread/INFO]: CONSOLE issued server command: /give gold_ore 10 [02:36:44] [Server thread/INFO]: Giving 1 of gold ore to .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ben12345rocks/VotingPlugin/issues/444#issuecomment-438176309, or mute the thread https://github.com/notifications/unsubscribe-auth/AQSIN-dYvQcI698OCX7lXZEppj1HiNNxks5uuoCDgaJpZM4YYBBR .

LogGits commented 5 years ago

Yeah we have 4 vote links and the people who tested it voted on all 4. Wait are you talking about GiveAllaplayers? Cause it says # If true, players who did not vote to reach the votes required will. But i dont want to give it to peoplr who havent voted atleast 3 times.

BenCodez commented 5 years ago

Try it with the option enabled

On Tue, Nov 13, 2018, 4:33 AM LogGits <notifications@github.com wrote:

Yeah we have 4 vote links and the people who tested it voted on all 4

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ben12345rocks/VotingPlugin/issues/444#issuecomment-438198216, or mute the thread https://github.com/notifications/unsubscribe-auth/AQSIN8fMYvR0iEp6r6U4DjYix-Z7p2w6ks5uupHLgaJpZM4YYBBR .

LogGits commented 5 years ago

Ok il give it a go in 5 mins :)

LogGits commented 5 years ago

ok tested it. Everyone on the server got a key (only 1 person voted on all links). The player who voted on all links(4) was offline when i triggered the voteparty. When that player logged in, no reward was given.

BenCodez commented 5 years ago

I'll do some testing tonight.

On Tue, Nov 13, 2018, 4:53 AM LogGits <notifications@github.com wrote:

ok tested it. Everyone on the server got a key (only 1 person voted on all links). The player who voted on all links(4) was offline when i triggered the voteparty. When that player logged in, no reward was given.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ben12345rocks/VotingPlugin/issues/444#issuecomment-438204597, or mute the thread https://github.com/notifications/unsubscribe-auth/AQSIN5--CqgrUFJDA92aP5AbV1o15CL_ks5uupaAgaJpZM4YYBBR .

BenCodez commented 5 years ago

http://ben12345rocks.com/job/VotingPlugin/

New option for voteparty:

VoteParty:
  GiveOffline: true
LogGits commented 5 years ago

What happened to old functionality where it would cache playwr info and run command when they join?

BenCodez commented 5 years ago

It got changed, and never got noticed until now.

LogGits commented 5 years ago

Ah ok no problem. Just out of curiosity, does GiveOffline: true store the info and run the command when they are back online? or does it run the command when they are offline? Also, is there a good way to fake trigger a vote party?

BenCodez commented 5 years ago

It will wait. Just do /av vote (player) (site). I might just remove the option, since it doesn't really make sense now that I think of it.

LogGits commented 5 years ago

I think by default, store party info and then when a player joins run it. GiveOffline should run the reward regardless of if the player is online or offline

BenCodez commented 5 years ago

Already changed it: http://ben12345rocks.com/job/VotingPlugin/

LogGits commented 5 years ago

Seems to work great now 👍 Thanks a tonne for your help 🙂