-
-
Project Summary: Custom Button System for Minecraft BedrockThis project is a powerful Add-on for Minecraft Bedrock Edition that enhances in-game buttons with advanced functionalities, allowing players to create automated command executors and interactive shop systems with ease.
Key Features:Command Buttons:
Buttons can be configured to execute one or multiple console commands when pressed by a player.
Supports standard Minecraft commands like give, teleport, or effect.
Provides an in-game GUI for administrators to add, edit, or remove commands linked to a button.
Sell Buttons (Shop Buttons):
Buttons can be set up to function as shop fronts, selling specific items for a defined price.
Uses a customizable scoreboard objective (e.g., "money," "coins") as the currency for transactions.
Checks the player's balance before allowing a purchase and provides feedback if funds are insufficient.
Offers an in-game GUI for administrators to set the Item ID, quantity, price, and display name for items being sold.
Admin-Friendly Management:
Players with the admin tag (or a specified equivalent) can manage buttons by sneaking (crouching) and pressing the desired button.
A GUI menu will pop up, offering options to manage Command Buttons, Sell Buttons, or configure the Scoreboard Objective used for currency.
Automatic Data Persistence:
All button configurations for both command and sell buttons, as well as the chosen scoreboard objective name, are automatically saved and loaded using the world's Dynamic Properties. This ensures that your settings persist across server restarts.
How to Use:For Regular Players: Simply press a configured button. It will execute the associated commands or initiate an item purchase as set up by the administrator.
For Administrators (Admins):
Ensure your character has the admin tag (e.g., by using the command /tag @s add admin).
Sneak (crouch) and then press the button you wish to manage.
An in-game GUI menu will appear, giving you options to:
"Manage Command Buttons": Add, edit, or remove commands associated with the button.
"Manage Sell Buttons": Configure the item, quantity, price, and display name for a shop button.
"Set Score Objective": Define the name of the scoreboard objective to be used as currency for the shop system.
สรุปโปรเจกต์: ระบบปุ่มกำหนดเองสำหรับ Minecraft Bedrockโปรเจกต์นี้คือ Add-on สำหรับ Minecraft Bedrock Edition ที่เพิ่มฟังก์ชันการทำงานขั้นสูงให้กับปุ่มในเกม ทำให้ผู้เล่นสามารถสร้างปุ่มที่มีความสามารถหลากหลาย ไม่ว่าจะเป็นการรันคำสั่งอัตโนมัติ หรือสร้างระบบร้านค้าภายในเกมได้อย่างง่ายดาย
คุณสมบัติหลัก:ปุ่ม Command (Command Buttons):
สามารถตั้งค่าให้ปุ่มรันคำสั่ง (Command) ได้ตั้งแต่หนึ่งคำสั่งขึ้นไปเมื่อมีผู้เล่นกด
รองรับคำสั่งพื้นฐานของ Minecraft เช่น give, teleport หรือ effect
มีระบบจัดการ GUI สำหรับผู้ดูแล (Admin) ในการเพิ่ม, แก้ไข, หรือลบคำสั่งที่ผูกกับปุ่ม
ปุ่มซื้อขาย (Sell Buttons / Shop Buttons):
สามารถกำหนดให้ปุ่มทำหน้าที่เป็นร้านค้า เพื่อขายไอเทมบางอย่างในราคาที่กำหนด
ใช้ระบบ Objective Scoreboard ที่ตั้งค่าได้ (เช่น "money" หรือ "coin") เป็นสกุลเงินในการซื้อขาย
จะตรวจสอบจำนวนเงินของผู้เล่นก่อนทำการซื้อขาย และแจ้งเตือนหากเงินไม่พอ
มีระบบจัดการ GUI สำหรับผู้ดูแล (Admin) ในการกำหนด Item ID, จำนวน, ราคา และชื่อที่แสดงของสินค้า
การจัดการปุ่มอย่างง่ายสำหรับผู้ดูแล (Admin-Friendly Management):
ผู้เล่นที่มีแท็ก admin (หรือแท็กอื่นที่กำหนดไว้) สามารถจัดการปุ่มได้โดยการ ย่อตัว (sneak) แล้วกดปุ่มที่ต้องการจัดการ
จะมีเมนู GUI ปรากฏขึ้นมาให้เลือกจัดการปุ่ม Command, ปุ่มซื้อขาย หรือตั้งค่า Objective Scoreboard สำหรับสกุลเงิน
บันทึกข้อมูลอัตโนมัติ (Automatic Data Persistence):
ข้อมูลการตั้งค่าปุ่ม Command และปุ่มซื้อขาย รวมถึงชื่อ Objective Scoreboard ที่ใช้ จะถูกบันทึกและโหลดโดยอัตโนมัติผ่าน Dynamic Property ของโลก ทำให้ข้อมูลไม่หายไปเมื่อเซิร์ฟเวอร์รีสตาร์ท
วิธีใช้งาน:สำหรับผู้เล่นทั่วไป: เพียงแค่กดปุ่มที่ถูกตั้งค่าไว้ ปุ่มจะทำการรัน Command หรือดำเนินการซื้อขายไอเทมตามที่กำหนดไว้
สำหรับผู้ดูแล (Admin):
ตรวจสอบให้แน่ใจว่าคุณมีแท็ก admin บนตัวละครของคุณ (ใช้คำสั่ง /tag @s add admin)
ย่อตัว (กด Shift หรือปุ่ม crouch/sneak) แล้วกดปุ่มที่คุณต้องการจัดการ
เมนู GUI จะปรากฏขึ้นเพื่อให้คุณเลือกการดำเนินการ:
"จัดการปุ่ม Command": เพิ่ม/แก้ไข/ลบคำสั่งที่ผูกกับปุ่ม
"จัดการปุ่ม ซื้อขาย": เพิ่ม/แก้ไข/ลบสินค้าและราคาสำหรับปุ่มร้านค้า
"ตั้งค่า Score Objective": กำหนดชื่อ Objective Scoreboard ที่จะใช้เป็นสกุลเงินสำหรับระบบร้านค้า
-