マルチバースでネザー・エンドに行かせない方法【Minecraft】
UPDATE :
今日はマイクラの話。Multiverseっていうプラグインの/mv tpまたは/mvtpでネザー・エンドに行くことができてしまうので、これを無理やり阻止する方法を紹介する。
目次
環境
- JE1.16.5
- Paper1.16.5 #782
- Multiverse-Core 4.3.0
- ConditionalEvents 3.6.3
ConditionalEventsを入れよう
ConditionalEventsというプラグインで、プレイヤーの行動に応じて連鎖的にアクションを起こせる。
これで以下のコマンドの実行を監視し、イベントをキャンセルする。
/mv tp world_nether/mvtp world_nether/mv tp world_the_end/mvtp world_the_end
設定方法
$ cd plugins/ConditionalEvents $ vi config.yml
config.yml
Messages:
prefix: '&4[&bConditionalEvents&4] '
commandReload: '&aConfig Reloaded.'
commandNoPermissions: '&cそのコマンドは使えませんよ!'
commandResetError: '&cUse &7/ce reset <player> <event>'
eventDoesNotExists: '&cイベントが見つかりません'
cooldownReset: '&aCooldown was reset for player &e%player% &aon event &e%event%&a!'
seconds: s
minutes: m
hours: h
days: d
Events:
mvtp_any_to_nether:
type: player_command
conditions:
- '%command% startsWith /mv'
- '%arg_1% equals tp'
- '%arg_2% equals world_nether'
- '%player_world% equals world or %player_world% equals resource or %player_world% equals world_the_end'
actions:
default:
- 'cancel_event: true'
- 'message: ネザーにはテレポートできません'
permission: multiverse.access.world_nether
ignore_with_permission: multiverse.restrictionexempt
mvtp_any_to_nether2:
type: player_command
conditions:
- '%command% startsWith /mvtp'
- '%arg_1% equals world_nether'
- '%player_world% equals world or %player_world% equals resource or %player_world% equals world_the_end'
actions:
default:
- 'cancel_event: true'
- 'message: ネザーにはテレポートできません'
permission: multiverse.access.world_nether
ignore_with_permission: multiverse.restrictionexempt
mvtp_any_to_end:
type: player_command
conditions:
- '%command% startsWith /mv'
- '%arg_1% equals tp'
- '%arg_2% equals world_the_end'
- '%player_world% equals world or %player_world% equals resource or %player_world% equals world_nether'
actions:
default:
- 'cancel_event: true'
- 'message: エンドにはテレポートできません'
permission: multiverse.access.world_the_end
ignore_with_permission: multiverse.restrictionexempt
mvtp_any_to_end2:
type: player_command
conditions:
- '%command% startsWith /mvtp'
- '%arg_1% equals world_the_end'
- '%player_world% equals world or %player_world% equals resource or %player_world% equals world_nether'
actions:
default:
- 'cancel_event: true'
- 'message: エンドにはテレポートできません'
permission: multiverse.access.world_the_end
ignore_with_permission: multiverse.restrictionexempt
ややこしいのがconditionsの%player_world% equals...の部分。別に現在のディメンションは関係ないんだが、指定しないとイベントが発火しない。
参考
https://www.spigotmc.org/threads/multiverse-teleport-restrictions.439323/#post-4032499