BenCodez / VotingPlugin

Plugin on SpigotMC
Other
84 stars 69 forks source link

Trying to make the reward for voting 5 diamonds for each link. #844

Closed MarioMax05 closed 4 years ago

MarioMax05 commented 4 years ago

This is my code, I am looking to make it give the player 5 diamonds every time they vote for each site. I'm kinda new to this, thanks for anyone willing to help :)

VoteSites:

VoteSite key

Used for saving data for votesites

Use a short name if you can

ExampleVoteSite:

Enable voteSite

# If false, votesite will not be loaded by plugin
# Default: true
Enabled: true

# Display name of voting site
Name: 'PlanetMinecraft'

# Priority of this site
# Used for sorted list
# High prority, higher on the list
Priority: 5

# The serviceName from the vote, has to be correct to work correctly
# Gotten from voting on the site (will be in console/log)
# Usually is the main part of the url(e.g. PlanetMinecraft.com), but not always
# See console when you vote (it will notify you if the plugin didn't find a votingsite matching the service site
ServiceSite: 'PlanetMinecraft.com'

# vote url for /vote
# Format for this can be set in Format.yml
# Do not include colors here
# If you need to force a url set the url as this:
# VoteURL: '[Text="https://www.planetminecraft.com/server/pepsi-land-anarchy/vote",url="URLHERE"]'
VoteURL: 'https://www.planetminecraft.com/server/pepsi-land-anarchy/vote'

# Time between votes in hours (used for /vote next)
# Most sites are 24 hours
VoteDelay: 24

# Use to have a minute votedelay
#VoteDelayMin: 30

# Require waiting until votedelay time has pasted in order to accept vote
# Recommend: false
WaitUntilVoteDelay: false

# Reset vote delay each day (for certain sites that do this)
# Recommend: false
VoteDelayDaily: false

# If true, rewards can be executed offline (requires ForceOffline to be true in the reward)
# Setting this to true will execute the reward offline while the player is offline
# This basiclly disables offline voting if set to true, don't misinterpret this option
ForceOffline: false

# VoteSite Material for some GUI's
# Removing this may result in an error, required on each site
Item:
  Material: 'DIAMOND'
  Amount: 1

# Rewards to give
# https://github.com/Ben12345rocks/AdvancedCore/wiki/Rewards
Rewards:
  # Execute console commands
  Commands:
  - 'say hello'
  # Send player a message
  Messages:
    Player: 'Thank you for voting!'

Site 2 example

Site2: Enabled: true Name: 'MC-Server-List' ServiceSite: 'minecraft-server-list.com' VoteURL: 'https://minecraft-server-list.com/server/462178/vote/' VoteDelay: 24 Item: Material: 'DIAMOND' Amount: 1 Rewards: Commands:

BenCodez commented 4 years ago

Pastebin that.

MarioMax05 commented 4 years ago

https://pastebin.com/kY7mP3RW

here you go, sorry about that

BenCodez commented 4 years ago
Rewards:
  Items:
    Diamond:
      Material: 'DIAMOND'
      Amount: 5

Something like that should work.

MarioMax05 commented 4 years ago

I'll give it a shot, thanks :)

MarioMax05 commented 4 years ago

Hey, it's not working. This is what I did: https://pastebin.com/MMej4RSJ

BenCodez commented 4 years ago

https://pastebin.com/gbTMRYyv

MarioMax05 commented 4 years ago

Sorry for the late response, this is what I have and I'm still having trouble. Sorry that I keep asking for help..

MarioMax05 commented 4 years ago

https://pastebin.com/0dKNn5WA

BenCodez commented 4 years ago

Does the server get the vote? Check console on a vote. Does it work with /av vote?

MarioMax05 commented 4 years ago

It shows that someone made the command to vote, but doesn't know they voted.

BenCodez commented 4 years ago

Then your issue is with votifier right now.

MarioMax05 commented 4 years ago

Do you have an idea of what I could do to fix it?

BenCodez commented 4 years ago

https://mctools.org/votifier-tester

Try new host/port?

MarioMax05 commented 4 years ago

Apparently I didn't have votifier at all. I will get back to you when I get it up and working.

MarioMax05 commented 4 years ago

I have it installed and put on the right port, but do I put the public key in VotingPlugin? I also did the test and it went through

BenCodez commented 4 years ago

No, just the vote sites.

MarioMax05 commented 4 years ago

Oh, what about the host in the config menu, anything go there?

BenCodez commented 4 years ago

That's for a bungee setup, don't use that unless you plan to for the first setup here: https://github.com/Ben12345rocks/VotingPlugin/wiki/Bungeecoord-Setups

MarioMax05 commented 4 years ago

Just got it working. Thank you!!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.