GithubHelp home page GithubHelp logo

darbyjack / voteparty Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 11.0 5.75 MB

Give rewards to all online players when the server gets a certain amount of votes! 1.8+

Home Page: https://wiki.helpch.at/glares-plugins/voteparty

License: MIT License

Java 0.81% Kotlin 99.19%
hacktoberfest

voteparty's Introduction

Welcome to VoteParty ๐Ÿ‘‹

Version Documentation License: MIT

Give rewards to all online players when the server gets a certain amount of votes! 1.8+

Author

๐Ÿ‘ค Glare

Get Help

Discord

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2021 darbyjack.
This project is MIT licensed.

voteparty's People

Contributors

blitzoffline avatar darbyjack avatar renovate[bot] avatar sxtanna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

voteparty's Issues

Feature request

Spigot name: xdLulux
Version : 1.16.5
Plugin version : 2.26

I was wondering if you could add a placeholder where it will tell you when you can vote again and a config where it will send a message / command to the user every time he can vote

[Feature Request] Allow Receiving Cumulative Vote Rewards While Offline

The check cumulative functions (checkDailyCumulative, checkWeeklyCumulative, etc.) in

fun checkDailyCumulative(player: Player)
are only called when a player is online due to this check
val online = player.player ?: return

Since the cumulative checks only see if the player has exactly the correct amount of votes, players do not receive cumulative rewards if they were offline for the last vote. This could be fixed in one of two ways:

  1. Keep track of the cumulative rewards a player did receive and change the cumulative check to check for greater than or equal to the required amount of votes.
  2. Add cumulative rewards to a player's claimable, redeeming them when the player next joins (as shown in this commit ParallelMC@084d78f. This exact solution isn't clean, but it may end up being less data to track).

Player name placeholder confusion

I am using VoteParty to give out VoteKeys when my server reaches 50 votes. Currently, it is not doing that.
command: crate givekey %player_name% voting 1
That is the command I am using and my console gives this message
image
I don't know what to do here

Improvement proposal

Hi, I have a suggestion for the plugin ! :)

My team and me had an idea.
Add a Placeholder option that lets you know how many times the VoteParty has been triggered during the day.
Do you think this is a good idea?

Add a "/vp addvote <player> [date]" command

I've seen some people suggest the addition of a command that adds a vote/votes to a player without giving the rewards.

Currently if someone wants to add votes with the rewards they can easily use NuVotifier's /testvote command but it is very hard if not impossible to just add votes to a player without triggering the rewards. I am thinking just user.votes += current.time (or if a date is provided, possibly using SimpleDateFormat then convert it to a timestamp and add that). No vote event calling or anything like that.

This could be pretty useful in some debug and testing situations. Could help test leaderboards without having to need players online, and it could also allow admins to set their vote counter to 69420 to impose their dominance over other players :))

Configuration Issue

Configuration seems to lose track of data after being reloaded. (/vp reload)

exception from placeholder resolution of votes needed.

> [16:00:29 WARN]: me.clip.voteparty.libs.configme.exception.ConfigMeException: No value exists for property with path 'party.votes_needed'. This may happen if the property belongs to a SettingsHolder class which was not passed to the settings manager.
> [16:00:29 WARN]: at me.clip.voteparty.libs.configme.SettingsManagerImpl.getProperty(SettingsManagerImpl.java:57)
> [16:00:29 WARN]: at me.clip.voteparty.placeholders.VotePartyPlaceholders.onRequest(VotePartyPlaceholders.kt:37)
> [16:00:29 WARN]: at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:375)
> [16:00:29 WARN]: at io.puharesource.mc.titlemanager.placeholder.PlaceholderAPIHook.replacePlaceholders(Hooks.kt:17)
> [16:00:29 WARN]: at io.puharesource.mc.titlemanager.APIProvider.setScoreboardValueWithPlaceholders(APIProvider.kt:605)
> [16:00:29 WARN]: at io.puharesource.mc.titlemanager.TitleManagerPlugin.setScoreboardValueWithPlaceholders(TitleManagerPlugin.kt)
> [16:00:29 WARN]: at io.puharesource.mc.titlemanager.extensions.PlayerExtensionsKt.setScoreboardValue(PlayerExtensions.kt:169)
> [16:00:29 WARN]: at io.puharesource.mc.titlemanager.APIProvider$toScoreboardValueAnimation$4.invoke(APIProvider.kt:46)
> [16:00:29 WARN]: at io.puharesource.mc.titlemanager.animations.PartBasedSendableAnimation$update$2.invoke(PartBasedSendableAnimation.kt:11)
> [16:00:29 WARN]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [16:00:29 WARN]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> [16:00:29 WARN]: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> [16:00:29 WARN]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

/vote command

Create a /vote command for people to get links to the voting places.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gradle.yml
  • actions/checkout v4
  • actions/setup-java v4
