はるまき
はるまき
PDCPlayerRealms developerS Community
Created by はるまき on 4/29/2023 in #help-forum
プレイヤーがスニークしているように見せたい
[ 環境 ] paper-514 mc1.19.4 [ 導入plugin ] skript-2.6.4 skript-packet-2.1.0 ProtocolLib - ver 5.0.0-SNAPSHOT-636 [ やりたいこと ] packetを使いarg-1に設定したプレイヤーから自分(コマンド実行者)がスニークしているように見せたい [使用したコード]
command /sneak <player>:
trigger:
set {_packet} to new play_client_entity_action packet
set field 0 of {_packet} to id of player
set field 1 of {_packet} to "PRESS_SHIFT_KEY"
set field 2 of {_packet} to 0
send arg-1 packet {_packet}
command /sneak <player>:
trigger:
set {_packet} to new play_client_entity_action packet
set field 0 of {_packet} to id of player
set field 1 of {_packet} to "PRESS_SHIFT_KEY"
set field 2 of {_packet} to 0
send arg-1 packet {_packet}
[エラー内容] このコマンドを実行すると、arg-1に設定したプレイヤーが「io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet」という理由で蹴られます。
on packet event play_client_entity_action:
if "%field 1 of event-packet%" is "RELEASE_SHIFT_KEY":
cancel event
on packet event play_client_entity_action:
if "%field 1 of event-packet%" is "RELEASE_SHIFT_KEY":
cancel event
上のスニークを離したことをキャンセルするコードも作ってみたのですが、プレイヤーに左右クリックした時スニークが解除されてしまうというのがありました。 昨日パケットの勉強を始めたばかりの初心者なのでおかしいところがあるとは思いますが何卒よろしくお願いします。
11 replies
PDCPlayerRealms developerS Community
Created by はるまき on 1/14/2023 in #help-forum
盾でガードに成功したことを検知したい
Minecraft Java -ver 1.19.3 skript -ver 2.6.4 [やりたいこと] 盾でガードに成功したことを検知する方法を知りたい。 final damageを0にして検知とかも試したのですが盾で吸収した分もfinal damageに入っていてうまく検知できなかったのでお力を貸していただきたいです。記載漏れがございましたらすみません。
14 replies
PDCPlayerRealms developerS Community
Created by はるまき on 12/24/2022 in #help-forum
二点の空間内にいることを検知したい
[環境] Minecraft Java ver 1.19 Skript ver 2.6.4 [導入してるアドオン] skRayFall v1.9.28 [内容] 地点1と地点2の2点の空間内(?)にプレイヤーがいることを検知したくて https://qiita.com/meoto2408/items/b3971c115bf91d3262e2 を参考に以下のコードを作ったのですが、 エラーが出て色々試してもだめだったので質問させていただきます。 不足している点がございましたらすみません。 [コード]
command /test:
trigger:
location of player is within {pos.1} and {pos.2}
broadcast "てすと"

command /pos <int>:
trigger:
if arg-1 is 1 or 2:
set {pos.%arg-1%} to location of player
send "Pos:%arg-1% -> %location of player%"
command /test:
trigger:
location of player is within {pos.1} and {pos.2}
broadcast "てすと"

command /pos <int>:
trigger:
if arg-1 is 1 or 2:
set {pos.%arg-1%} to location of player
send "Pos:%arg-1% -> %location of player%"
[エラー]
[Skript] Reloading test.sk...
Line 161: (test.sk)
Can't understand this condition/effect: location of player is within {pos.1} and {pos.2}
Line: location of player is within {pos.1} and {pos.2}

[Skript] Encountered 1 error while reloading test.sk! (1201ms)
[Skript] Reloading test.sk...
Line 161: (test.sk)
Can't understand this condition/effect: location of player is within {pos.1} and {pos.2}
Line: location of player is within {pos.1} and {pos.2}

[Skript] Encountered 1 error while reloading test.sk! (1201ms)
3 replies
PDCPlayerRealms developerS Community
Created by はるまき on 11/17/2022 in #help-forum
vixioを使ったdiscord commandが反応しない
[環境] Minecraft Java ver 1.17.1 Skript ver 2.6.3 Vixio(fork版) 2.0.9-pre6 [内容] SkriptとVixioを使ってdiscordのbotを作っていたのですが discord commandが反応せず下のようなエラーがでています 数十分間だけコマンドが反応したのですがその後またエラーが出ました。 botのPrivileged Gateway Intentsは3つ全てオンにしてます [send "メッセージ" to channel with id "チャンネルのID" with "botの名前"] と言うのは反応したのですがコマンドは反応しません 使ったskript
discord command !test:
()trigger:
()()reply with "test message"
discord command !test:
()trigger:
()()reply with "test message"
エラー
[23:26:36 WARN]: [net.dv8tion.jda.api.JDA] Attempting to access message content without GatewayIntent.MESSAGE_CONTENT.
Discord now requires to explicitly enable access to this using the MESSAGE_CONTENT intent.
Useful resources to learn more:
- https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ
- https://jda.wiki/using-jda/gateway-intents-and-member-cache-policy/
- https://jda.wiki/using-jda/troubleshooting/#im-getting-closecode4014-disallowed-intents
Or suppress this warning if this is intentional with Message.suppressContentIntentWarning()
[23:26:36 WARN]: [net.dv8tion.jda.api.JDA] Attempting to access message content without GatewayIntent.MESSAGE_CONTENT.
Discord now requires to explicitly enable access to this using the MESSAGE_CONTENT intent.
Useful resources to learn more:
- https://support-dev.discord.com/hc/en-us/articles/4404772028055-Message-Content-Privileged-Intent-FAQ
- https://jda.wiki/using-jda/gateway-intents-and-member-cache-policy/
- https://jda.wiki/using-jda/troubleshooting/#im-getting-closecode4014-disallowed-intents
Or suppress this warning if this is intentional with Message.suppressContentIntentWarning()
3つのURLは見てみたのですが解決できませんでした。 初めて質問するので不足している部分があったら申し訳ないです。
9 replies