1
- import { world , ItemStack , ItemTypes , EquipmentSlot , Player , ScoreboardObjective } from '@minecraft/server' ;
1
+ import { world , ItemStack , ItemTypes , EquipmentSlot , Player , ScoreboardObjective , InputMode } from '@minecraft/server' ;
2
2
import * as UI from '@minecraft/server-ui' ;
3
3
import { Util } from '../util/util' ;
4
4
import config from '../config.js' ;
@@ -12,6 +12,13 @@ import { BanManager } from '../util/BanManager';
12
12
import { Duration } from '../lib/duration/main' ;
13
13
import { getTPS } from '../util/tps' ;
14
14
15
+ const inputModeMap = {
16
+ [ InputMode . KeyboardAndMouse ] : 'KeyboardMouse' ,
17
+ [ InputMode . Gamepad ] : 'Controller' ,
18
+ [ InputMode . Touch ] : 'Touch' ,
19
+ [ InputMode . MotionController ] : 'MotionController'
20
+ }
21
+
15
22
/** @typedef {{ slot: import('@minecraft/server').ContainerSlot, slotId: EquipmentSlot | number } } ItemInformation */
16
23
17
24
/** @enum {'NameTag' | 'Lore'} */
@@ -90,7 +97,7 @@ export class AdminPanel {
90
97
`§7ID: §f${ target . id } ` ,
91
98
`§7Location: §f${ x } , ${ y } , ${ z } (${ target . dimension . id . replace ( 'minecraft:' , '' ) } )` ,
92
99
`§7GameMode: §f${ target . getGameMode ( ) } ` ,
93
- `§7Platform: §f${ target . clientSystemInfo . platformType } - ${ target . inputInfo . lastInputModeUsed } ` ,
100
+ `§7Platform: §f${ target . clientSystemInfo . platformType } ( ${ inputModeMap [ target . inputInfo . lastInputModeUsed ] } ) ` ,
94
101
`§7Health: §f${ Math . floor ( currentValue ) } / ${ effectiveMax } ` ,
95
102
`§7Permission: §f${ perm ( target ) } ` ,
96
103
target . joinedAt ? `§7JoinedAt: §f${ Util . getTime ( target . joinedAt ) } ` : null ,
@@ -299,6 +306,7 @@ export class AdminPanel {
299
306
300
307
if ( freeze !== _freeze ) {
301
308
target . inputPermissions . movementEnabled = ! freeze ;
309
+ target . inputPermissions . cameraEnabled = ! freeze ;
302
310
if ( freeze ) this . ac . frozenPlayerMap . set ( target . id , target . location ) ;
303
311
else this . ac . frozenPlayerMap . delete ( target . id ) ;
304
312
Util . notify ( `§7${ this . player . name } §r§7 >> ${ target . name } のフリーズを ${ freeze } に設定しました` ) ;
0 commit comments