コンソールコマンド
execute console command " "
で、コンソールに実行したことを表示しないってことはできますか?
49 Replies
[09:21:27 INFO]: Executed 51 command(s) from <コマンド>
これを表示させないってことです
方法は分からないんですけど
そのシステムの目的分かれば
代替案出せる人がいるかもです
左クリックしたときに、データパックのファンクション呼び出してます
import:
org.bukkit.Bukkit
org.apache.logging.log4j.core.Filter
option nms:
get:
return "net.minecraft.server.%Bukkit.getServer().getClass().getPackage().getName().split("\.")[3]%"
import:
{@nms}.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.LOGGER.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.LOGGER.addFilter({g::filter})
import:
org.bukkit.Bukkit
org.apache.logging.log4j.core.Filter
option nms:
get:
return "net.minecraft.server.%Bukkit.getServer().getClass().getPackage().getName().split("\.")[3]%"
import:
{@nms}.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.LOGGER.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.LOGGER.addFilter({g::filter})
これはそのスクリプト内に張ればいいのでしょうか?
どういうこと
どう使えばいいですか?
そのまま入れればいい
[14:13:10 INFO]: [Skript] Reloading nolog.sk...
[14:13:10 INFO]: Line 1: (nolog.sk)
[14:13:10 INFO]: Can't understand this event: 'import'
[14:13:10 INFO]: Line: import:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 5: (nolog.sk)
[14:13:10 INFO]: Can't understand this event: 'option nms'
[14:13:10 INFO]: Line: option nms:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 9: (nolog.sk)
[14:13:10 INFO]: Can't understand this event: 'import'
[14:13:10 INFO]: Line: import:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 14: (nolog.sk)
[14:13:10 INFO]: Can't understand this loop: '...MinecraftServer.LOGGER.getFilters()'
[14:13:10 INFO]: Line: loop ...MinecraftServer.LOGGER.getFilters():
[14:13:10 INFO]:
[14:13:10 INFO]: Line 18: (nolog.sk)
[14:13:10 INFO]: Can't understand this section: create section with ({_p1}, {_p2}) stored in {_funcs::filter}
[14:13:10 INFO]: Line: create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 24: (nolog.sk)
[14:13:10 INFO]: Can't understand this expression: 'new proxy of Filter using {_funcs::*}'
[14:13:10 INFO]: Line: set {g::filter} to new proxy of Filter using {_funcs::*}
[14:13:10 INFO]:
[14:13:10 INFO]: Line 25: (nolog.sk)
[14:13:10 INFO]: Can't understand this condition/effect: MinecraftServer.LOGGER.addFilter({g::filter})
[14:13:10 INFO]: Line: MinecraftServer.LOGGER.addFilter({g::filter})
[14:13:10 INFO]:
[14:13:10 INFO]: [Skript] Encountered 7 errors while reloading nolog.sk! (8ms)
[14:13:10 INFO]: [Skript] Reloading nolog.sk...
[14:13:10 INFO]: Line 1: (nolog.sk)
[14:13:10 INFO]: Can't understand this event: 'import'
[14:13:10 INFO]: Line: import:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 5: (nolog.sk)
[14:13:10 INFO]: Can't understand this event: 'option nms'
[14:13:10 INFO]: Line: option nms:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 9: (nolog.sk)
[14:13:10 INFO]: Can't understand this event: 'import'
[14:13:10 INFO]: Line: import:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 14: (nolog.sk)
[14:13:10 INFO]: Can't understand this loop: '...MinecraftServer.LOGGER.getFilters()'
[14:13:10 INFO]: Line: loop ...MinecraftServer.LOGGER.getFilters():
[14:13:10 INFO]:
[14:13:10 INFO]: Line 18: (nolog.sk)
[14:13:10 INFO]: Can't understand this section: create section with ({_p1}, {_p2}) stored in {_funcs::filter}
[14:13:10 INFO]: Line: create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
[14:13:10 INFO]:
[14:13:10 INFO]: Line 24: (nolog.sk)
[14:13:10 INFO]: Can't understand this expression: 'new proxy of Filter using {_funcs::*}'
[14:13:10 INFO]: Line: set {g::filter} to new proxy of Filter using {_funcs::*}
[14:13:10 INFO]:
[14:13:10 INFO]: Line 25: (nolog.sk)
[14:13:10 INFO]: Can't understand this condition/effect: MinecraftServer.LOGGER.addFilter({g::filter})
[14:13:10 INFO]: Line: MinecraftServer.LOGGER.addFilter({g::filter})
[14:13:10 INFO]:
[14:13:10 INFO]: [Skript] Encountered 7 errors while reloading nolog.sk! (8ms)
skript-reflectが必要
了解です、試してみます
と出ました
[Skript] Line 10: (nolog.sk)
[14:18:39 INFO]: net.minecraft.server.v1_20_R2.MinecraftServer refers to a non-existent class.
[14:18:39 INFO]: Line: {@nms}.MinecraftServer
[14:18:39 INFO]:
[14:18:39 INFO]: [Skript] Line 14: (nolog.sk)
[14:18:39 INFO]: Can't understand this loop: '...MinecraftServer.LOGGER.getFilters()'
[14:18:39 INFO]: Line: loop ...MinecraftServer.LOGGER.getFilters():
[14:18:39 INFO]:
[14:18:39 INFO]: [Skript] Line 25: (nolog.sk)
[14:18:39 INFO]: Can't understand this condition/effect: MinecraftServer.LOGGER.addFilter({g::filter})
[14:18:39 INFO]: Line: MinecraftServer.LOGGER.addFilter({g::filter})
[Skript] Line 10: (nolog.sk)
[14:18:39 INFO]: net.minecraft.server.v1_20_R2.MinecraftServer refers to a non-existent class.
[14:18:39 INFO]: Line: {@nms}.MinecraftServer
[14:18:39 INFO]:
[14:18:39 INFO]: [Skript] Line 14: (nolog.sk)
[14:18:39 INFO]: Can't understand this loop: '...MinecraftServer.LOGGER.getFilters()'
[14:18:39 INFO]: Line: loop ...MinecraftServer.LOGGER.getFilters():
[14:18:39 INFO]:
[14:18:39 INFO]: [Skript] Line 25: (nolog.sk)
[14:18:39 INFO]: Can't understand this condition/effect: MinecraftServer.LOGGER.addFilter({g::filter})
[14:18:39 INFO]: Line: MinecraftServer.LOGGER.addFilter({g::filter})
import:
org.bukkit.Bukkit
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.LOGGER.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.LOGGER.addFilter({g::filter})
import:
org.bukkit.Bukkit
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.LOGGER.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.LOGGER.addFilter({g::filter})
[Skript] Reloading nolog.sk...
[14:22:05 INFO]: Line 8: (nolog.sk)
[14:22:05 INFO]: LOGGER refers to a non-existent field
[14:22:05 INFO]: Line: loop ...MinecraftServer.LOGGER.getFilters():
[14:22:05 INFO]:
[14:22:05 INFO]: Line 19: (nolog.sk)
[14:22:05 INFO]: LOGGER refers to a non-existent field
[14:22:05 INFO]: Line: MinecraftServer.LOGGER.addFilter({g::filter})
[14:22:05 INFO]:
[14:22:05 INFO]: [Skript] Encountered 2 errors while reloading nolog.sk! (51ms)
[Skript] Reloading nolog.sk...
[14:22:05 INFO]: Line 8: (nolog.sk)
[14:22:05 INFO]: LOGGER refers to a non-existent field
[14:22:05 INFO]: Line: loop ...MinecraftServer.LOGGER.getFilters():
[14:22:05 INFO]:
[14:22:05 INFO]: Line 19: (nolog.sk)
[14:22:05 INFO]: LOGGER refers to a non-existent field
[14:22:05 INFO]: Line: MinecraftServer.LOGGER.addFilter({g::filter})
[14:22:05 INFO]:
[14:22:05 INFO]: [Skript] Encountered 2 errors while reloading nolog.sk! (51ms)
import:
org.bukkit.Bukkit
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.n.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.addFilter({g::filter})
import:
org.bukkit.Bukkit
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.n.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.addFilter({g::filter})
[Skript] Reloading index.sk...
[14:25:57 INFO]: No matching non-static method: Log4jLogger#getFilters called without arguments
[14:25:57 INFO]: No matching non-static method: Log4jLogger#addFilter called with (jdk.proxy8.$Proxy104@576e0875 ($Proxy104))
[14:25:57 INFO]: [Skript] Successfully reloaded index.sk. (140ms)
[Skript] Reloading index.sk...
[14:25:57 INFO]: No matching non-static method: Log4jLogger#getFilters called without arguments
[14:25:57 INFO]: No matching non-static method: Log4jLogger#addFilter called with (jdk.proxy8.$Proxy104@576e0875 ($Proxy104))
[14:25:57 INFO]: [Skript] Successfully reloaded index.sk. (140ms)
サーバーのバージョンいくつ
1.20以上?
はい
1.20.2のpaperサーバーです
import:
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.n.logger.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
import:
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
set {_injected} to false
loop ...MinecraftServer.n.logger.getFilters():
if {g::filter} is loop-value:
set {_injected} to true
if {_injected} is false:
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
ありがとうございます、できました。
すみませんが、
Named entity EntityZombieVillager['土まみれのゾンビ - HP: 26/120'/58023, uuid='33c91574-c096-42f7-95eb-b9acf5e4f1fc', l='ServerLevel[world]', x=-364.50, y=11.00, z=-606.81, cpos=[-23, -38], tl=111, v=true] died: 土まみれの ゾンビ - HP: 26/120 was slain by shin748 using [銅製の鈍器【強化済み】]
というログも消したいのですが、どうしたらいいでしょうかskriptはイチミリもできないの
何もできないです...すみません
じゃあせっかくだから
コード変えたから
このsplitっていうのは
リスト変数で
import:
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
MinecraftServer.n.logger.privateConfig.config.removeFilter({g::filter})
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
import:
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
MinecraftServer.n.logger.privateConfig.config.removeFilter({g::filter})
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
はい
split at " "は空白で分割するやつね
あー!
a b cだったら
Namedを消すってことですか?
{split::1} = a
{split::2} = b
{split::3} = c
になるの
はい
だから
Named Entity .....だと
split::1 = Named
split::2 = Entity
3以降にもスペースで区切った文字が入る
英語は
多少はわかる?
はい
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
あー!!わかりました!
split::1 = Executed
split::2 = なんとか
split::3 = commands
{_split::1} = named
{_split::2} = entity
ですね
そう
必ず同じ文字にならない場所は避けて
まじで教えるのうますぎます!!
ありがとうございます!
それ以外の文字が一致するかどうかで
return Filter.Result.DENY
を返す
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENYs
if {_split::1} is "Named":
{_split::2} is "entity"
return Filter.Result.DENYs
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENYs
if {_split::1} is "Named":
{_split::2} is "entity"
return Filter.Result.DENYs
DENY
DENYsはだめだよ
あぁすいません
プログラムは一文字も
間違えちゃいけないからね
はい!
これだと出てきちゃうんですが、どこか間違えてますか?
on load:
MinecraftServer.n.logger.privateConfig.config.removeFilter({g::filter})
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
if {_split::1} is "Named":
{_split::2} is "entity"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
on load:
MinecraftServer.n.logger.privateConfig.config.removeFilter({g::filter})
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
if {_split::1} is "Named":
{_split::2} is "entity"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
commandsは出てこない?
namedだけ出る?
はい
[15:02:11 INFO]: Named entity EntitySkeleton['俊足の風使い - HP: 19/60'/79654, uuid='d2f4f26e-aae6-485c-baf0-6365b7463b35', l='ServerLevel[world]', x=-362.52, y=10.00, z=-594.49, cpos=[-23, -38], tl=3187, v=true] died: 俊足の風使い - HP: 19/60 was slain by shin748 using [銅製の鈍器【★★】]
import:
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
MinecraftServer.n.logger.privateConfig.config.removeFilter({g::filter})
EntityLiving.b.logger.privateConfig.config.removeFilter({g::filter})
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
EntityLiving.b.logger.addFilter({g::filter})
import:
org.apache.logging.log4j.core.Filter
net.minecraft.server.MinecraftServer
on load:
MinecraftServer.n.logger.privateConfig.config.removeFilter({g::filter})
EntityLiving.b.logger.privateConfig.config.removeFilter({g::filter})
create section with ({_p1}, {_p2}) stored in {_funcs::filter}:
set {_split::*} to {_p2}.getFormattedMessage() split at " "
if {_split::1} is "Executed":
{_split::3} is "commands"
{_split::4} is "from"
return Filter.Result.DENY
set {g::filter} to new proxy of Filter using {_funcs::*}
MinecraftServer.n.logger.addFilter({g::filter})
EntityLiving.b.logger.addFilter({g::filter})
これって /sk reload じゃダメですか?
EntityLivingのloggerに
filterかけないと
いけない
やってみます
できました!ありがとうございました!!