コンソールコマンド

execute console command " " で、コンソールに実行したことを表示しないってことはできますか?
49 Replies
るび
るびOP14mo ago
[09:21:27 INFO]: Executed 51 command(s) from <コマンド> これを表示させないってことです
月猫ch
月猫ch14mo ago
方法は分からないんですけど そのシステムの目的分かれば 代替案出せる人がいるかもです
るび
るびOP14mo ago
左クリックしたときに、データパックのファンクション呼び出してます
何か
何か14mo ago
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})
るび
るびOP14mo ago
これはそのスクリプト内に張ればいいのでしょうか?
何か
何か14mo ago
どういうこと
るび
るびOP14mo ago
どう使えばいいですか?
何か
何か14mo ago
そのまま入れればいい
るび
るびOP14mo ago
[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)
と出ます
何か
何か14mo ago
skript-reflectが必要
るび
るびOP14mo ago
了解です、試してみます
[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})
と出ました
何か
何か14mo ago
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})
るび
るびOP14mo ago
[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)
何度もすみません
何か
何か14mo ago
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})
るび
るびOP14mo ago
[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)
読み込まれはしましたが、ログが出てきます
何か
何か14mo ago
サーバーのバージョンいくつ 1.20以上?
るび
るびOP14mo ago
はい 1.20.2のpaperサーバーです
何か
何か14mo ago
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})
るび
るびOP14mo ago
ありがとうございます、できました。 すみませんが、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 [銅製の鈍器【強化済み】] というログも消したいのですが、どうしたらいいでしょうか
何か
何か14mo ago
skriptはイチミリもできないの
るび
るびOP14mo ago
何もできないです...すみません
何か
何か14mo ago
じゃあせっかくだから
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っていうのは リスト変数で
るび
るびOP14mo ago
はい
何か
何か14mo ago
split at " "は空白で分割するやつね
るび
るびOP14mo ago
あー!
何か
何か14mo ago
a b cだったら
るび
るびOP14mo ago
Namedを消すってことですか?
何か
何か14mo ago
{split::1} = a {split::2} = b {split::3} = c になるの
るび
るびOP14mo ago
はい
何か
何か14mo ago
だから Named Entity .....だと split::1 = Named split::2 = Entity 3以降にもスペースで区切った文字が入る 英語は 多少はわかる?
るび
るびOP14mo ago
はい
何か
何か14mo ago
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
たとえばこれは Executed なんとか commands from なんとか だから
るび
るびOP14mo ago
あー!!わかりました!
何か
何か14mo ago
split::1 = Executed split::2 = なんとか split::3 = commands
るび
るびOP14mo ago
{_split::1} = named {_split::2} = entity ですね
何か
何か14mo ago
そう 必ず同じ文字にならない場所は避けて
るび
るびOP14mo ago
まじで教えるのうますぎます!! ありがとうございます!
何か
何か14mo ago
それ以外の文字が一致するかどうかで return Filter.Result.DENY を返す
るび
るびOP14mo ago
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
何か
何か14mo ago
DENY DENYsはだめだよ
るび
るびOP14mo ago
あぁすいません
何か
何か14mo ago
プログラムは一文字も 間違えちゃいけないからね
るび
るびOP14mo ago
はい!
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})
これだと出てきちゃうんですが、どこか間違えてますか?
何か
何か14mo ago
commandsは出てこない? namedだけ出る?
るび
るびOP14mo ago
はい [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 [銅製の鈍器【★★】]
何か
何か14mo ago
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})
るび
るびOP14mo ago
これって /sk reload じゃダメですか?
何か
何か14mo ago
EntityLivingのloggerに filterかけないと いけない
るび
るびOP14mo ago
やってみます できました!ありがとうございました!!
Want results from more Discord servers?
Add your server