Plugin category: Advanced Mechanics Minecraft version: 1.15.2 Suggested name: NumberValues What I want: Basically, a plugin that does nothing but store values, and possibly execute command if a value is equal to a specific number. Here is an idea of how the config could possibly work, although it doesn't matter to me as long as it has the capabilities. It would also be nice to have a way to check if the value is greater/lower than specified, instead of the exact number. https://imgur.com/ztMc6NM It would be fantastic if there were two different types of values, global values and player values. A player's individual value wouldn't impact any of the global values. At first, a player's file will be empty of any values, but as their values are edited by commands, they will be created in the file. For example, a player's file could start out like this: https://imgur.com/03Oaf3B But after a while of playing, it would look like this: https://imgur.com/2CbNBHK Or all players can be stored in the same file, like this: https://imgur.com/TlQ2qUr Ideas for commands: /value <username or 'global'> <set|add|sub|reset|info> <value name> <number, if applicable> - set would set a number to a specified value, regardless of its current value - add would add a specified amount to the existing value - sub would subtract a specified amount from the existing value - reset would completely reset the value back to the base value, or 0 if none is specified - info would grab the value, and show the player who asked in their chat. Here's an example: https://imgur.com/uzCWb6b Ideas for permissions: Default perms: - value.collect.<specific player value or *> (Without this, the plugin wouldn't store a specific value/any of the player's values, even if requested to. If a player loses this, the plugin will leave their existing file alone, but would not edit it until the permission is regained) Admin perms: - value.edit.set - value.edit.add - value.edit.sub - value.edit.reset - value.info When I'd like it by: No set date
Why can't you use scoreboards? By that, you can store values in armor stand(for server value) or player(for player value) and detect with commands if the value equals/is bigger/is smaller etc.
this isnt too hard to make but i think u can use scoreboard for this like @Eran678 said ^ may i ask what exactly you will be using this for?
@Eran678 That's an interesting idea! I didn't know scoreboards could be used in such a way. I feel like it would be easier to retrieve values and make use of them with a plugin though, because I feel like it would be more flexible. For example, I'd love for it to also have a scoreboard system for each value, and I don't think that could be easily done with a scoreboard. @EpicGodMC I'm planning to use this for all sorts of things, probably too many lol. I'm likely going to use it for a secondary type of currency, tracking voting, and watching over minigame stats. If it can execute commands, I'll probably use it for other things, too!
Alright, i guess i can give this a shot for you, il probably post some questions here later, and please fix your images as i cannot see them
@EpicGodMC That would be fantastic! I tried to use the built-in Bukkit method of inserting images, but I guess that doesn't work. I'll replace them with links in the original post
Hey there @Wpgradford i have finished your request, i will give you a basic explaination on the plugin as for the Commands i have used the command you suggested and laid it out like this "/EpicValues <[PlayerName], [GLOBAL]> <[set], [add], [sub], [reset], info> <[ID]> <[Value]>" ID = Name of the value, remember these are case sensitive The value and id are not needed on every subcommand permissions: INFO "values.command.info.global" - check info of global values "values.command.info.self" - check info of only yourself "values.command.info.<player>" - check info of only a specific player "values.command.info.*" - check info of all players ADD "values.command.add.*" OR "values.command.add.<ID>" SUB "values.command.sub.*" OR "values.command.sub.<ID>" RESET "values.command.reset.*" OR "values.command.reset.<ID>" SET "values.command.set.*" OR "values.command.set.<ID>" COLLECT "values.collect.*" OR "values.collect.<ID>" Note: - When a value cannot be found for example on the "add" command the plugin will automaticaly create it and add the value to it - the plugin does currently not support reloads, if you do reload players will have to rejoin to load their values - the plugin does not save directly into the .yml file it keeps the data in memory untill the player leaves then it will save their values to the file, if the server stops, plugin will save data of remaining players online Configuration i think i have done a fairly good job at commenting my configuration i think u can figure that out Code: pluginPrefix: "&c&lEpicValues &7// &c" messages: provideIdentifier: "Please provide your value name" valueNotFound: "That value could not be found!." pageNotFound: "That page could not be found!" invalidArgLength: "Invalid argument length" noPermissions: "You don't have permission to run this command!." playerNotFound: "The specified player could not be found!." notANumber: "The Value %value% you specified is invalid!" valueReset: "The value %identifier% has been reset to %value% for %player%" valueDecrement: "The value %identifier% has been Decremented to %value% for %player%" valueIncrement: "The value %identifier% has been Incremented to %value% for %player%" valueSet: "The Value %identifier% has been set to %value% for %player%" cmdNotRecognized: "SubCommand not recognized!." error: "Un unexpected error has occurred!." usage: - '&c&n-----------------------------------' - '' - '&6&l/EpicValues &c<&6[username], [GLOBAL]&c> &c<&6[set], [add], [sub], [reset], [info]&c> &c<&6[ValueIdentifier]&c> &c<&6Value&c>' - '' - '&c&n-----------------------------------' ################################## +++++ TRIGGERS +++++ ################################## #Types you can use are: # "=" : Whether the value specified here is equal to the value found # ">" : Whether the value specified here is bigger than the value found # "<": Whether the value specified here is smaller than the value found # ">=" : Whether the value specified here is bigger OR equal to the value found # "<=" : Whether the value specified here is smaller OR equal to the value found # # If no type is found it will default to "=" # # In the player section these variables may be used: # "%player%" : the player's name # "%value%" : the value amount that the player currently has # "%valuechecked%" : the value that was specified here # "%identifier%" : the name of the value # In the global section these variables may be used: # "%value%" : the value # "%valuechecked%" : the value that was specified here # "%identifier%" : the name of the value valueTriggers: #The time in seconds between each time the check whether any values are met will occur checkInterval: 10 player: testIdentifier: value: 100 type: "=" commands: - 'say dis is working' global: testIdentifier: value: 100 type: "=" commands: - 'say dis is working' ###################################################################################################### #Basevalues only work player specific #Speaks for itself, the values MUST be numeric baseValues: identifier: 500 iWillStartAt5: 5 #Configuration of how the info command will display the information valueInfo: header: "&6&lValue Info of %player% &7- &6&lPage %pageNumber%" format: "&c%identifier%: %value%" footer: "&7To view next page, do &c/ev %player% info %nextPageNumber%" i hope this was what you were looking for, If you find any problems, buggs, or features missing you can contact me on bukkit or Github Cheers Source Code Download
@EpicGodMC This is absolutely what I was looking for! Thank you so much, I'll play around with it tonight and get back to you. It looks amazing!