Skip to content

Fishing Rod for PvP, plugin for Pocketmine-MP 5.x.x

License

Notifications You must be signed in to change notification settings

MXJosueDev/FishingRod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FishingRod

FishingRod is an open source plugin and is made for PocketMine-MP 5.x.x.

Note: The fishing rod of this plugin is designed for PvP and not for fishing.

Installation

Install the file named FishingRod.phar in the/home/plugins/ folder, you can download this file from Poggit.

Developers

Please see CONTRIBUTING.

API

Get the fishing rod

Due to some changes from PM 4 to 5, items obtained using pocketmine\item\VanillaItems do not allow modifying the "max-durability" property, to keep the value set in the configuration it is recommended to use the Plugin API method to get the item.

VanillaItems
<?php

use pocketmine\item\VanillaItems;

$fishingRod = VanillaItems::FISHING_ROD();
Plugin API
<?php

use MXJosueDev\fishingrod\FishingRodManager; /* API Class */

$fishingRod = FishingRodManager::getFishingRod(); /* The Item with custom durability */

Is a player fishing

Why you should know it? LOL

<?php

use MXJosueDev\fishingrod\FishingRodManager; /* API Class */
use pocketmine\Server;

$player = Server::getInstance()->getPlayerExact("iMXJosue"); /* Object with instance of 'pocketmine/player/Player' */

$isFishing = FishingRodManager::getInstance()->isFishing($player); /* Returns true/false */

Attributions

Plugin Icon: Fishing rod icons created by bqlqn - Flaticon

License

MIT License