Skip to content

Colla-Bot/mc-donation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mc-donation

Discord

주요 기능

  • SOOP 및 치지직 공식 OpenAPI 연동
  • 도전미션, 대결미션, 영상 후원 지원
  • 클라이언트 사이드 처리로 서버 리소스 부담 및 개인정보 처리 최소화
  • Skript 및 명령어 호출 지원

지원 버전

  • Java 17+
  • 서버 플러그인: Bukkit/Spigot API 1.13.1+
  • 클라이언트 모드: Fabric, Forge, NeoForge

플러그인 설정

plugins/donation/config.yml

# 받을 후원 개수 (별풍선 100원 단위)
# -1: 최대 개수를 초과하는 미션 후원 받기 (저금통)
acceptedDonations:
  - -1
  - 100
  - 200
# 틱당 받을 이벤트 수
limitPerTick: 5

Important

지정되지 않은 개수의 후원은 서버로 전송되지 않습니다.

연동

1. API

Maven Central Version GitHub Release Javadoc Status

의존성

<dependency>
    <groupId>bot.colla</groupId>
    <artifactId>donation-api</artifactId>
    <version>2.0.1</version>
</dependency>
compileOnly 'bot.colla:donation-api:2.0.1'

Tip

Capability 충돌이 발생할 경우, 다음과 같이 해결 전략을 지정하여야 할 수도 있습니다.

configurations.configureEach {
    resolutionStrategy.capabilitiesResolution.withCapability("org.spigotmc:spigot-api") {
        selectHighestVersion()
    }
}

플러그인 의존성

# plugin.yml
depend: [donation]

# paper-plugin.yml
dependencies:
  server:
    donation:
      load: BEFORE
      required: true
      join-classpath: true

사용법

import bot.colla.donation.event.DonationEvent;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

public class DonationListener implements Listener {
    @EventHandler
    public void onDonation(DonationEvent event) {
        Player player = event.getPlayer();
        player.sendMessage("%s님이 %s %d개를 선물하였습니다!".formatted(
                event.getNickname(), event.getType().getName(), event.getCount()));
        event.setCancelled(true);
    }
}

Note

이벤트를 처리한 경우 취소하여야 아래 명령어가 호출되지 않습니다.

2. Skript

[on] (api|donation|balloon|cheese) [received]:
  send "%event-text%님이 %event-donation type% %event-integer%개를 선물하였습니다!" to event-player
  cancel event

Tip

event-integer는 100원(별풍선 개수) 단위입니다.

3. 명령어 호출

위 이벤트가 취소되지 않았으면 /api [플레이어] [유형] [액수] [닉네임] 명령이 호출됩니다. 닉네임은 공백 또는 특수문자를 포함할 수 있습니다.

사용법

  • /[숲/치지직] [로그인/로그아웃/시작/중지]: 후원 연동 로그인, 로그아웃, 시작, 중지
  • /[숲/치지직] 테스트 [유형] [닉네임] [액수]: 테스트 이벤트 전송 (OP 권한 필요)
  • /donation reload: 플러그인 설정 리로드 (OP 또는 donation.donation 권한 필요)

Tip

  • SOOP 방송 시작 또는 재시작 시 연결에 최대 1분 가량 소요될 수 있습니다.
  • F3 디버그 화면에서 연결 상태를 확인할 수 있습니다.

후원 유형

유형 SOOP 치지직
채팅 후원 BALLOON, ADBALLOON1 CHEESE
영상 후원 VIDEO_BALLOON VIDEO_DONATION
미션 후원 CHALLENGE_MISSION2
대결미션 BATTLE_MISSION3 -

라이선스

서버 플러그인과 클라이언트 모드는 모든 권리를 보유합니다.

API, 문서 및 견본 코드는 MIT 라이선스 하에 배포됩니다. 자세한 내용은 LICENSE-API 파일을 참조하세요.

Javadoc 프로그램은 별도의 라이선스를 적용받습니다. 자세한 내용은 docs/legal을 참조하세요.

All rights reserved for server plugins and client mods.

The API, documentation, and sample code are distributed under the MIT license. Refer to the LICENSE-API file for details.

The Javadoc program is subject to a separate license. Refer to docs/legal for details.

법적 고지

SOOP Open API는 서비스 이용 정책, 치지직 API는 치지직 개발자 센터 이용약관의 적용을 받습니다.

This project contains references to the Bukkit API, which is licensed under the GNU General Public License (GPL). These references are included solely for compatibility purposes. It is our good-faith belief that such usage qualifies as fair use, as defined under applicable copyright law.

This project does not include or distribute the source code of the Bukkit API, nor does it incorporate any part of the original implementation. All references to the Bukkit API are strictly limited to publicly available interfaces, as necessary for interoperability and plugin development.

This project is not affiliated with, endorsed by, or sponsored by Bukkit, Mojang, Microsoft, SOOP, or CHZZK. All trademarks and copyrights are the property of their respective owners.

이 프로젝트는 Bukkit, Mojang, Microsoft, SOOP 또는 CHZZK과 관련이 없으며, 이들로부터 승인받거나 후원받지 않았습니다. 모든 상표권 및 저작권은 각 소유자의 재산입니다.

Footnotes

  1. VOD 또는 방송국에 후원한 경우, 방송 입장 시 알림이 표시될 때 이벤트가 발생됩니다.

  2. 미션 성공 시 이벤트가 발생되며, 개수가 5% 내 초과되어도 인정됩니다.

  3. 승리 여부에 관계 없이 후원 시 후원한 방송에 이벤트가 발생됩니다.

About

마인크래프트 숲/치지직 후원 연동 / Minecraft SOOP/CHZZK donation API

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE.md
MIT
LICENSE-API

Stars

Watchers

Forks

Languages