# Minecraft Quick Command Reference ## RCON — Send a command from CT 644 ### Server 1 (mc1, port 25575) ```bash ssh pve112 "pct exec 644 -- python3 -c \" import socket, struct, time def rcon(cmd): s = socket.socket(); s.settimeout(5); s.connect(('127.0.0.1', 25575)) def pkt(i,t,p): p=p.encode()+b'\x00\x00'; return struct.pack(' ` | | Give item | `give ` | | Set gamemode | `gamemode creative/survival/spectator ` | | Get player position | `data get entity Pos` | | List online players | `list` | | Get world border size | `worldborder get` | | Set world border | `worldborder set ` | | Shrink world border | `worldborder add - ` | ## God Kit (1.21 syntax) ``` give netherite_helmet[enchantments={protection:4,unbreaking:3,mending:1,respiration:3,aqua_affinity:1}] give netherite_chestplate[enchantments={protection:4,unbreaking:3,mending:1}] give netherite_leggings[enchantments={protection:4,unbreaking:3,mending:1}] give netherite_boots[enchantments={protection:4,unbreaking:3,mending:1,feather_falling:4,depth_strider:3}] give netherite_sword[enchantments={sharpness:5,unbreaking:3,mending:1,looting:3,fire_aspect:2,sweeping_edge:3}] give bow[enchantments={power:5,unbreaking:3,infinity:1,flame:1,punch:2}] give netherite_pickaxe[enchantments={efficiency:5,unbreaking:3,mending:1,fortune:3}] give netherite_axe[enchantments={efficiency:5,unbreaking:3,mending:1,sharpness:5}] give arrow 64 give golden_apple 64 give totem_of_undying 4 give ender_pearl 16 give cooked_beef 64 ``` --- ## Shrinkborder Datapack (in-game, op required) | Command | Effect | |---|---| | `/function shrinkborder:enable` | Start death-shrinking | | `/function shrinkborder:disable` | Stop death-shrinking | | `/function shrinkborder:reset` | Reset border to 1000x1000, disable shrinking | --- ## Services on CT 644 ```bash # Access CT ssh pve112 "pct exec 644 -- bash" # God mode watcher (mc1 - slingshooter08 auto creative) systemctl start/stop/status mc-godmode.service # Shrink world kit watcher (shrink-world - auto kit on first join + stats) systemctl start/stop/status mc-shrink-kit.service # MCSManager itself systemctl start/stop/status mcsm-web.service systemctl start/stop/status mcsm-daemon.service ``` --- ## Datapacks — Deploy to shrink-world server ```bash # From this machine (CT 629), copy a datapack folder to the server DEST=/opt/mcsmanager/daemon/data/InstanceData/shrinkborder1234567890abcdef12345/world/datapacks/ # Then reload in-game or via RCON: # datapack enable "file/" # reload ``` --- ## Kit Record — Reset a player's first-join kit ```bash ssh pve112 "pct exec 644 -- cat /opt/mcsmanager/daemon/data/InstanceData/shrinkborder1234567890abcdef12345/kit_given.json" # To reset a specific player (edit the JSON): ssh pve112 "pct exec 644 -- nano /opt/mcsmanager/daemon/data/InstanceData/shrinkborder1234567890abcdef12345/kit_given.json" ```