(3.4.0 - 3.25.6) 1.8.1 (3.4.0 - 3.25.6) 1.8.0 (3.4.0 - 3.25.6) 1.7.2 (3.4.0 - 3.25.6) 1.7.1 (3.4.0 - 3.25.6) 1.6.3 (3.4.0 - 3.25.6) 1.6.2 (3.4.0 - 3.25.6) 1.6.1 (3.4.0 - 3.25.6) 1.6.0 (3.4.0 - 3.25.6) 1.4.0 (3.4.0 - 3.25.6) 1.2.1
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 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 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 |
/mission edit
If it looks like this, it ’s a success.
pjz9n\mission\reward\Rewards::add(ExampleReward::class);
pjz9n\mission\mission\executor\Executors::add(ExampleExecutor::class);
pjz9n\mission\mission\MissionList
`pjz9n\mission\mission\progress\ProgressList`
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 = $event->getDamager();
return $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)