Mission

Mission

por poggit-archive
No disponible

Incompatible con la versión actual de PocketMine-MP — Could not load plugin 'Mission': Incompatible API version (plugin requires one of: 3.4.0) · Probado en PocketMine-MP 5.50.0 (PHP 8.4.27).

VariosEstadísticaspocketmine
5visitas
0descargas

Operation example

mission

Command

command name description permission alias player only

mission Show mission mission.command.mission mi Yes

The mission command allows you to specify a name, ID, and Short ID as arguments. Returns a all missions list if no arguments are specified or the specified mission does not exist.

Sub command (/mission)

sub command name description permission alias player only

edit Edit mission mission.command.mission.edit None Yes

setting Settings mission.command.mission.setting set, config Yes

list Show the missions list mission.command.mission.list l Yes

info Show plugin information mission.command.mission.info i No

The edit subcommand allows you to specify a name, ID, and Short ID as arguments. Returns a all missions list if no arguments are specified or the specified mission does not exist.

The list subcommand allows you to specify a group name as arguments. Returns a all missions list if no arguments are specified.

Permission

permission name default

mission.command.mission true

mission.command.mission.edit op

mission.command.mission.setting op

mission.command.mission.list true

mission.command.mission.info op

Usage

Item description

  • Maximum number of achievements: Number of times you can complete a mission

  • Target step: Target number of steps

  • Steptrigger: Trigger to increase mission steps

Mission creation example

  • Achieved after breaking blocks 10 times

  • The reward is 10 diamonds

  • Can be achieved up to once

  • Execute command: /mission edit

  • Select "Add mission"

  • Input the 1 to "Maximum number of achievements" and 10 to "Target step"

  • Select the created mission

  • Select "Edit reward"

  • Select "Add reward"

  • Specify "Item reward" for "Reward type"

  • Input the 264(Diamond ID) to "ID" and 10 to "Amount"

  • Select "Edit steptrigger"

  • Select "Add steptrigger"

  • Specify "Event" for "Steptrigger type"

  • Specify "BlockBreakEvent" for "Event"

If it looks like this, it ’s a success.

screenshot_20201014_081717

Cooperation with Mineflow plugin

Create reward with recipe

  • Add "Mineflow reward" by referring to [Mission creation example](#Mission creation example)

  • Select "MissionReward" with the trigger on the Mineflow plugin side and specify the target mission

Examples

  • Recipe

screenshot_20201014_081807

  • Mission

screenshot_20201014_081952

screenshot_20201014_082017

screenshot_20201014_082029

Tips

  • The variable "target" can be used in Mineflow recipes triggered by mission rewards

  • Even if you want to create multiple recipe rewards, please limit the number of "Mineflow reward" to one

  • If you want to create multiple rewards based on recipes and want to display the second and subsequent rewards, you can use "Nothing (text show only)"

Use the recipe as a Steptrigger

  • Open the action addition screen on the Mineflow plugin side and select "Mission", "Increase the mission step" to add

Examples

screenshot_20201014_082129

Tips

  • No setting is required on the mission side

  • By combining conditional expressions on the recipe side, it is possible to make fairly flexible settings

Cooperation with external plugins (for developers)

Prerequisites

  • Add this plugin to depend in plugin.yml

Add reward type

  • Create a class that inherits Reward (see existing Reward for implementation example)

  • Add that class to Reward

pjz9n\mission\reward\Rewards::add(ExampleReward::class);

Add Steptrigger type

  • Create a class that inherits Executor (see existing Executor for implementation example)

  • Add that class to Executor

pjz9n\mission\mission\executor\Executors::add(ExampleExecutor::class);

Operate Mission

pjz9n\mission\mission\MissionList

Operate Progress

pjz9n\mission\mission\progress\ProgressList

Add event to Event Steptrigger

Instances of PlayerEvent or events with getPlayer methods are added by default. However, you may want to add an EntityDamageByEntityEvent event that has a getDamager method. It can be used in such cases.

pjz9n\mission\mission\executor\EventList::addEvent(EntityDamageByEntityEvent::class, function (Event event): ?Player { /** @var EntityDamageByEntityEvent event */ damager=damager = event->getDamager(); return damagerinstanceofPlayer?damager instanceof Player ? damager : null; });

See the source code for details

  • The timing of each operation does not matter (basically, it is desirable to perform it at the plug-in activation timing)