gradle
settings.gradle
build.gradle
  • org.jetbrains.kotlin.jvm 1.9.23
  • com.github.johnrengelman.shadow 8.1.1
  • com.github.ben-manes.versions 0.51.0
  • net.kyori.indra 3.1.3
  • net.kyori.indra.publishing 3.1.3
  • org.spigotmc:spigot-api 1.20.4-R0.1-SNAPSHOT
  • ch.jalu:configme 1.3.0
  • me.clip:placeholderapi 2.11.5
  • co.aikar:acf-paper 0.5.1-SNAPSHOT
  • com.github.cryptomorin:XSeries 9.9.0
  • org.bstats:bstats-bukkit 3.0.2
  • net.kyori:adventure-platform-bukkit 4.3.2
  • net.kyori:adventure-api 4.16.0
  • net.kyori:adventure-text-minimessage 4.16.0
version/build.gradle
  • org.spigotmc:spigot-api 1.20.4-R0.1-SNAPSHOT
version_new/build.gradle
  • org.spigotmc:spigot-api 1.20.4-R0.1-SNAPSHOT
version_old/build.gradle
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.6

  • Check this box to trigger a request for Renovate to run again on this repository

[Feature Request] Folia support

Since NuVotifier (a fork) and many more plugins supports folia I was looking into having this plugin supporting folia if it was possible ?

Add a way to see the top players from last month

Add a way to see how the leaderboards ended last month. Currently VP automatically updates (or rather every 2 minutes) when the month ends so server owners can't see who ended up being the top voters last month. Since VoteParty already has all this data, it would be nice if it displayed it. All it needs is a bit of processing :).

A lot of people have asked for this feature in the discord channel.

FEATURE REQUEST: Adding a time limit to the vote party.

Having a configuration like

days-to-achieve-party: 30
vote-required: 2000

If the server gets 2000 votes in 30 days trigger a vote party, Giving people incentives to vote regularly instead of waiting for regular voters to just reach the total.

VoteParty hook into PlaceholderAPI causing an error.

While having the VoteParty plugin installed, PlaceHolderAPI is sending an error everytime I attempt to reload it with ./papi reload. Here is the full error.

>.... [21:07:09 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'papi' in plugin PlaceholderAPI v2.10.5
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.15.2.jar:git-Paper-176]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.15.2.jar:git-Paper-176]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:752) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1825) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1633) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1058) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1051) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1021) ~[patched_1.15.2.jar:git-Paper-176]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:944) ~[patched_1.15.2.jar:git-Paper-176]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.NoClassDefFoundError: me/clip/voteparty/VoteParty
at com.gianscode.placeholderexpantion.voteparty.VotePartyExpantion.register(VotePartyExpantion.java:17) ~[?:?]
at me.clip.placeholderapi.expansion.ExpansionManager.registerExpansion(ExpansionManager.java:114) ~[?:?]
at me.clip.placeholderapi.expansion.ExpansionManager.registerAllExpansions(ExpansionManager.java:173) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPIPlugin.reloadConf(PlaceholderAPIPlugin.java:186) ~[?:?]
at me.clip.placeholderapi.commands.PlaceholderAPICommands.onCommand(PlaceholderAPICommands.java:263) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.15.2.jar:git-Paper-176]
... 17 more
Caused by: java.lang.ClassNotFoundException: me.clip.voteparty.VoteParty
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_242]
at java.lang.ClassLoader.loadClass(ClassLoader.java:419) ~[?:1.8.0_242]
at java.lang.ClassLoader.loadClass(ClassLoader.java:352) ~[?:1.8.0_242]
at com.gianscode.placeholderexpantion.voteparty.VotePartyExpantion.register(VotePartyExpantion.java:17) ~[?:?]
at me.clip.placeholderapi.expansion.ExpansionManager.registerExpansion(ExpansionManager.java:114) ~[?:?]
at me.clip.placeholderapi.expansion.ExpansionManager.registerAllExpansions(ExpansionManager.java:173) ~[?:?]
at me.clip.placeholderapi.PlaceholderAPIPlugin.reloadConf(PlaceholderAPIPlugin.java:186) ~[?:?]
at me.clip.placeholderapi.commands.PlaceholderAPICommands.onCommand(PlaceholderAPICommands.java:263) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.15.2.jar:git-Paper-176]
... 17 more

Players with a full inventory do not receive cumulative rewards

Just as the title says, if a player's inventory is full when they are supposed to receive a cumulative reward. This is due to VotesListener#onReceive returning if the player's inventory is full

return sendMessage(party.manager().getCommandIssuer(online), Messages.VOTES__INVENTORY_FULL)

while the only place the cumulative handlers are called is in this function. Though the cumulative handlers will be called during the next vote, they will not trigger rewards since they require exact values.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.