개인 자료란 (JE)

  서버 커뮤니티

Profile [MCNC]멜론쥬스0157 대표칭호 없음
Profile

커뮤니티 소통 잡담하기

플러그인좀 도와주세요

2018.04.12 조회 수 169 추천 수 0

아레의 글은 제가 인터넷에 올린 플러그인 소스글에 답변온 소스 팁인대 이걸 기반으로 플러그인좀 만들어주세요

카톡:makedreamkr

 

 

0down voteaccept

I won't give you the full code but some tips. It exists an event called ServerListPingEvent. Just create a command which saves the amount of likes in a YAML-File (that's really easy)). The next thing you need to do is to set up this ServerListPingEvent and to use the method event.setMotd(). Create a method to read out the likes from the saved YAML-File and use them in event.setMotd().

Code example:

@EventHandler
public void onServerListPing(ServerListPingEvent event) {
    int likes = (int) YMLReader.getObject(YOUR PATH); //or just config.getInt(YOUR PATH)

    event.setMotd(">> " + likes + " people like the server <<");
}



2개의 댓글

설의생 아이유
2018.05.08

기본적인 지식이 요구 됩니다, https://blog.naver.com/jchoij7514/220642595100 참고하시고 직접 만들어 보세요. 필독: MOTD는 CommandHelper로도 플러그인 없이 간단히 제작이 가능합니다. 

잔순
2020.04.27

엄청 복잡해보인당

뉴스 및 창작물
/files/thumbnails/268/789/003/262x150.crop.jpg?20240515192032

레드스톤

벌레먹은 돌 빠르게 제거하는 법

GlassesFilm

2024-05-15

0

/files/thumbnails/797/788/003/262x150.crop.jpg?20240515090924

건축

마인크래프트로 구현한 카르카손 보드게임

Warak

2024-05-15

1

/files/thumbnails/487/784/003/262x150.crop.jpg?20240508233607

모드

Windows Borderless 모드에서 악성코드 발견 2

학교가기싫다

2024-05-08

1

/files/thumbnails/384/778/003/262x150.crop.jpg?20240512002324

업데이트

마인크래프트 자바 에디션 스냅샷 24w18a

학교가기싫다

2024-05-06

0

/files/thumbnails/855/781/003/262x150.crop.jpg?20240505141129

레드스톤

레이저 클리너

GlassesFilm

2024-05-05

1