FishingTrap

Discussion in 'Plugin Requests' started by adi0115, Jul 11, 2019.

  1. Offline

    adi0115

    Plugin category: Mechanics

    Minecraft version: 1.8

    Suggested name: FishingTrap

    What I want: I'm looking for a plugin where players can place trapped chest with a specific name near water and the chest will catch fish into the chest. The trap needs bait inside to catch fish, everytime a fish is caught, one bait is removed. Here's some requirements:

    - The fishing trap chest needs a specific name to be a "fishing trap" which can be set inside of config with color codes support. If the trapped chest doesn't match the name, it will act just like any other trapped chest

    - In the config you can add which fish you want to be 'caught', you can set the name and the lore of the fish as well.

    - Every x amount of minutes, a fish will be randomly picked from the list and added to the chest. The time can be set inside of the config

    - If the chest matches the name in the config, it has to be placed withing 1 block of water, if someone is trying to place the trap and it's not withing 1 block of water, the trap will not be placed and instead, the player will recieve a message about the trap not being close enough to water.

    - Fishing traps need bait to catch fish, the bait item list are in the config, for every fish caught, one bait item will be removed. If there's no bait inside of the fishing trap that matches the bait in the config, no fish will be caught until the correct bait is added.

    - The GUI for the fish trap should be just 9 slots inventory with all slots blocked off by black stained glass except the middle 3 slot where fish get caught and where bait can be added.

    Example of config (please don't actually use this config, this is just an example of the config to show what I would like to be in it)
    Code:
    chest name: '&cFishing Trap'
    fishing cooldown: 5 # the amount of time between fish getting caught in minutes
    placed not near water:'&cThe trap is not close enough to water!'
    fish list:
        - 'RAW_FISH:name:'&bRaw Fish'lore:'&fRaw Fish Caught by a fishing trap'
        - 'PUFFERFISH:name:'&bRaw PufferFish'lore:'&fRaw PufferFish Caught by a fishing trap'
    bait:
        - 'APPLE'
        - 'PUMPKIN__SEED'
        - 'SUGARCANE'

    Ideas for commands: /ft reload - reloads config

    Ideas for permissions: No permissions, only OPs can use the reload command.

    When I'd like it by: This week
     
  2. Offline

    adi0115

  3. Offline

    KarimAKL

    @adi0115 I really like the idea. :)
    I slowly began trying to create it yesterday evening/night and today, but unfortunately i couldn't get it done before my vacation. If someone else hasn't done it before i'm back home, i'll try working on it again.
     
  4. Offline

    adi0115

    @KarimAKL No problem, thanks for attempting it :)
     
    KarimAKL likes this.
  5. Offline

    wand555

    Hey
    I started creating this today out of fun.
    The way it is set up now, you have to write the exact Material names of the items you want as bait and as reward. Also you might see "Allow Wrong Item" in the config, which, if set to false, doesn't allow any other items besides the set items in the config, to be placed in the FishingTrap.
    Though the plugin still has some bugs in its entirity:
    • Cooldown cannot have decimals after the dot (e.g. 3.5)
    • ft reload doesn't affect the cooldown, because I use runnables to schedule the cooldown, so either there will be multiple cooldowns or the cooldown starts fresh (which happens during a normal reload anyway)
    • Once in the GUI, you cannot use shift click or numberkey click
    • Upon destroying, after making a double chest out of a FishingTrap (Trapped Chest) and a regular (non FishingTrap) Trapped Chest, the content is lost
    Besides that, I implemented some other, rather unnoticable features:
    • When two FishingTraps are placed next to each other, they form a double chest, but behave like two individual FishingTraps
    • When breaking a FishingTrap, the content is dropped at its location
    • When the FishingTrap is full and you catch an item, the item will be dropped at the FishingTrap's location

    For the colour support you can either use the old code or the Bukkit ChatColor
    Example:
    "Chest Name: §cFishingTrap" is the same as "Chest Name: ChatColor.RED + "FishingTrap" "
    Download
     
  6. Offline

    adi0115

    @wand555 Thank you :), I will test it out as soon as I can
     
  7. Offline

    adi0115

    @wand555 For some reason I can't place it, it always says I'm not close enough when placed directly next to water. Maybe changing the distance from 1 block near water to 2 blocks would make it more player-friendly since then it can be placed in more places?
     
  8. Offline

    wand555

    It's definitely not the range that's causing the problem. Try changing the name of the chest to something without colour. If the renaming through colour codes doesn't work, I could make a command where, when holding a trapped chest in the main hand, the player gets the preferred colour chest (/fishingtrap green). Also I'm on vacation for the next 16 days so I cannot work on it.
     
  9. Offline

    KarimAKL

    It seems both of the people working on this are on vacation now, huh? :p Have a good vacation. :)
     

Share This Page