Start and End Actions: Defines the actions to be executed when the competition starts and ends.
start-actions:...end-actions:...
Participation Actions: Actions to be executed when a player joins the competition.
participate-actions:...
Participation Requirements: Requirements for joining the competition
participate-requirements:...
Rewards: Determines the rewards for players based on their rankings or participation.
rewards:1:command_action:type:commandvalue: - 'money give {player} 200'messages_action:type:messagevalue: - '<#FF4500>[1st] Congratulations! You got the first prize!'2:command_action:type:commandvalue: - 'money give {player} 100'messages_action:type:messagevalue: - '<#FF4500>[2nd] Just miss the opportunity, try next time!'3:command_action:type:commandvalue: - 'money give {player} 100'messages_action:type:messagevalue: - '<#FF4500>[3rd] Just miss the opportunity, try next time!'# <-- 4,5,6...participation:command_action:type:commandvalue: - 'money give {player} 10'messages_action:type:messagevalue: - '<#FF4500>Thanks for participation!'
Redis Ranking
To set up a synchronized fishing competition across multiple servers, the plugin offers integration with Redis for real-time ranking updates. This ensures that players on different servers can compete in the same event and view live rankings.
Enabling Redis Ranking
Follow the steps below to activate the Redis ranking mechanism:
Navigate to your config.yml file.
Locate the mechanics section.
Inside the competition subsection, find redis-ranking.
Set the value of redis-ranking to true.
mechanics:competition:redis-ranking:true
Redis Settings
To set up Redis, follow these steps:
Open the database.yml file.
Scroll to find the Redis section.
Update the configuration settings according to your Redis setup:
Redis:enable:true# Set to true to enable Redis integrationhost: [Your_Redis_Host] # Replace with your Redis server's address#password: [Your_Password] # Uncomment and replace with your Redis password if requiredport: [Your_Redis_Port] # Replace with your Redis server's portuse-ssl: [true/false] # Set to true if using SSL for Redis connectionsMaxTotal:10# Maximum number of resources that can be allocated by the poolMaxIdle:10# Maximum number of idle resources in the poolMinIdle:1# Minimum number of idle resources in the poolMaxWaitMillis:30000# Maximum amount of time the borrowObject method should block before throwing an exception MinEvictableIdleTimeMillis: 1800000 # Specifies the minimum amount of time an object may sit idle in the pool before it is eligible for eviction
Save and reload the plugin.
Placeholder Limitation
The fishing plugin employs caching mechanisms to optimize performance, especially when syncing data across multiple servers through Redis. By default, for performance considerations, the plugin only syncs the real-time data variables of the top three competitors. If you wish to display more competitors' data in real-time, you need to adjust the placeholder-limit setting.
Navigate to your config.yml file.
Locate the mechanics section.
Navigate to the competition section.
Find the placeholder-limit setting. If it doesn't exist, you might need to add it manually.
Set its value to the number of top competitors' real-time data you wish to display. For example, if you want to display the top 5 competitors' data, set it to 5: