[MCNC]멜론쥬스0157
대표칭호 없음
아레의 글은 제가 인터넷에 올린 플러그인 소스글에 답변온 소스 팁인대 이걸 기반으로 플러그인좀 만들어주세요
카톡:makedreamkr
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 <<");
}
설의생 아이유
2018.05.08기본적인 지식이 요구 됩니다, https://blog.naver.com/jchoij7514/220642595100 참고하시고 직접 만들어 보세요. 필독: MOTD는 CommandHelper로도 플러그인 없이 간단히 제작이 가능합니다.
잔순
2020.04.27엄청 복잡해보인당