Compatibility
Minecraft: Java Edition
1.21.1
Platforms
Supported environments
Links
Creators
Details
Licensed LGPL-3.0-only
Published 2 months ago
Updated 2 weeks ago
ķģ ėŖØė(Dependencies)
https://modrinth.com/mod/pyke-lib
주ģģ¬ķ
ė”컬ģė²ė„¼ 8080 ķ¬ķøė„¼ ģ“ģ©ķ“ģ ģ“źø° ė문ģ ė¤ė„ø ķė”ź·øėØģģ 8080 ķ¬ķøė„¼ ģ¬ģ© ģ¤ģ“ė©“ ė¬øģ ź° ė°ģķ ģ ģģµėė¤.
ėŖ ė ¹ģ“
/ķģģ°ė <ģ²/ģ¹ģ§ģ§> | ķė«ķ¼ ė”ź·øģø ģ°½ģ“ ėØė©° ģ½ź“ ėģ ģ ģ°ź²°ģ“ ė©ėė¤. (ė°©ģ” ķė©“ģ 주ģ ė
øģ¶ źøģ§)
/ģ°ėķ“ģ | ģ°ź²°ė ķģ ģ°ėģ ķ“ģ ķ©ėė¤. /ķģģ°ė ģ
ė „ģ ģ¬ģ°ź²°ė©ėė¤.
* ź“리ģ ģ ģ© -
/ķģ <player> <ģ²/ģ¹ģ§ģ§> <amount>
kubejs ģ¬ģ© ė°©ė²
const BridgeAPI = Java.loadClass("kr.pyke.integration.BridgeIntegration");
const PykeLib = Java.loadClass("kr.pyke.PykeLib");
const COLOR = Java.loadClass("kr.pyke.util.constants.COLOR");
const ArrayList = Java.loadClass("java.util.ArrayList");
BridgeAPI.DONATION_HANDLER = (player, event) => {
let server = player.server;
server.executeIfPossible(() => {
const name = player.displayName.getString(); // ė°ė ģ¬ė
const sender = event.donor(); // 볓ėøģ¬ė
const rawAmount = event.getAmount(); // ė°ģ ź°ģ (ģ¹ģ¦ ģ or ė³ķģ ģ)
const type = event.donationMessage(); // ķģ ė©ģģ§
const platform = event.platform().toString(); // ķė«ķ¼ (CHZZK, SOOP)
const formattedAmount = rawAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
let krwValue = rawAmount; // ė”ģ§ ź³ģ°ģ© ģķ ź°ģ¹
let notificationMsg = ""; // ģ±ķ
ģ°½ ģ¶ė „ ė©ģģ§
// [ė©ģģ§ ģ¤ģ ]
if (platform === "SOOP") {
krwValue = rawAmount * 100;
notificationMsg = `§7${name}§fėģ“ Ā§eė³ķģ ${formattedAmount}ź°Ā§f넼 ķģ ė°ģ¼ģ
Øģµėė¤.`;
}
else {
notificationMsg = `§7${name}§fėģ“ Ā§e${formattedAmount} ģ¹ģ¦Ā§f넼 ķģ ė°ģ¼ģ
Øģµėė¤.`;
}
sendLibMessage(player, COLOR.LIME.getColor(), notificationMsg);
// [ģ”°ź±“ė¶ ė³“ģ ģģ 1] 500,000ģ ģė¹ ķģ ģ
if (krwValue === 500000) {
let cmd = `tell ${name} 50ė§ģ ķģ ė°ģ lol`;
player.server.runCommand(cmd);
}
// [ģ”°ź±“ė¶ ė³“ģ ģģ 2] 1,000ģ ģė¹ ķģ ģ ė¤ģ“ģėŖ¬ė ģ§źø
if (krwValue === 1000) {
player.give('minecraft:diamond');
player.tell(`1ģ²ģ ė°ģģ ė¤ģ“ģėŖ¬ė ė°ģ`);
}
});
};
function sendLibMessage(player, color, message) {
if (!player) { return; }
let nativePlayer;
if (player.minecraftPlayer) { nativePlayer = player.minecraftPlayer; }
else { nativePlayer = player; }
try {
let playerList = new ArrayList();
playerList.add(nativePlayer);
PykeLib.sendSystemMessage(playerList, color, message);
}
catch (e) { console.error("ė©ģģ§ ģ ģ” ģ¤ķØ: " + e); }
}
Config
{
"chzzk": {
"clientID": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
},
"soop": {
"clientID": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}
}
API ģ ķ리ģ¼ģ“ģ ė±ė” ė°©ė²
https://developers.chzzk.naver.com/
https://developers.sooplive.co.kr/

Required Modes (Dependencies)
https://modrinth.com/mod/pyke-lib
Precautions
Since the local server uses port 8080, issues may arise if another program is already using port 8080.
Commands
/ķģģ°ė <SOOP/CHZZK> | Displays the login window; connection is established upon agreeing to the terms. (Do not expose the address on the broadcast screen)
/ģ°ėķ“ģ | Disconnects the current connection. Re-entering /ķģģ°ė will reconnect.
- Administrator Only -
/ķģ <player> <SOOP/CHZZK> <amount>
How to Use kubejs
const BridgeAPI = Java.loadClass("kr.pyke.integration.BridgeIntegration");
const PykeLib = Java.loadClass("kr.pyke.PykeLib");
const COLOR = Java.loadClass("kr.pyke.util.constants.COLOR");
const ArrayList = Java.loadClass("java.util.ArrayList");
BridgeAPI.DONATION_HANDLER = (player, event) => {
let server = player.server;
server.executeIfPossible(() => {
const name = player.displayName.getString(); // Recipient
const sender = event.donor(); // Donor nickname
const rawAmount = event.getAmount(); // Amount (Cheese or Balloons)
const type = event.donationMessage(); // Donation type
const platform = event.platform().toString(); // Platform (CHZZK, SOOP)
const formattedAmount = rawAmount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
let krwValue = rawAmount;
if (platform === "SOOP") {
krwValue = rawAmount * 100;
}
// Message logic
let notificationMsg = "";
if (platform === "SOOP") {
notificationMsg = `§7${name}§f has received a donation of §e${formattedAmount}§f balloons on SOOP.`;
} else {
notificationMsg = `§7${name}§f has received a donation of §e${formattedAmount}§f cheese on CHZZK.`;
}
sendLibMessage(player, COLOR.LIME.getColor(), notificationMsg);
// [Conditional Reward Example] When receiving 1,000 KRW value, give a diamond
if (krwValue === 1000) {
player.give('minecraft:diamond');
player.tell(`Received 1,000 KRW value, so you get a diamond`);
}
});
};
function sendLibMessage(player, color, message) {
if (!player) { return; }
let nativePlayer;
if (player.minecraftPlayer) { nativePlayer = player.minecraftPlayer; }
else { nativePlayer = player; }
try {
let playerList = new ArrayList();
playerList.add(nativePlayer);
PykeLib.sendSystemMessage(playerList, color, message);
}
catch (e) { console.error("Message send failed: " + e); }
}
Config
{
"chzzk": {
"clientID": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
},
"soop": {
"clientID": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}
}
How to Register a Cheese Bridge API Application
https://developers.chzzk.naver.com/
https://developers.sooplive.co.kr/




