Competition

Goal: Determines the objective of the competition. For instance, CATCH_AMOUNT would mean the player who catches the most fish wins.

goal: CATCH_AMOUNT

Start-Weekday: Specifies which days the competition starts.

start-weekday:
  - 6
  - 7

Start-Time: Determines the time(s) the competition starts during the day.

start-time:
  - '9:30'
  - '14:30'
  - '20:00'

Duration: Defines how long the competition lasts, in seconds.

duration: 300

Minimum Players: The minimum number of players required for the competition to start.

min-players: 2

Skip-Actions: Actions to be executed if the minimum number of players is not met.

skip-actions:
  broadcast:
    type: broadcast
    value:
      - 'The number of players is not enough for the fishing competition to be started as scheduled.'

Bossbar: Settings related to the bossbar display during the competition. It provides information to players.

bossbar:
  enable: true
  color: WHITE
  overlay: PROGRESS
  text:
    - '<gray>[<#87CEFA>🎣<gray>] <gradient:#F0F8FF:#87CEFA:#F0F8FF>Time Left: <#E6E6FA>{seconds}s <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>Your Rank: <#E6E6FA>{rank} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>No.1 Player: <#E6E6FA>{1_player}'
    - '<gray>[<#87CEFA>🎣<gray>] <gradient:#F0F8FF:#87CEFA:#F0F8FF>Time Left: <#E6E6FA>{minute}{second} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>Your Score: <#E6E6FA>{score} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>No.1 Score: <#E6E6FA>{1_score}'
    - '<gray>[<#87CEFA>🎣<gray>] <gradient:#F0F8FF:#87CEFA:#F0F8FF>Time Left: <#E6E6FA>{minute}{second} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>Winning condition: <#E6E6FA>{goal}'
  refresh-rate: 20
  switch-interval: 200
  only-show-to-participants: true

Actionbar: An alternative UI to the bossbar. It provides information in the action bar.

actionbar:
  enable: false
  text:
    - '<gradient:#F0F8FF:#87CEFA:#F0F8FF>Time Left: <#E6E6FA>{seconds}s <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>Your Rank: <#E6E6FA>{rank} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>No.1 Player: <#E6E6FA>{1_player}'
    - '<gradient:#F0F8FF:#87CEFA:#F0F8FF>Time Left: <#E6E6FA>{minute}{second} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>Your Score: <#E6E6FA>{score} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>No.1 Score: <#E6E6FA>{1_score}'
    - '<gradient:#F0F8FF:#87CEFA:#F0F8FF>Time Left: <#E6E6FA>{minute}{second} <gray>| <gradient:#F0F8FF:#87CEFA:#F0F8FF>Winning condition: <#E6E6FA>{goal}'
  refresh-rate: 5
  switch-interval: 200
  only-show-to-participants: true

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:
  ...

Rewards: Determines the rewards for players based on their rankings or participation.

rewards:
  1:
    command_action:
      type: command
      value:
        - 'money give {player} 200'
    messages_action:
      type: message
      value:
        - '<#FF4500>[1st] Congratulations! You got the first prize!'
  2:
    command_action:
      type: command
      value:
        - 'money give {player} 100'
    messages_action:
      type: message
      value:
        - '<#FF4500>[2nd] Just miss the opportunity, try next time!'
  3:
    command_action:
      type: command
      value:
        - 'money give {player} 100'
    messages_action:
      type: message
      value:
        - '<#FF4500>[3rd] Just miss the opportunity, try next time!'
      
        <-- 4,5,6...  
      
  participation:
    command_action:
      type: command
      value:
        - 'money give {player} 10'
    messages_action:
      type: message
      value:
        - '<#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:

  1. Navigate to your config.yml file.

  2. Locate the mechanics section.

  3. Inside the competition subsection, find redis-ranking.

  4. Set the value of redis-ranking to true.

mechanics:
  competition:
    redis-ranking: true

Redis Settings

To set up Redis, follow these steps:

  1. Open the database.yml file.

  2. Scroll to find the Redis section.

  3. Update the configuration settings according to your Redis setup:

Redis:
  enable: true               # Set to true to enable Redis integration
  host: [Your_Redis_Host]    # Replace with your Redis server's address
  #password: [Your_Password] # Uncomment and replace with your Redis password if required
  port: [Your_Redis_Port]    # Replace with your Redis server's port
  use-ssl: [true/false]      # Set to true if using SSL for Redis connections
  MaxTotal: 10               # Maximum number of resources that can be allocated by the pool
  MaxIdle: 10                # Maximum number of idle resources in the pool
  MinIdle: 1                 # Minimum number of idle resources in the pool
  MaxWaitMillis: 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.

  1. Navigate to your config.yml file.

  2. Locate the mechanics section.

  3. Navigate to the competition section.

  4. Find the placeholder-limit setting. If it doesn't exist, you might need to add it manually.

  5. 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:

mechanics:
  competition:
    placeholder-limit: 5

Last updated