【解決済み】chat eventが反応してない

[00:18:43 INFO]: [Skript] Line 12: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is "syumai2367":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 14: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is "syumai2367":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 16: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is "silverfish1218":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 18: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is ".silverfish1218":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 20: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is ".Tacken07":
[00:18:43 INFO]: [Skript] Line 12: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is "syumai2367":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 14: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is "syumai2367":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 16: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is "silverfish1218":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 18: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is ".silverfish1218":
[00:18:43 INFO]:
[00:18:43 INFO]: [Skript] Line 20: (menu.sk)
[00:18:43 INFO]: Starting a variable's name with an expression is discouraged ({%player%_id}). You could prefix it with the script's name: {menu::%player%_id}
[00:18:43 INFO]: Line: if {%player%_id} is ".Tacken07":
39 Replies
syumai
syumaiOP3y ago
コンソールのエラーです
syumai
syumaiOP3y ago
No description
No description
syumai
syumaiOP3y ago
reloadしたエラーです
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
コードください
syumai
syumaiOP3y ago
これです
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
これはエラーではないです 変数名をexpression、つまり今回の場合%player%から始めるべきではない、という警告なのでエラーとは異なります 正常に動作していないのであればそれは別の原因があります
syumai
syumaiOP3y ago
じゃあ何が問題でしょう ちょっとぼくのいはわからないです 入れてるpluginがわるいんですかね?
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
変数に値はセットされていますか?
syumai
syumaiOP3y ago
どうやってセットするんですかね? たぶん自分がそれを理解していないことが原因かもしれません
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
変数に値をセットするには、任意のイベント内で
set {変数名} to 値
set {変数名} to 値
と記述します ただ、今回のようにmcidで場合分けしたい場合は変数を使う必要はなく、
if name of player is "mcid":
if name of player is "mcid":
と記述するだけで大丈夫です
syumai
syumaiOP3y ago
ありがとうございます! 記述しても無理でした
#chat event
on chat:
if name of player is "mcid":
if player is op:
if {%player%_id} is "syumai2367":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is "syumai2367":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is "silverfish1218":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is ".silverfish1218":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is ".Tacken07":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
else:
set the chat format to "[&a鯖民&f] %player%: %message%"
#chat event
on chat:
if name of player is "mcid":
if player is op:
if {%player%_id} is "syumai2367":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is "syumai2367":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is "silverfish1218":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is ".silverfish1218":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
if {%player%_id} is ".Tacken07":
set the chat format to "[&d生活鯖運営&f] %player%: %message%"
else:
set the chat format to "[&a鯖民&f] %player%: %message%"
この場合って別のプラグインが悪さしてますかね?
syumai
syumaiOP3y ago
コード
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
えっと
on chat:
if name of player is "syumai2367":
set the chat format of ...(以下略)
...(以下略)
on chat:
if name of player is "syumai2367":
set the chat format of ...(以下略)
...(以下略)
こういうことです
syumai
syumaiOP3y ago
あ 僕のみすでしたねすいません 色々教えてくださりありがとうございます
syumai
syumaiOP3y ago
skriptはいいと思うんですが反応しません
No description
ねんねこ
ねんねこ3y ago
if player is op:if player has op:にしましょう
syumai
syumaiOP3y ago
エラーは来ます
syumai
syumaiOP3y ago
is opだとエラーは来ません
No description
syumai
syumaiOP3y ago
使用プラグイン coreprotect floodgate Geyserskin Geyser LuckPerms Lunachat multiversecore multiverseinventories multiverse netherportal multiverseportals SkQuery Skript Viabackwards Viaversion worldedit worldguard です
ばくねつ
ばくねつ3y ago
lunachat入ってるからじゃないのかなこれ 🤔 sirane
syumai
syumaiOP3y ago
俺の知っているところはありで作動してたのでどうなんでしょうね ちょっと後で抜いてみます
ねんねこ
ねんねこ3y ago
あすまん if player has permission op: にして
syumai
syumaiOP3y ago
できなかったです
No description
syumai
syumaiOP3y ago
No description
syumai
syumaiOP3y ago
lunachatなしでも反応しません これはなんかプラグインか何かなんでしょうか
ねんねこ
ねんねこ3y ago
VaultとLunaChatを入れて、どうぞ https://www.spigotmc.org/resources/vault.34315/ これでできなかったらわからんです
SpigotMC - High Performance Minecraft
Vault
ねんねこ
ねんねこ3y ago
if player has permission "op":でした ほんとごめん
くr
くr3y ago
最終手段は
on chat:
if name of player is "mcid":
cancel event
broadcast "chat format"
on chat:
if name of player is "mcid":
cancel event
broadcast "chat format"
じゃないですかね
syumai
syumaiOP3y ago
入れてやってみます! ありがとうございます
くr
くr3y ago
よかったですね!
syumai
syumaiOP3y ago
なぜかできなかったです
No description
syumai
syumaiOP3y ago
サーバーが悪いんですかね? この場合 いまskript関連の以外のプラグインぬおてやって見たんですが駄目でした サーバーの設定が悪そうですねこの場合
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
今のコードどうなってます? skファイルじゃなくてコードを直接コピペして欲しいです
で囲んでください
で囲んでください
aaa ``` こんな感じ
syumai
syumaiOP3y ago
いまのskriptのコードはこれです
# join massage
on join:
set join message to "&e%player%さんがsyumai serverにやってきました"

#抜けたメッセージ
On Quit:
set quit message to "&e%player%さんがsyumai serverから退出しました"
on chat:
if player is op:
if name of player is " syumai2367":
set the chat format to "[&d生活鯖運営&f] %player% %message%"
else:
set the chat format to "[&2鯖民&f] %player% %message%"
# join massage
on join:
set join message to "&e%player%さんがsyumai serverにやってきました"

#抜けたメッセージ
On Quit:
set quit message to "&e%player%さんがsyumai serverから退出しました"
on chat:
if player is op:
if name of player is " syumai2367":
set the chat format to "[&d生活鯖運営&f] %player% %message%"
else:
set the chat format to "[&2鯖民&f] %player% %message%"
これにして動かしたら鯖民で文字が変わりました
syumai
syumaiOP3y ago
OPの部分がかえられないです
No description
syumai
syumaiOP3y ago
enforce-secure-profileこれをtrueにしたらjavaはメッセージが買えられましたがが統合版はチャットができません falseにしても動いたのでskriptの問題だったかもしれません あとはOPで動くようにするだけです if player is op: を if player has permission "op":  に変更 なぞにスペースが 1個入っていたのが問題でした
ねんねこ
ねんねこ3y ago
@syumaidayo こっちのほうが数億倍いい
No description
syumai
syumaiOP3y ago
やりました わすれてたので教えていただきありがとうございます

Did you find this page helpful?