What are you searching for?

CheeseBridge
CheeseBridge

CheeseBridge

A Minecraft mod that integrates Chzzk donations with the game in real-time.

download 9 Downloads · favorite 0 Followers · Updated 1 week ago
Fabric Social Utility 1.21.1

Versions

inventory_2
CheeseBridge 1.1.0

1.1.0 · 1 week ago · 1,002.60 KB

Release download
Fabric 1.21.1

Gallery

About

필수 모드(Dependencies)

https://modrinth.com/mod/pyke-lib

주의사항

로컬서버를 8080 포트를 이용해서 열기 때문에 다른 프로그램에서 8080 포트를 사용 중이면 문제가 발생할 수 있습니다.

명령어

/후원연동 | 치지직 로그인 창이 뜨며 약관 동의 시 연결이 됩니다. (방송 화면에 주소 노출 금지)
/연동해제 | 연결된 연결을 해제합니다. /후원연동 입력시 재연결됩니다.

- 관리자 전용 -
/후원 <player> <amount>

kubejs 사용 방법

const CheeseBridgeAPI = Java.loadClass("kr.pyke.integration.ChzzkBridge");
const PykeLib = Java.loadClass("kr.pyke.PykeLib");
const COLOR = Java.loadClass("kr.pyke.util.constants.COLOR");

CheeseBridgeAPI.DONATION_HANDLER = (player, event) => {
    let server = player.server;

    server.executeIfPossible(() => {
        const name = player.name.string;         // 받는 사람 (플레이어)
        const sender = event.donor();            // 보낸 사람 (후원자 닉네임)
        const amount = event.getAmount();        // 받은 후원 금액 (int)
        const message = event.donationMessage(); // 후원 메시지 (String)

        // [메시지 설정]
        // COLOR 상수는 RED, GOLD, YELLOW, LIME, AQUA, BLUE, PURPLE 등을 사용할 수 있습니다.
        // COLOR.LIME.getColor() 대신 0xFFFFFF 같은 Hex 코드를 직접 넣어도 됩니다.
        
        // PykeLib.sendSystemMessage(...); // 일반 채팅 메시지
        PykeLib.sendBroadcastMessage(      // 위아래 공백이 포함된 강조형 전체 메시지
            server.players, 
            COLOR.LIME.getColor(), 
            `§7${name}§f님이 §e${amount.toLocaleString()}치즈§f를 후원 받으셨습니다.`
        ); 

        // [조건부 보상 예시 1] 500,000원 후원 시
        if (amount === 500000) {
            let cmd = `tell ${name} 50만원 후원 받음 lol`;
            player.server.runCommand(cmd);
        }

        // [조건부 보상 예시 2] 1,000원 후원 시 다이아몬드 지급
        if (amount === 1000) {
            player.give('minecraft:diamond');
            player.tell(`1천원 받아서 다이아몬드 받음`);
        }
    });
};

Config

{
  "clientID": "YOUR_CLIENT_ID",
  "clientSecret": "YOUR_CLIENT_SECRET"
}

치지직 API 애플리케이션 등록 방법

https://developers.chzzk.naver.com/ chzzk_app_auth

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

/후원연동 | Displays the CheeseBridge 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> <amount>

How to Use kubejs

const CheeseBridgeAPI = Java.loadClass(“kr.pyke.integration.ChzzkBridge”);
const PykeLib = Java.loadClass(“kr.pyke.PykeLib”);
const COLOR = Java.loadClass(“kr.pyke.util.constants.COLOR”);

CheeseBridgeAPI.DONATION_HANDLER = (player, event) => {
    let server = player.server;

    server.executeIfPossible(() => {
    const name = player.name.string;         // Recipient (player)
    const sender = event.donor();            // Sender (donor nickname)
    const amount = event.getAmount();        // Donation amount received (int)
    const message = event.donationMessage(); // Donation message (String)

        // [Message Configuration]
        // COLOR constants include RED, GOLD, YELLOW, LIME, AQUA, BLUE, PURPLE, etc.
        // You can also directly input Hex codes like 0xFFFFFF instead of COLOR.LIME.getColor().
        
        // PykeLib.sendSystemMessage(...); // General chat message
        PykeLib.sendBroadcastMessage(      // Full message with top/bottom spacing for emphasis
            server.players, 
            COLOR.LIME.getColor(), 
            `§7${name}§f has received a donation of §e${amount.toLocaleString()}cheese§f.`
        ); 
        
        // [Conditional Reward Example 1] When donating 500,000 won
        if (amount === 500000) {
            let cmd = `tell ${name} 500,000 won donation received lol`;
            player.server.runCommand(cmd);
        }

        // [Conditional Reward Example 2] When donating 1,000 KRW, give a diamond
        if (amount === 1000) {
            player.give(‘minecraft:diamond’);
            player.tell(`Received 1,000 KRW, so you get a diamond`);
        }
    });
};

Config

{
  “clientID”: “YOUR_CLIENT_ID”,
  “clientSecret”: “YOUR_CLIENT_SECRET”
}

How to Register a Cheese Bridge API Application

https://developers.chzzk.naver.com/ chzzk_app_auth

open_in_new View on Modrinth
Compatibility
Client: Required Server: Required
gavel LGPL-3.0-only

Conversation

What are your thoughts?

Related projects

Optimization Utility
FerriteCore
FerriteCore

by malte0811

Memory usage optimizations

download 84.3M
favorite 12,712
Utility
Mod Menu
Mod Menu

by Prospector

Adds a mod menu to view the list of mods you have installed.

download 77.7M
favorite 22,127
Library Management Utility
YetAnotherConfigLib (YACL)
YetAnotherConfigLib (YACL)

by isxander

A builder-based configuration library for Minecraft!

download 66.1M
favorite 7,607
Adventure Transportation Utility
Xaero's Minimap
Xaero's Minimap

by thexaero

Displays a map of the nearby world terrain, players, mobs, entities in the corner of your screen. Lets you create waypoints which help you find the locations you've marked.

download 60.9M
favorite 13,668
lock Cookie consent

SkinMC uses cookies to provide functionality and features.