How to get onBan event ?
fede1132 opened this issue ยท 6 comments
Hi, i want get onBan event(When staffer ban other player event), how to do that ?
Last question: When i use event.getBan().getExpires() give me the expire date in ticks/second how to get example: 14d or 2 weeks ?
You should get the unix timestamp when the ban expires.
https://github.com/BanManagement/BanManager/blob/master/src/main/java/me/confuser/banmanager/BmAPI.java#L141
From that point forward you have to calculate the date on your own. Should be an easy one.
Date date = new Date ();
date.setTime((long)unix_time*1000);