Hello there. Welcome (back) to PlaytimeRewards!
This Plugin is a continuation of my "older" PlaytimeRewards.
This Version is a new completely recoded one, which works with less Bugs and uses less Performance.
What does this Plugin?
- This Plugin counts the Playtime for every of your Players and Rewards them when you want it.
How does it Rewards the Players?
- You can choose! You can customize the Rewards as you want, from a simple 1 Hour played to an Daily Login after 30 Minutes of playing in one Session! There are nearly no Limits.
What can the Players obtain?
- Again, you can choose it. For now it supports Console and Player Commands upon receiving the Reward. Later - out of the Beta it´ll also support Particles, Sounds and Items (altough nothing you couldn´t do with Commands).
/pt or /playtime
Permission: timerewards.seetime
Allows you to see your own Playtime
/pt <player> or /playtime <player>
Permission: timerewards.seetime.others
Allows you to see the Playtime of other Players
/playtimetop or /pttop
Permission: timerewards.seetop
Allows you to see the Players with the highest Playtime
This Command isn´t avaible in the Beta.
/pr reload or /PlaytimeRewards reload
Permission: timerewards.reload
Allows you to reload the config.yml and rewards.yml
/pr giveReward <RewardName> [Player]
Permission: timerewards.giveRewards
Allows the Player to give Rewards (ignoring permissions, needed playtime).
/pr editItem <RewardName>
Permission: timerewards.editItem
Allows the Player to modify the Reward Item for the specified Reward.
This Command isn´t avaible in the Beta.
/pr listRewards
Permission: timerewards.listRewards
Allows the Player to list all created Rewards.
/pr seeRewards [Player]
Permission: timerewards.seeRewards || timerewards.seeRewardsOthers
Displays all earned Rewards from the specified Player.
This Command isn´t avaible in the Beta.
/pr setTime <Player> <TimeInSeconds> <TimeType>
Permission: timerewards.setTime
Allows the Player to Change Play-, Session- and AfkTime.
This Command isn´t avaible in the Beta.
timerewards.* grants all Permissions from this Plugin.
Configuration! This is a big Part of the Plugin, as nearly everything is customizable. Let´s start off with the default config.yml:
Spoiler: Config.yml
Code (YAML):
#Config for PlaytimeRewards
#PlaytimeRewards by ExoBiTe @https://www.spigotmc.org/resources/60266/
#Main Configuration
Main :
#Define your color-char here. Use it in the rewards.yml
ColorChar : '&'
#Enable or disable mysql here. If enabled, make sure to insert your mysql-data below.
MySQL : false
#Do you just want to see Player´s playtime and AfkTime without Rewarding? Set this to true
#It will completely disable the Rewarding System, resulting in using less Performance.
DisableRewards : false
#Set the delay between the automatic save-intervals. Set to 0 to disable auto-saving (not recommended!).
#As this Plugin only writes and reads data form files/mysql upon play login and quit, there may be a chance to data-loss
#when the server crashes. Auto-Save writes all data every interval to files/mysql. This prevents data-loss.
DataSaveInterval : 1800 #Seconds
#You want to get always the Build of the Plugin? Simply set this to true.
#Enable SearchBeta to always get the latest Build.
#searchUpdates needs to be true!
AutoUpdate : true
#Defines when a newer Version get´s recognized as newer. It only compares the Version until the named Part. The Versions Parts are
#Major.Minor.Snapshot.B1.B2 so for example v2.9.3.0.1 .
WhenToUpdate : Snapshot
#Enter the Amount how many of the best Players get shown with /pttop.
TopAmount : 10
#The Amount how many Seconds the Plugin waits to let Players earn Rewards after their Login.
#May be usable for Servers with the Plugins AuthMe etc.
LoginDelay : 2 #Seconds
#If set to true, the Player receives a Message (NOTIFY_PLAYER_REWARD_EARNING_ON) when they are able to earn Rewards. False hides this Message
SendRewardEarningMessage : true
#If set to true, it outputs console Notifications when a Player logs in, and his Minecraft Playtime is x seconds bigger/smaller
#than the last Playtime the Plugins knows from him. May help to detect server crashes. Set to 0 to disable it.
NotifyPlaytimeDifference : 10
Afk :
#The Amount of Seconds until the Player gets flagged as Afk, and doesn´t receive playtime anymore.
#Set to 0 to disable the afk-checker.
AfkTimer : 300 #Seconds
#if set to true, the Player receives Messages when he gets flagged as AFK and returns Back.
AfkNotification : true
#If set to true, Players Interacting (e.g. Right/Left Click) will reset their Afk-Status.
CancelOnInteract : true
#If set to true, Players sending a Chatmessage will reset their Afk-Status.
CancelOnChat : true
#If set to true, Players Moving(Just Moving, not looking around) will reset their Afk-Status.
CancelOnMove : true
#If set to true, Players Looking around will reset their Afk-Status.
CancelOnLook : true
MySQL :
#Main MySQL Connection Data. Make sure that the specified user has enough rights.
Host : localhost
Port : 3306
User : root
Password : password
Database : minecraftserver
#Uses SSL on the SQL Connections.
useSSL : false
#PlaytimeRewards by ExoBiTe @https://www.spigotmc.org/resources/60266/
#Main Configuration
Main :
#Define your color-char here. Use it in the rewards.yml
ColorChar : '&'
#Enable or disable mysql here. If enabled, make sure to insert your mysql-data below.
MySQL : false
#Do you just want to see Player´s playtime and AfkTime without Rewarding? Set this to true
#It will completely disable the Rewarding System, resulting in using less Performance.
DisableRewards : false
#Set the delay between the automatic save-intervals. Set to 0 to disable auto-saving (not recommended!).
#As this Plugin only writes and reads data form files/mysql upon play login and quit, there may be a chance to data-loss
#when the server crashes. Auto-Save writes all data every interval to files/mysql. This prevents data-loss.
DataSaveInterval : 1800 #Seconds
#You want to get always the Build of the Plugin? Simply set this to true.
#Enable SearchBeta to always get the latest Build.
#searchUpdates needs to be true!
AutoUpdate : true
#Defines when a newer Version get´s recognized as newer. It only compares the Version until the named Part. The Versions Parts are
#Major.Minor.Snapshot.B1.B2 so for example v2.9.3.0.1 .
WhenToUpdate : Snapshot
#Enter the Amount how many of the best Players get shown with /pttop.
TopAmount : 10
#The Amount how many Seconds the Plugin waits to let Players earn Rewards after their Login.
#May be usable for Servers with the Plugins AuthMe etc.
LoginDelay : 2 #Seconds
#If set to true, the Player receives a Message (NOTIFY_PLAYER_REWARD_EARNING_ON) when they are able to earn Rewards. False hides this Message
SendRewardEarningMessage : true
#If set to true, it outputs console Notifications when a Player logs in, and his Minecraft Playtime is x seconds bigger/smaller
#than the last Playtime the Plugins knows from him. May help to detect server crashes. Set to 0 to disable it.
NotifyPlaytimeDifference : 10
Afk :
#The Amount of Seconds until the Player gets flagged as Afk, and doesn´t receive playtime anymore.
#Set to 0 to disable the afk-checker.
AfkTimer : 300 #Seconds
#if set to true, the Player receives Messages when he gets flagged as AFK and returns Back.
AfkNotification : true
#If set to true, Players Interacting (e.g. Right/Left Click) will reset their Afk-Status.
CancelOnInteract : true
#If set to true, Players sending a Chatmessage will reset their Afk-Status.
CancelOnChat : true
#If set to true, Players Moving(Just Moving, not looking around) will reset their Afk-Status.
CancelOnMove : true
#If set to true, Players Looking around will reset their Afk-Status.
CancelOnLook : true
MySQL :
#Main MySQL Connection Data. Make sure that the specified user has enough rights.
Host : localhost
Port : 3306
User : root
Password : password
Database : minecraftserver
#Uses SSL on the SQL Connections.
useSSL : false
Let´s go on with the default lang.yml, where you can define all Messages to your liking. Notice that VAR[x] get´s replaced with Variables by the Plugin upon sending.
Spoiler: Lang.yml
Code (YAML):
#Notifications/Messages
NOTIFY_ERR_P_KICK_DATAERR : '&4Sorry, there was an error with loading your Data. You won´t receive progress in this session, untils this error stops appearing.'
NOTIFY_PLAYER_IS_AFK : '&eYou are now flagged as AFK.'
NOTIFY_PLAYER_IS_BACK : '&eWelcome back!'
NOTIFY_CONSOLE_AUTO_SAVE : 'PlaytimeRewards is doing an Auto-Save now.'
NOTIFY_PLAYER_REWARD_EARNING_ON : '&aYou are able to earn Rewards now.'
#Console Messages (Recommend to not change them, as no Player sees them.)
SYS_AUTOUPDATE_NOTFOUND : 'You are running on the latest PlaytimeRewards!'
SYS_AUTOUPDATE_DOWNLOADING : 'Found Version VAR [0 ]! Downloading ...'
SYS_AUTOUPDATE_DONE : 'New Version downloaded. Restart the Server to run the new Version.'
SYS_AUTOUPDATE_TITLE : 'Contents of new Version : VAR [0 ]'
SYS_AUTOUPDATE_REMOVED : 'Couldnt find the downloaded File. Did it got deleted?'
SYS_CFG_DETECT_PT_DIFF : 'Detected a Playtime Difference of VAR [0 ]s for UID VAR [1 ]!'
SYS_RW_ERR_DISABLING : 'An error ocurred at Reward VAR [0 ]. Disabling the Reward ... Check your rewards file.\nERROR : VAR [1 ]'
SYS_RW_DUPLICATE : 'Duplicate Reward VAR [0 ] found. Fix your rewards file.'
#Error Messages (Recommend to not change them, as no Player sees them.)
ERR_GUI_WRONG_ARGS : 'Wrong Args given for GUI-Function call VAR [0 ]!'
ERR_NO_GUIHOLD_INSTANCE : ' No GuiHolder Instance found for Object VAR [0 ]!'
ERR_GUI_NOT_FOUND : ' No GUI VAR [0 ].VAR [1 ] found!'
ERR_GUI_MOD_NOT_FOUND : ' No GUI-Mod VAR [0 ] found!'
ERR_MISSING_MYSQL_DATA : 'Missing MySQL-Data. Make sure you´ve entered every needed Data!'
ERR_DISABLE_MYSQL : 'Couldn´t connect to MySQL. Disabling Plugin.'
ERR_NO_STATISTIC_FOUND : 'Couldn´t find a Playtime Statistic for your Minecraft Version. Disabling Plugin ...'
#Command Messages
CMD_ERR_NO_PERMISSION : '&4You don´t have the needed Permission.'
CMD_ERR_REWARDS_DISABLED : '&4The Rewards are disabled. Enable them in the Config.'
CMD_ERR_PLAYER_NOT_FOUND : '&4Couldn´t find the Player VAR [0 ].'
CMD_ERR_REWARD_NOT_FOUND : '&4Couldn´t find the Reward VAR [0 ].'
CMD_ERR_NO_NUMBER : '&4VAR [0 ] is not a Number.'
CMD_ERR_UNKNOWN_CT : '&4Unknown CountType VAR [0 ].'
CMD_ERR_NO_CONSOLE : '&4You can´t execute this Command as the Console.'
CMD_SUCCESS_PT_OUTPUT_NOT_AFK : '&aYour playtime is VAR [0 ] Hours, VAR [1 ] Minutes and VAR [2 ] Seconds!'
CMD_SUCCESS_PT_OUTPUT_IS_AFK : '&7Your playtime is VAR [0 ] Hours, VAR [1 ] Minutes and VAR [2 ] Seconds!'
CMD_ERR_PT_OUTPUT_CONSOLE_SENDER : '&4You need to specify a Player as Console!'
CMD_SUCCESS_RELOAD_STARTED : '&7Reloading the Config file ...'
CMD_SUCCESS_RELOAD_FINISHED : '&aReload done!'
CMD_SUCCESS_PTR_GIVERWARD : '&aYou gave &fVAR [0 ] &athe Reward VAR [1 ].'
CMD_SUCCESS_PTR_SETTIME : '&aYou changed &fVAR [0 ]s &6VAR [1 ] &ato &bVAR [2 ]!'
CMD_ERR_PTR_SETTIME : '&4Couldn´t change the Time.'
CMD_SUCCESS_PTR_LISTREWARDS_HEADER : '&aListing VAR [0 ] Rewards : InternalName | DisplayName'
CMD_SUCCESS_PTR_LISTREWARDS_FORMAT : '&aVAR [0 ] &7| &aVAR [1 ]'
CMD_SUCCESS_PTT_LIST_HEADER : 'Showing the top VAR [0 ] Players:'
CMD_SUCCESS_PTT_LIST_FORMAT : '&aVAR [0 ]&6. VAR [1 ]&8 : &6VAR[2]'
#Inventory Texts
INV_EDIT_NAME : '&2Edit Reward VAR [0 ]'
INV_EDIT_SAVEITEM_NAME : '&aSAVE'
INV_EDIT_SAVEITEM_LORE : '&aSaves the displayed Item as Reward.'
INV_EDIT_CANCELITEM_NAME : '&4CANCEL'
INV_EDIT_CANCELITEM_LORE : '&4Leaves the Editing Mode without any Changes.'
NOTIFY_ERR_P_KICK_DATAERR : '&4Sorry, there was an error with loading your Data. You won´t receive progress in this session, untils this error stops appearing.'
NOTIFY_PLAYER_IS_AFK : '&eYou are now flagged as AFK.'
NOTIFY_PLAYER_IS_BACK : '&eWelcome back!'
NOTIFY_CONSOLE_AUTO_SAVE : 'PlaytimeRewards is doing an Auto-Save now.'
NOTIFY_PLAYER_REWARD_EARNING_ON : '&aYou are able to earn Rewards now.'
#Console Messages (Recommend to not change them, as no Player sees them.)
SYS_AUTOUPDATE_NOTFOUND : 'You are running on the latest PlaytimeRewards!'
SYS_AUTOUPDATE_DOWNLOADING : 'Found Version VAR [0 ]! Downloading ...'
SYS_AUTOUPDATE_DONE : 'New Version downloaded. Restart the Server to run the new Version.'
SYS_AUTOUPDATE_TITLE : 'Contents of new Version : VAR [0 ]'
SYS_AUTOUPDATE_REMOVED : 'Couldnt find the downloaded File. Did it got deleted?'
SYS_CFG_DETECT_PT_DIFF : 'Detected a Playtime Difference of VAR [0 ]s for UID VAR [1 ]!'
SYS_RW_ERR_DISABLING : 'An error ocurred at Reward VAR [0 ]. Disabling the Reward ... Check your rewards file.\nERROR : VAR [1 ]'
SYS_RW_DUPLICATE : 'Duplicate Reward VAR [0 ] found. Fix your rewards file.'
#Error Messages (Recommend to not change them, as no Player sees them.)
ERR_GUI_WRONG_ARGS : 'Wrong Args given for GUI-Function call VAR [0 ]!'
ERR_NO_GUIHOLD_INSTANCE : ' No GuiHolder Instance found for Object VAR [0 ]!'
ERR_GUI_NOT_FOUND : ' No GUI VAR [0 ].VAR [1 ] found!'
ERR_GUI_MOD_NOT_FOUND : ' No GUI-Mod VAR [0 ] found!'
ERR_MISSING_MYSQL_DATA : 'Missing MySQL-Data. Make sure you´ve entered every needed Data!'
ERR_DISABLE_MYSQL : 'Couldn´t connect to MySQL. Disabling Plugin.'
ERR_NO_STATISTIC_FOUND : 'Couldn´t find a Playtime Statistic for your Minecraft Version. Disabling Plugin ...'
#Command Messages
CMD_ERR_NO_PERMISSION : '&4You don´t have the needed Permission.'
CMD_ERR_REWARDS_DISABLED : '&4The Rewards are disabled. Enable them in the Config.'
CMD_ERR_PLAYER_NOT_FOUND : '&4Couldn´t find the Player VAR [0 ].'
CMD_ERR_REWARD_NOT_FOUND : '&4Couldn´t find the Reward VAR [0 ].'
CMD_ERR_NO_NUMBER : '&4VAR [0 ] is not a Number.'
CMD_ERR_UNKNOWN_CT : '&4Unknown CountType VAR [0 ].'
CMD_ERR_NO_CONSOLE : '&4You can´t execute this Command as the Console.'
CMD_SUCCESS_PT_OUTPUT_NOT_AFK : '&aYour playtime is VAR [0 ] Hours, VAR [1 ] Minutes and VAR [2 ] Seconds!'
CMD_SUCCESS_PT_OUTPUT_IS_AFK : '&7Your playtime is VAR [0 ] Hours, VAR [1 ] Minutes and VAR [2 ] Seconds!'
CMD_ERR_PT_OUTPUT_CONSOLE_SENDER : '&4You need to specify a Player as Console!'
CMD_SUCCESS_RELOAD_STARTED : '&7Reloading the Config file ...'
CMD_SUCCESS_RELOAD_FINISHED : '&aReload done!'
CMD_SUCCESS_PTR_GIVERWARD : '&aYou gave &fVAR [0 ] &athe Reward VAR [1 ].'
CMD_SUCCESS_PTR_SETTIME : '&aYou changed &fVAR [0 ]s &6VAR [1 ] &ato &bVAR [2 ]!'
CMD_ERR_PTR_SETTIME : '&4Couldn´t change the Time.'
CMD_SUCCESS_PTR_LISTREWARDS_HEADER : '&aListing VAR [0 ] Rewards : InternalName | DisplayName'
CMD_SUCCESS_PTR_LISTREWARDS_FORMAT : '&aVAR [0 ] &7| &aVAR [1 ]'
CMD_SUCCESS_PTT_LIST_HEADER : 'Showing the top VAR [0 ] Players:'
CMD_SUCCESS_PTT_LIST_FORMAT : '&aVAR [0 ]&6. VAR [1 ]&8 : &6VAR[2]'
#Inventory Texts
INV_EDIT_NAME : '&2Edit Reward VAR [0 ]'
INV_EDIT_SAVEITEM_NAME : '&aSAVE'
INV_EDIT_SAVEITEM_LORE : '&aSaves the displayed Item as Reward.'
INV_EDIT_CANCELITEM_NAME : '&4CANCEL'
INV_EDIT_CANCELITEM_LORE : '&4Leaves the Editing Mode without any Changes.'
And as last, and the biggest and maybe most important File: The Rewards.yml. This is where you create and edit your Rewards. Let´s look into the default File!
Spoiler: Rewards.yml
As you can see, it´s pretty Big, and these are just two Rewards.
The First example Reward (Advanced Reward) is something like a Beginner start: It gets obtained by Players with a Playtime less than 600 Seconds (10 Minutes) every 250 Seconds (2,5 Minutes) in the normal world "world".
It Rewards the Player with a Message, sends a Global Message and executes some Commands (just for shwoing off sake).
The second Reward is a "simple Reward" which mainly works the same as the first Reward, but without that much configuration. It just has one simple Time input, one CountType (see it as one Condition), and also just one TriggerAction upon Reward Earning.
A big Tutorial will follow.
Code (YAML):
#Updated Reward Config File for PlaytimeRewards
#PlaytimeRewards by ExoBiTe @https://[URL='http://www.spigotmc.org/resources/60266/']www.spigotmc.org/resources/60266/[/URL]
#
#List of all Items can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html[/URL]
#List of all Sounds can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html[/URL]
#List of all Particles can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html[/URL]
#List of all Enchantments can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html[/URL]
#Avaible CountType entrys are REALTIME, PLAYTIME, SESSIONTIME, AFKTOTALTIME and AFKSESSIONTIME
AdvancedRewards:
ExampleReward_1 : #The internal Name of the Reward, no duplicates or dots allowed.
DisplayName : '&3Example &4Reward &61' #The Ingame Displayed Name for the Reward.
PlayerMessages : #A List of Messages that get send to the Player upon Rewarding. One Message per Row. Syntax: - 'Message'
- 'Congratulations, <PLAYER>!'
GlobalMessages : #A List of Messages that get send into the Global Chat upon Rewarding. One Message per Row. Syntax: - 'Message'
- '<PLAYER> earned the Reward <REWARD>!'
ConditionInfo : 'Condition_1 & Condition_2' #A logical declaration when the Reward should be given. Allowed chars are Condition Names, (), &(and), |(or).
MultipleObtainable : true #Determines whether the Reward is able to get obtained multiple Times.
Condition_1 : #Defines the Name of a Condition. No duplicates or dots allowed.
CountType : 'PLAYTIME' #The Counting Type of this Conditions. Allowed Inputs are listed above.
PermissionNeeded : '' #The needed Permission to earn the Reward.
TimeMinimum : 0 #Seconds #The Time that the Player needs to have to earn the Reward.
TimeMaximum : 600 #Seconds #The Time that the Player is allowed to maximum have.
AllowedWorlds : #A list of worlds where the Reward is obtainable. One World per Row. Syntax: - 'World'
- 'world'
DeniedWorlds : #A list of worlds where the Reward is not obtainable (usable when AllowedWorlds isnt used.) One World per Row. Syntax: - 'World'
- 'world_the_end'
Condition_2 : #Defines the Name of a Condition. No duplicates or dots allowed.
CountType : 'SESSIONTIME' #The Counting Type of this Conditions. Allowed Inputs are listed above.
TimeMinimum : 150 #Seconds #The Time that the Player needs to have to earn the Reward.
TriggerAction_1 : #Defines the Name of a Rewarded Content. No duplicates or dots allowed.
RewardConsole : #A list with Commands executed from the Console. One Command per Row. Syntax: - 'Command'
- 'say <PLAYER> earned the <REWARD> reward!'
RewardCommand : #A list with Commands executed as the Player (Player needs Permissions!). One Command per Row. Syntax: - 'Command'
- 'say i think i´m very cool now!'
RewardItem : #An indicator to the Item Block, don´t change it.
Material : COOKIE #The Material the item should have. Allowed Entries are specified in the Header of the File.
Damage : 0 #The Damage Value for the Item. May Change/get Removed in the Future.
Amount : 1 #The Amount of the Item Stack.
DisplayName : '&4Cool &8Cookie&a!' #The Custom Name of the Itemstack (e.g. like renamed in an anvil.)
Lore : #A list with the Lore contents. One Row means one Row in the Lore. Syntax: - 'Text'
- '&3A very good looking Cookie&7!'
Enchantments : #A list with Enchantments that has been made to the Item. One Enchantment per Row. Syntax: <ENCHANTMENT>:<LEVEL>.
DURABILITY : 10
LUCK : 666
Effects : #An Indicator to the Effects Block, don´t change it.
SoundName : 'ENTITY_PLAYER_LEVELUP' #The Name of the Sound that should get played. A list of all avaible Sounds is in the Header of the File.
SoundPitch : 1 #The Pitch applied to the Sound.
SoundVolume : 2 #The Soundvolume.
ParticleName : 'LAVA' #The Name of the Particle that should get spawned at the Players Location. A list of all avaible Particles is in the Fileheader.
ParticleAmount : 20 #The Amount of Particles to spawn.
ParticleSpeed : 0.1 #The Speed of the Particles.
ParticleOffsetX : 0.3 #The X Offset for the Particles.
ParticleOffsetY : 0.1 #The Y Offset for the Particles.
ParticleOffsetZ : 0.3 #The Z Offset for the Particles.
SimpleRewards:
ExampleReward_2:
TimeMinimum : 86400
TimeMaximum : 0
CountType : 'PLAYTIME'
DisplayName : '&3Example &4Reward &62'
MultipleObtainable : false
PlayerMessages :
- 'Congratulations, <PLAYER>!'
GlobalMessages :
- '<PLAYER> earned the Reward <REWARD>.'
RewardConsole :
- 'say <PLAYER> got an simple reward!'
RewardCommand :
- 'say I got the simple Reward!'
PermissionNeeded : 'example.permission.2'
#PlaytimeRewards by ExoBiTe @https://[URL='http://www.spigotmc.org/resources/60266/']www.spigotmc.org/resources/60266/[/URL]
#
#List of all Items can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html[/URL]
#List of all Sounds can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html[/URL]
#List of all Particles can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html[/URL]
#List of all Enchantments can be found here: [URL]https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html[/URL]
#Avaible CountType entrys are REALTIME, PLAYTIME, SESSIONTIME, AFKTOTALTIME and AFKSESSIONTIME
AdvancedRewards:
ExampleReward_1 : #The internal Name of the Reward, no duplicates or dots allowed.
DisplayName : '&3Example &4Reward &61' #The Ingame Displayed Name for the Reward.
PlayerMessages : #A List of Messages that get send to the Player upon Rewarding. One Message per Row. Syntax: - 'Message'
- 'Congratulations, <PLAYER>!'
GlobalMessages : #A List of Messages that get send into the Global Chat upon Rewarding. One Message per Row. Syntax: - 'Message'
- '<PLAYER> earned the Reward <REWARD>!'
ConditionInfo : 'Condition_1 & Condition_2' #A logical declaration when the Reward should be given. Allowed chars are Condition Names, (), &(and), |(or).
MultipleObtainable : true #Determines whether the Reward is able to get obtained multiple Times.
Condition_1 : #Defines the Name of a Condition. No duplicates or dots allowed.
CountType : 'PLAYTIME' #The Counting Type of this Conditions. Allowed Inputs are listed above.
PermissionNeeded : '' #The needed Permission to earn the Reward.
TimeMinimum : 0 #Seconds #The Time that the Player needs to have to earn the Reward.
TimeMaximum : 600 #Seconds #The Time that the Player is allowed to maximum have.
AllowedWorlds : #A list of worlds where the Reward is obtainable. One World per Row. Syntax: - 'World'
- 'world'
DeniedWorlds : #A list of worlds where the Reward is not obtainable (usable when AllowedWorlds isnt used.) One World per Row. Syntax: - 'World'
- 'world_the_end'
Condition_2 : #Defines the Name of a Condition. No duplicates or dots allowed.
CountType : 'SESSIONTIME' #The Counting Type of this Conditions. Allowed Inputs are listed above.
TimeMinimum : 150 #Seconds #The Time that the Player needs to have to earn the Reward.
TriggerAction_1 : #Defines the Name of a Rewarded Content. No duplicates or dots allowed.
RewardConsole : #A list with Commands executed from the Console. One Command per Row. Syntax: - 'Command'
- 'say <PLAYER> earned the <REWARD> reward!'
RewardCommand : #A list with Commands executed as the Player (Player needs Permissions!). One Command per Row. Syntax: - 'Command'
- 'say i think i´m very cool now!'
RewardItem : #An indicator to the Item Block, don´t change it.
Material : COOKIE #The Material the item should have. Allowed Entries are specified in the Header of the File.
Damage : 0 #The Damage Value for the Item. May Change/get Removed in the Future.
Amount : 1 #The Amount of the Item Stack.
DisplayName : '&4Cool &8Cookie&a!' #The Custom Name of the Itemstack (e.g. like renamed in an anvil.)
Lore : #A list with the Lore contents. One Row means one Row in the Lore. Syntax: - 'Text'
- '&3A very good looking Cookie&7!'
Enchantments : #A list with Enchantments that has been made to the Item. One Enchantment per Row. Syntax: <ENCHANTMENT>:<LEVEL>.
DURABILITY : 10
LUCK : 666
Effects : #An Indicator to the Effects Block, don´t change it.
SoundName : 'ENTITY_PLAYER_LEVELUP' #The Name of the Sound that should get played. A list of all avaible Sounds is in the Header of the File.
SoundPitch : 1 #The Pitch applied to the Sound.
SoundVolume : 2 #The Soundvolume.
ParticleName : 'LAVA' #The Name of the Particle that should get spawned at the Players Location. A list of all avaible Particles is in the Fileheader.
ParticleAmount : 20 #The Amount of Particles to spawn.
ParticleSpeed : 0.1 #The Speed of the Particles.
ParticleOffsetX : 0.3 #The X Offset for the Particles.
ParticleOffsetY : 0.1 #The Y Offset for the Particles.
ParticleOffsetZ : 0.3 #The Z Offset for the Particles.
SimpleRewards:
ExampleReward_2:
TimeMinimum : 86400
TimeMaximum : 0
CountType : 'PLAYTIME'
DisplayName : '&3Example &4Reward &62'
MultipleObtainable : false
PlayerMessages :
- 'Congratulations, <PLAYER>!'
GlobalMessages :
- '<PLAYER> earned the Reward <REWARD>.'
RewardConsole :
- 'say <PLAYER> got an simple reward!'
RewardCommand :
- 'say I got the simple Reward!'
PermissionNeeded : 'example.permission.2'
The First example Reward (Advanced Reward) is something like a Beginner start: It gets obtained by Players with a Playtime less than 600 Seconds (10 Minutes) every 250 Seconds (2,5 Minutes) in the normal world "world".
It Rewards the Player with a Message, sends a Global Message and executes some Commands (just for shwoing off sake).
The second Reward is a "simple Reward" which mainly works the same as the first Reward, but without that much configuration. It just has one simple Time input, one CountType (see it as one Condition), and also just one TriggerAction upon Reward Earning.
A big Tutorial will follow.
Warning!:
This is a Beta of the Plugin. I tested it on my private Server, but that is nothing against a Server full of Players. I recommend you to make a Backup of your stuff if you´re using an older Version of this Plugin before.
Also make sure to Report Bugs/Errors to the Discussions Tab.
What doesn´t work in the current Version?
Spoiler
Some Commands are still disabled/in development:
- /ptr editReward (disabled, not finished)
- /ptr setTime (disabled, not finished)
- /playtimetop (disabled, not finished)
Configuration:
There are some unused Messages (for now), which will get used in the not fully implemented Commands.
Rewards:
- Particles and Sounds aren´t recognized by the Plugin for now.
- Items aren´t recognized either.
(But you may use Commands to accomplish these Things for now)
- /ptr editReward (disabled, not finished)
- /ptr setTime (disabled, not finished)
- /playtimetop (disabled, not finished)
Configuration:
There are some unused Messages (for now), which will get used in the not fully implemented Commands.
Rewards:
- Particles and Sounds aren´t recognized by the Plugin for now.
- Items aren´t recognized either.
(But you may use Commands to accomplish these Things for now)
Future Plans:
Spoiler
Here are some of the Ideas from the back of my Head for this Plugin. If you´re reading this and like/dislike some of these, let me know! (Discussions/PM).
Got some own Ideas? Also make sure to let me know!
Code (Text):
- Adding an Ingame Reward-Editor, no messing around with ymls anymore!
- Configurable Commands! Means you can change the subcommands of /playtimerewards to your liking in the lang.yml
- Configurable Commands! Means you can change the subcommands of /playtimerewards to your liking in the lang.yml
Frequently Asked Questions:
Spoiler: F.A.Q.
Q: I am using the older PlaytimeRewards (<v2.9). What do i need to do in Order to update?
A: You should be fine by just deleting the replacing the old PlaytimeRewards.jar with the new one. But it´s important to say: PlaytimeRewards can´t read the old Plugin Data. That means every Player loses his Progress made while the old Plugin was on the Server. I also recommend to make a Backup of your old Data before updating.
Q: Are i am able to downgrade from this Version to an older Version of PlaytimeRewards(<2.9)?
A: No, the Plugin doesn´t use the same Save Formats. Although you could just use a Backup you created from the old Plugin.
Q: Does this work on Minecraft <1.13?
A: I tested it on all Versions back to 1.7, but it worked only from 1.8-1.13. So you may use every Version back to Minecraft 1.8.
Q: How does this Plugin save Data?
A: You can use MySQL or just a Flat-File Storage inside the Plugin Folder. Take a look at the Config!
This Plugin uses HikariCP.
A: You should be fine by just deleting the replacing the old PlaytimeRewards.jar with the new one. But it´s important to say: PlaytimeRewards can´t read the old Plugin Data. That means every Player loses his Progress made while the old Plugin was on the Server. I also recommend to make a Backup of your old Data before updating.
Q: Are i am able to downgrade from this Version to an older Version of PlaytimeRewards(<2.9)?
A: No, the Plugin doesn´t use the same Save Formats. Although you could just use a Backup you created from the old Plugin.
Q: Does this work on Minecraft <1.13?
A: I tested it on all Versions back to 1.7, but it worked only from 1.8-1.13. So you may use every Version back to Minecraft 1.8.
Q: How does this Plugin save Data?
A: You can use MySQL or just a Flat-File Storage inside the Plugin Folder. Take a look at the Config!
This Plugin uses HikariCP.
This Plugin collects Data using bStats! If you want to take a look at it, go to this Page: Click
Thanks to ViscousHurricane , he made the awesome looking banners and title!
You aren´t allowed to redistribute this Plugin. Also please don´t remove any Credits. Thanks.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
[MOVED] PlaytimeRewards is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 6,715 times (via Spigot). Download it and open it directly in the game.