ModsJava
[MOVED] PlaytimeRewards | Reward your Players for their Playtime!
//Update: Take a look at this: This is a new Recoded Version, supporting MC1.8-1.13. Spoiler: Old Plugin Info Welcome to my 3rd Plugin i released…
⬇ Download on Spigot
//Update: Take a look at this: https://www.spigotmc.org/resources/60266/
This is a new Recoded Version, supporting MC1.8-1.13.
Spoiler: Old Plugin Info
Welcome to my 3rd Plugin i released -
PlaytimeRewards!
This Plugin is all about Time. It counts the Playtime for each Player and gives them Rewards as they reach for example a Playtime of 5 Hours.
Features:
- Create Rewards for Playtimes
- Rewards can be achived mutliple Times
- Loops can count real-time, playtime and sessiontime!
- Rewards can execute multiple Commands(As Player and Console)
- Rewards can give the Player Items
- Customisable Reward Messages (Also Global!)
- Customisable Particles and Soundeffects while obtaining a Reward
- Real-Time Playertime-Counter
- No-Lagg!
- Many uses
You want something Special for the first Join of a Player on the Server?
-No Problem.
You want to create Daily-Login Rewards?
-No Problem!
You want to Reward just newer Players for a better start?
Or older Players for their Loyality to your Server?
-This is as well no Problem!
And there are much more Possibilities!
You can configure every Reward on its own in detail, and achieve the solution you need!
/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
/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.
/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.
timerewards.* grants all Permissions from this Plugin.
Now let´s get into the Biggest part: The configuration.
For the first here´s a commented config.yml :
#Config for PlaytimeRewards
#PlaytimeRewards by ExoBiTe @https://www.spigotmc.org/members/258730/
#Main Configuration
Main:
#do not touch this value
Version: 2.8
#Define your color-char here. Use it in the rewards.yml
ColorChar: '&'
#Set to true if you want to get a console Notification if a Player Logs in with a not existing Loop/Reward.
msgUnknownLoops: false
#Enable or disable mysql here. If enabled, make sure to insert your mysql-data below.
MySQL: false
#ForceCommands only affects other Plugins with the commands /playtimerewards and|or /playtime.
#If set to false, this Plugin will try to force other plugin with the same command
#to take priority of the command.
#If set to true this plugin tries to execute its Commands, and cancel the other Plugin´s commands.
ForceCommands: true
#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
#Enter the Amount how many of the best Players get shown with /pttop.
TopAmount: 10
Notification:
#If you want that i (the plugin developer) is able to send messages to your console (just messages, no commands etc.!)
#set this to true. This can be used to notify you about big bugs, which you need to get notified about.
allowMessages: true
#You don´t like updates? Set this to false, and you won´t get a Update Notification!
#searchUpdates: true
MySQL:
Host: localhost
Port: 3306
User: minecraftuser
Password:
Database: minecraftserver
useSSL: false
And as next, here´s a commented Rewards.yml:
If this didn´t help you at all/you still have Questions, try this tutorial!
Got an older Version of this Plugin? -Try this then:
Planned Features
- Using 1.12 Advancement Feature to display Rewards!
Servers using this Plugin
- bdserver.fun
- play.mineglade.net
- shdilnetwork.ddns.net
- play.herondalemc.com
- play.divine-mc.com
- landofpixels.crafted.pro
Want to appear in this List? Send me your Server Adress!
Read before updating!
This Plugin detects a new installed Version and replaces your config.yml with a new one. Make sure you backed your old config.yml up so you can copy your values over to the new config.yml.
Version Compability
This Plugin was coded for Minecraft 1.12 and has been tested on 1.12.
But it supports any Minecraft back to 1.7, but not every Version supports every Feature (e. g. Particles aren´t supported in older Versions).
WebAddon
Thanks to @CMSascha, there is a PlaytimeRewards WebAddon!
Read more about it at https://www.spigotmc.org/resources/playtimerewards-webaddon.46160/!
Bugs/Errors?
Please post Bugs/Errors in the Discussions Tab or write a Private Message to me instead of posting them in the Reviews.
This Plugin collects Data using bStats! If you want to take a look at it, go to this Page: https://bstats.org/plugin/bukkit/PlaytimeRewards
Thanks to @ViscousHurricane, he made the awesome looking banners and title!
Update-related stuff
Currently a complete re-write of this Plugin is in progress. Look through here to take a look at the new functions/stuff that has been done until now. Add your own suggestions/improvements in the discussions tab.
I´m also gonna post updates related to this firstly in the discussions tab.
Feel also free to message me on Twitter. I´m gonna post update news there and can also help you with problems related to this plugin.
This Plugin is all about Time. It counts the Playtime for each Player and gives them Rewards as they reach for example a Playtime of 5 Hours.
Features:
- Create Rewards for Playtimes
- Rewards can be achived mutliple Times
- Loops can count real-time, playtime and sessiontime!
- Rewards can execute multiple Commands(As Player and Console)
- Rewards can give the Player Items
- Customisable Reward Messages (Also Global!)
- Customisable Particles and Soundeffects while obtaining a Reward
- Real-Time Playertime-Counter
- No-Lagg!
- Many uses
You want something Special for the first Join of a Player on the Server?
-No Problem.
You want to create Daily-Login Rewards?
-No Problem!
You want to Reward just newer Players for a better start?
Or older Players for their Loyality to your Server?
-This is as well no Problem!
And there are much more Possibilities!
You can configure every Reward on its own in detail, and achieve the solution you need!
/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
/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.
/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.
timerewards.* grants all Permissions from this Plugin.
Now let´s get into the Biggest part: The configuration.
For the first here´s a commented config.yml :
Code (Text):
#Config for PlaytimeRewards
#PlaytimeRewards by ExoBiTe @https://www.spigotmc.org/members/258730/
#Main Configuration
Main:
#do not touch this value
Version: 2.8
#Define your color-char here. Use it in the rewards.yml
ColorChar: '&'
#Set to true if you want to get a console Notification if a Player Logs in with a not existing Loop/Reward.
msgUnknownLoops: false
#Enable or disable mysql here. If enabled, make sure to insert your mysql-data below.
MySQL: false
#ForceCommands only affects other Plugins with the commands /playtimerewards and|or /playtime.
#If set to false, this Plugin will try to force other plugin with the same command
#to take priority of the command.
#If set to true this plugin tries to execute its Commands, and cancel the other Plugin´s commands.
ForceCommands: true
#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
#Enter the Amount how many of the best Players get shown with /pttop.
TopAmount: 10
Notification:
#If you want that i (the plugin developer) is able to send messages to your console (just messages, no commands etc.!)
#set this to true. This can be used to notify you about big bugs, which you need to get notified about.
allowMessages: true
#You don´t like updates? Set this to false, and you won´t get a Update Notification!
#searchUpdates: true
MySQL:
Host: localhost
Port: 3306
User: minecraftuser
Password:
Database: minecraftserver
useSSL: false
Code (Text):
#Updated Reward Config File for PlaytimeRewards
#PlaytimeRewards by ExoBiTe @ https://www.spigotmc.org/resources/32900/
Rewards:
#Enter here a Name for the Reward. No Duplicates allowed!
DailyLogin:
#Put the needed time in here (in seconds!)
PlaytimeNeeded: 86400
#Specify here, how the Reward should Count.
#Allowed Entrys are REALTIME, PLAYTIME and SESSIONTIME
#REALTIME is like the real-world clock. It counts also if the Player or the Server is offline.
#PLAYTIME is the real-playtime of the Player on the Server. Just counts, while the Player is online on the Server.
#SESSIONTIME is similiar to PLAYTIME, except it gets reset to 0 if the Player disconnects. This means it just counts the Playtime of the Player of the actual "session".
CountType: 'REALTIME'
#true or false. Turns a Notification like "Player x got Reward y" for all Players on/off.
GlobalNotification: false
#true or false. Turns a Notification like "You got Reward y" for the rewarded Player on/off.
PlayerNotification: true
#The Ingame DisplayName. Color-Codes are allowed. Duplicates are allowed.
RewardName: '&3Daily &4Login'
#The custom Text that is send to the Rewarded Player. Color-Codes are allowed. Can be empty.
RewardText: '&3Thank you for your Daily Login! Here is a Cookie!'
#A list of Commands the Console executes. <player> is replaced with the Player´s Name. The upper command will be executed first, the lowest one as last. Can be empty.
RewardCommand: ''
#A list of Commands the Player executes. The upper command will be executed first, the lowest one as last. Can be empty.
RewardConsole: ''
#Item Configuration Block
RewardItem:
#Specify which Item the Player should get.
Item: 'COOKIE'
#Specify the Item´s Damage/Metadata here.
Damage: 0
#Put in the Amount if the Item.
Amount: 1
#Write the DisplayName of the Item in here. Color-Codes allowed.
DisplayName: '&4Cool &8Cookie&a!'
#The Item´s Lore. Each Row equals one Row ingame. Color-Codes allowed.
Lore:
- '&3A very good looking Cookie&7!'
#- '&3I am the second Row&7!'
#Item Enchantment Configuration Block
Enchantments:
#Just add the Enchantments on the Item here. The Format is Enchantmentname: Enchantmentlevel. Look here for a list of all avaible Enchantments: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
DURABILITY: 10
LUCK: 666
#Sound/Particle Configuration Block
Effects:
#Specify here the name of the Sound that should be played. Look here for a list of all avaible Sound Names: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
SoundName: 'ENTITY_PLAYER_LEVELUP'
#Specify the Pitch of the Sound here.
SoundPitch: 1
#Put the SoundVolume into this Field.
SoundVolume: 2
#Specify here the name of the particle that should get spawned at the Player´s Location. Look here for a list of all avaible Particles: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
ParticleName: 'LAVA'
#Write down here how many Particles should spawn.
ParticleAmount: 20
#Specify here the speed of the Particles Movement.
ParticleSpeed: 0.1
#Specify here the x,y and z length, where the Particles can spawn around the Player
ParticleOffsetX: 0.3
ParticleOffsetY: 0.1
ParticleOffsetZ: 0.3
#Loop/Repeating Reward Configuration Block
LoopOptions:
#Enables the Loop. If set to true, the Player will achieve the Reward everytime the specified counttype reaches the specified Time.
#Can be used to Reward the Player for each Hour Playtime.
EnableLoop: true
#If set to true, the Player will achieve the Reward first, and then he gets it again if the specified counttype reaches the specified Time.
#Can be used for Daily-Login Rewards.
WaitFirst: false
#Specify here a minimun needed Playtime.
#Can be used to give "older" Players more rewards.
MinPlaytime: 0 #Seconds
#Specify here a maximum allowed Playtime.
#Can be used to give new Players rewards at the beginning.
MaxPlaytime: 0 #Seconds
#Specify here a Permission, the player needs in order the Receive the Reward.
PermissionNeeded: ''
#PlaytimeRewards by ExoBiTe @ https://www.spigotmc.org/resources/32900/
Rewards:
#Enter here a Name for the Reward. No Duplicates allowed!
DailyLogin:
#Put the needed time in here (in seconds!)
PlaytimeNeeded: 86400
#Specify here, how the Reward should Count.
#Allowed Entrys are REALTIME, PLAYTIME and SESSIONTIME
#REALTIME is like the real-world clock. It counts also if the Player or the Server is offline.
#PLAYTIME is the real-playtime of the Player on the Server. Just counts, while the Player is online on the Server.
#SESSIONTIME is similiar to PLAYTIME, except it gets reset to 0 if the Player disconnects. This means it just counts the Playtime of the Player of the actual "session".
CountType: 'REALTIME'
#true or false. Turns a Notification like "Player x got Reward y" for all Players on/off.
GlobalNotification: false
#true or false. Turns a Notification like "You got Reward y" for the rewarded Player on/off.
PlayerNotification: true
#The Ingame DisplayName. Color-Codes are allowed. Duplicates are allowed.
RewardName: '&3Daily &4Login'
#The custom Text that is send to the Rewarded Player. Color-Codes are allowed. Can be empty.
RewardText: '&3Thank you for your Daily Login! Here is a Cookie!'
#A list of Commands the Console executes. <player> is replaced with the Player´s Name. The upper command will be executed first, the lowest one as last. Can be empty.
RewardCommand: ''
#A list of Commands the Player executes. The upper command will be executed first, the lowest one as last. Can be empty.
RewardConsole: ''
#Item Configuration Block
RewardItem:
#Specify which Item the Player should get.
Item: 'COOKIE'
#Specify the Item´s Damage/Metadata here.
Damage: 0
#Put in the Amount if the Item.
Amount: 1
#Write the DisplayName of the Item in here. Color-Codes allowed.
DisplayName: '&4Cool &8Cookie&a!'
#The Item´s Lore. Each Row equals one Row ingame. Color-Codes allowed.
Lore:
- '&3A very good looking Cookie&7!'
#- '&3I am the second Row&7!'
#Item Enchantment Configuration Block
Enchantments:
#Just add the Enchantments on the Item here. The Format is Enchantmentname: Enchantmentlevel. Look here for a list of all avaible Enchantments: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
DURABILITY: 10
LUCK: 666
#Sound/Particle Configuration Block
Effects:
#Specify here the name of the Sound that should be played. Look here for a list of all avaible Sound Names: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
SoundName: 'ENTITY_PLAYER_LEVELUP'
#Specify the Pitch of the Sound here.
SoundPitch: 1
#Put the SoundVolume into this Field.
SoundVolume: 2
#Specify here the name of the particle that should get spawned at the Player´s Location. Look here for a list of all avaible Particles: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
ParticleName: 'LAVA'
#Write down here how many Particles should spawn.
ParticleAmount: 20
#Specify here the speed of the Particles Movement.
ParticleSpeed: 0.1
#Specify here the x,y and z length, where the Particles can spawn around the Player
ParticleOffsetX: 0.3
ParticleOffsetY: 0.1
ParticleOffsetZ: 0.3
#Loop/Repeating Reward Configuration Block
LoopOptions:
#Enables the Loop. If set to true, the Player will achieve the Reward everytime the specified counttype reaches the specified Time.
#Can be used to Reward the Player for each Hour Playtime.
EnableLoop: true
#If set to true, the Player will achieve the Reward first, and then he gets it again if the specified counttype reaches the specified Time.
#Can be used for Daily-Login Rewards.
WaitFirst: false
#Specify here a minimun needed Playtime.
#Can be used to give "older" Players more rewards.
MinPlaytime: 0 #Seconds
#Specify here a maximum allowed Playtime.
#Can be used to give new Players rewards at the beginning.
MaxPlaytime: 0 #Seconds
#Specify here a Permission, the player needs in order the Receive the Reward.
PermissionNeeded: ''
Got an older Version of this Plugin? -Try this then:
Spoiler: Pre 1.8 Configuration
As you can see the config.yml isn´t that big. In future Updates here will be several other things.
Now to the biggest File: Rewards.yml
I´ll split this into 2 Parts: Rewards and RewardLoops. So first things first - the rewards:
So this is done, over to the Loops:
Thats it with the configuration. Still some Questions? Open the Spoiler!
Code (Text):
#Config for PlaytimeRewards
#PlaytimeRewards by ExoBiTe @https://www.spigotmc.org/members/258730/
#Main Configuration
Main:
#don´t touch this value, it will delete your config.yml if you do.
Version: 1.0
#Define your color-char here, to use it in the rewards.yml
ColorChar: '&'
#If this is set to true, you´ll see a console-notification if a player with an unkown reward logged in.
msgUnknownLoops: false
#Enable or disable mysql here. If enabled, make sure to put your mysql-data below.
MySQL: false
MySQL:
Host: localhost
Port: 3306
User: mcserver
Password: mctest
Database: minecraftserver
#PlaytimeRewards by ExoBiTe @https://www.spigotmc.org/members/258730/
#Main Configuration
Main:
#don´t touch this value, it will delete your config.yml if you do.
Version: 1.0
#Define your color-char here, to use it in the rewards.yml
ColorChar: '&'
#If this is set to true, you´ll see a console-notification if a player with an unkown reward logged in.
msgUnknownLoops: false
#Enable or disable mysql here. If enabled, make sure to put your mysql-data below.
MySQL: false
MySQL:
Host: localhost
Port: 3306
User: mcserver
Password: mctest
Database: minecraftserver
Now to the biggest File: Rewards.yml
I´ll split this into 2 Parts: Rewards and RewardLoops. So first things first - the rewards:
Code (Text):
Rewards:
Reward1: #Use this name just once, its an internal name!
PlaytimeNeeded: 20 #Put in here the Time the player should´ve played to earn this reward (in seconds). If this reward is used in a loop, set it to -1.
GlobalNotification: false #Set this to true if the all Players should get Notificated that Player x got this reward
RewardName: '20Seconds-Reward!' #The DisplayName of the Reward. Color-Codes allowed.
RewardText: 'I am an Additional Text!' #The optional Text that gets displayed to the Player when he earns the reward. not needed, color-codes allowed.
RewardCommand: #Enter below here some Commands that should get executed at getting the Reward.
- say Yay i´m Happy!
RewardConsole: #Enter below here some Commands that the Console should execute at getting the reward. <player> get´s replaced by the playername.
- say <player> is cool!
- say but this server is cool, too!
RewardItem: #Here you can enter an item that the player gets when he earns a reward (Optional)
Item: 'BLAZE_ROD' #The material of the item
Damage: 0 #The Damage Value of the item
Amount: 1 #The Amount of the item
DisplayName: '&4Cool &8Reward&a!' #The DisplayName of the Item. Color-Codes allowed.
Lore:
- '&3Lore &71' #The Item´s Lore. Each Row is also a Row ingame. Color-Codes allowed
- '&3...'
Enchantments: #Enchantments belong here. Add as many as you want! Just use ENCHANTMENTNAME: LEVEL. AT the top of this File a List with all avaible Enchants can be found.
DURABILITY: 10
Effects: #Optional Effects that gets triggered at earning of a reward
SoundName: 'ENTITY_PLAYER_LEVELUP' #The Soundname , optional set to '' to disable. On the Top of this File is a link to a List with all avaible soundnames.
SoundPitch: 1 #The pitch of the sound
SoundVolume: 2 #The played sound´s volume
ParticleName: 'LAVA' #The Name of a Particle that gets spawned at the player´s location at earning a reward, optional set to '' to disable. A List of all avaible Particlenames can be found on top of this file
ParticleAmount: 20 #The Amount of the particles that get spawned
ParticleSpeed: 0.1 #The Particle´s speed
ParticleOffsetX: 0.3 #The Spread of the Particle at the x-axis
ParticleOffsetY: 0.1 #The Spread of the Particle at the y-axis
ParticleOffsetZ: 0.3#The Spread of the Particle at the z-axis
Reward1: #Use this name just once, its an internal name!
PlaytimeNeeded: 20 #Put in here the Time the player should´ve played to earn this reward (in seconds). If this reward is used in a loop, set it to -1.
GlobalNotification: false #Set this to true if the all Players should get Notificated that Player x got this reward
RewardName: '20Seconds-Reward!' #The DisplayName of the Reward. Color-Codes allowed.
RewardText: 'I am an Additional Text!' #The optional Text that gets displayed to the Player when he earns the reward. not needed, color-codes allowed.
RewardCommand: #Enter below here some Commands that should get executed at getting the Reward.
- say Yay i´m Happy!
RewardConsole: #Enter below here some Commands that the Console should execute at getting the reward. <player> get´s replaced by the playername.
- say <player> is cool!
- say but this server is cool, too!
RewardItem: #Here you can enter an item that the player gets when he earns a reward (Optional)
Item: 'BLAZE_ROD' #The material of the item
Damage: 0 #The Damage Value of the item
Amount: 1 #The Amount of the item
DisplayName: '&4Cool &8Reward&a!' #The DisplayName of the Item. Color-Codes allowed.
Lore:
- '&3Lore &71' #The Item´s Lore. Each Row is also a Row ingame. Color-Codes allowed
- '&3...'
Enchantments: #Enchantments belong here. Add as many as you want! Just use ENCHANTMENTNAME: LEVEL. AT the top of this File a List with all avaible Enchants can be found.
DURABILITY: 10
Effects: #Optional Effects that gets triggered at earning of a reward
SoundName: 'ENTITY_PLAYER_LEVELUP' #The Soundname , optional set to '' to disable. On the Top of this File is a link to a List with all avaible soundnames.
SoundPitch: 1 #The pitch of the sound
SoundVolume: 2 #The played sound´s volume
ParticleName: 'LAVA' #The Name of a Particle that gets spawned at the player´s location at earning a reward, optional set to '' to disable. A List of all avaible Particlenames can be found on top of this file
ParticleAmount: 20 #The Amount of the particles that get spawned
ParticleSpeed: 0.1 #The Particle´s speed
ParticleOffsetX: 0.3 #The Spread of the Particle at the x-axis
ParticleOffsetY: 0.1 #The Spread of the Particle at the y-axis
ParticleOffsetZ: 0.3#The Spread of the Particle at the z-axis
Code (Text):
RewardLoops:
Loop1: #Again the internal Name of the Loop. don´t use twice!
RewardName: 'Reward1' #The InternalName of the Reward that should get triggered
Refresh: 60 #The Time that the reward needs to get earned again (in seconds)
MinPlaytime: 0 #The Minimum Playtime a player needs to be able to trigger this Loop (in seconds), optional set to 0 to disable
MaxPlaytime: 600 #The Maximum Playtime a player can have to be able to trigger this Loop (in seconds), optional set to 0 to disable
PermissionNeeded: 'my.own.loop.1' #A Permission that a player needs to be able to trigger this Loop. You may create custom permissions here, optional set to '' to disable
useServerTime: false#Look at the "Questions?" Spoiler below.
Loop1: #Again the internal Name of the Loop. don´t use twice!
RewardName: 'Reward1' #The InternalName of the Reward that should get triggered
Refresh: 60 #The Time that the reward needs to get earned again (in seconds)
MinPlaytime: 0 #The Minimum Playtime a player needs to be able to trigger this Loop (in seconds), optional set to 0 to disable
MaxPlaytime: 600 #The Maximum Playtime a player can have to be able to trigger this Loop (in seconds), optional set to 0 to disable
PermissionNeeded: 'my.own.loop.1' #A Permission that a player needs to be able to trigger this Loop. You may create custom permissions here, optional set to '' to disable
useServerTime: false#Look at the "Questions?" Spoiler below.
Spoiler: Questions?
The useServerTime value:
This Value tells the Loop if it should count the real-world time since the last trigger of the loop to refresh(true), or if it should wait till the player played the time of refresh(false).
For example if you want to create a Daily-Login Bonus set this to true and put a 86400 (1day in seconds) into refresh. This tells the Plugin to wait 1 Day real-time in order to trigger this loop again. But if you want to give the Player each 5 Minutes of playtime a reward, set this to false and set the refresh value to 300 (5Minutes in seconds) because this tells the Plugin to wait till the player played 5 Minutes after the last trigger.
If you still got Question´s let me know so i can answer them and put them in here!
This Value tells the Loop if it should count the real-world time since the last trigger of the loop to refresh(true), or if it should wait till the player played the time of refresh(false).
For example if you want to create a Daily-Login Bonus set this to true and put a 86400 (1day in seconds) into refresh. This tells the Plugin to wait 1 Day real-time in order to trigger this loop again. But if you want to give the Player each 5 Minutes of playtime a reward, set this to false and set the refresh value to 300 (5Minutes in seconds) because this tells the Plugin to wait till the player played 5 Minutes after the last trigger.
If you still got Question´s let me know so i can answer them and put them in here!
Planned Features
- Using 1.12 Advancement Feature to display Rewards!
Servers using this Plugin
- bdserver.fun
- play.mineglade.net
- shdilnetwork.ddns.net
- play.herondalemc.com
- play.divine-mc.com
- landofpixels.crafted.pro
Want to appear in this List? Send me your Server Adress!
Read before updating!
This Plugin detects a new installed Version and replaces your config.yml with a new one. Make sure you backed your old config.yml up so you can copy your values over to the new config.yml.
Version Compability
This Plugin was coded for Minecraft 1.12 and has been tested on 1.12.
But it supports any Minecraft back to 1.7, but not every Version supports every Feature (e. g. Particles aren´t supported in older Versions).
WebAddon
Thanks to @CMSascha, there is a PlaytimeRewards WebAddon!
Read more about it at https://www.spigotmc.org/resources/playtimerewards-webaddon.46160/!
Bugs/Errors?
Please post Bugs/Errors in the Discussions Tab or write a Private Message to me instead of posting them in the Reviews.
This Plugin collects Data using bStats! If you want to take a look at it, go to this Page: https://bstats.org/plugin/bukkit/PlaytimeRewards
Thanks to @ViscousHurricane, he made the awesome looking banners and title!
Update-related stuff
Currently a complete re-write of this Plugin is in progress. Look through here to take a look at the new functions/stuff that has been done until now. Add your own suggestions/improvements in the discussions tab.
I´m also gonna post updates related to this firstly in the discussions tab.
Spoiler
ExoBiTe said:
↑
I´m currently re-writing the whole Plugin, so it gets less performance-eating, and has a lot cleaner and easier code.
Also it will add some small but kinda neat things, that got requested in the past.
But this may take a while, i just created the main foundation. Means everything like Data-Storage, Messages, GUIs and similiar base-systems are done, but the reward-reading, checking and giving it to the Player isn´t anywhere near done.Click to expand...
ExoBiTe said:
↑
Progress done!
The Code is now nearly complete, the only missing thing is the mysql connection, and some additional debug commands.
New Features done for now:
- AFK-Recognition
- AFK-Time counter and rewards
- World-dependent Rewards
- Every Message is configurable in the lang.yml file
Other (imo) helpful/cool stuff:
- PTR Is now using my own written GUI-API, which makes it easier to use GUIs.
- GUI-API is a good base to create a system, which allows players to create and edit whole rewards ingame
- PTR is also using my own written Task-API, which sorts and handles tasks easy, for better i/o performance
- Task-API also reduced the amount of "Clocks" to just one Clock for every repeating task (for example auto-saving).
- Got rid of the old Auto-Update (which didn´t work really good), and replaced it by a newer one
- The config doesn´t generate itself with every update, the Plugin just adds new stuff to the config without deleting the old one (same goes for the lang.yml)
If you guys have any questions and/or good ideas feel free to post them in the discussions! The Re-write of the Plugin is the best point to add new stuff, as i have nearly no limits right now.Click to expand...
ExoBiTe said:
↑
Preview of the "Afk"-System:
Click to expand...
ExoBiTe said:
↑
I´m also using a new MySQL-Connection instead of basic jdbc, i´m using hikaricp now, which manages queries/connections faster and performanter.Click to expand...
ExoBiTe said:
↑
The reload command is gonna work in the next Version of this Plugin.Click to expand...
ExoBiTe said:
↑
Here´s a little Preview of the newer rewards.yml.
The biggest difference is, that you now can create multiple different conditions for one reward, and decide yourself if condition 1 AND condition 2 OR just condition 3 should gain the reward to the Player. Also got rid of the default Messages.Code (Text):Rewards:
ExampleReward_1:
DisplayName: '&3Example &4Reward &61'
PlayerMessages:
- 'Congratulations, <PLAYER>!'
GlobalMessages:
- '<PLAYER> earned the Reward <REWARD>!'
ConditionInfo: 'Condition_1 & Condition_2 & Condition_3'
#Another Example, which doesn´t make sense for this reward: 'Condition_1 || (Condition_2 & Condition_3)'
Condition_1:
CountType: 'PLAYTIME'
IsLoop: false
PermissionNeeded: 'example.permission.1'
PlaytimeMinimum: 0 #Seconds
PlaytimeMaximum: 14400 #Seconds
AllowedWorlds:
- 'world_lobby'
- 'world_survival'
Condition_2:
CountType: 'SESSIONTIME'
IsLoop: true
LoopTime: 50 #Seconds
DeniedWorlds:
- 'world_creative'
- 'world_pixelart'
Condition_3:
CountType: 'REALTIME'
IsLoop: true
LoopTime: 86400 #Seconds
TriggerAction_1:
RewardConsole:
- 'say <PLAYER> earned the <REWARD> reward!'
- 'pex user <PLAYER> add permission.cool.guy'
RewardCommand:
- 'say i think i´m very cool now!'
RewardItem:
Material: COOKIE
Damage: 0
Amount: 1
DisplayName: '&4Cool &8Cookie&a!'
Lore:
- '&3A very good looking Cookie&7!'
Enchantments:
DURABILITY: 10
LUCK: 666
Effects:
SoundName: 'ENTITY_PLAYER_LEVELUP'
SoundPitch: 1
SoundVolume: 2
ParticleName: 'LAVA'
ParticleAmount: 20
ParticleSpeed: 0.1
ParticleOffsetX: 0.3
ParticleOffsetY: 0.1
ParticleOffsetZ: 0.3
TriggerAction_2:
RewardItem:
Material: COOKIE
Damage: 777
Amount: 1
DisplayName: '&4Second &8Cookie'
Lore:
- '&3Just another Cookie&7.'
Another big difference is, that i am planning to create "simple" and "advanced" rewards. The shown above is an advanced one. The "simple" ones are nearly the currentones, which will get even smaller and easier to understand/create/modify. Here´s an example:
As you can see there aren´t even the half of the options avaible in the simple reward, and it fits many needs too!Code (Text):SimpleRewards:
ExampleReward_2:
PlaytimeNeeded: 86400
CountType: 'PLAYTIME'
RewardName: '&3Example &4Reward &62'
PlayerMessages:
- 'Congratulations, <PLAYER>!'
GlobalMessages:
- '<PLAYER> earned the Reward <REWARD>.'
RewardConsole:
- 'say <PLAYER> got an simple reward!'
RewardCommand:
- 'say I got the simple Reward!'
EnableLoop: true
PermissionNeeded: 'example.permission.2'
Please tell me your opinions on this whole system!Click to expand...
Feel also free to message me on Twitter. I´m gonna post update news there and can also help you with problems related to this plugin.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- 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 | Reward your Players for their Playtime! is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 8,866 times (via Spigot). Download it and open it directly in the game.