Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void serverTickEvent(ServerTickEvent event) {
- if(Mod.PUBLIC_FIELD != null) {
- int duration = Mod.PUBLIC_FIELD.getDuration();
- if(duration == 5) {
- MinecraftServer.getServer().addChatMessage(new ChatComponentText(PREFIX + "This ends in 5 seconds"));
- }
- if(duration <= 0) {
- Mod.PUBLIC_FIELD = null;
- MinecraftServer.getServer().addChatMessage(new ChatComponentText(PREFIX+ "This has ended..."));
- //give items to players or return original items :)
- } else {
- Mod.PUBLIC_FIELD.decrementDuration();
- }
- }
- }
Add Comment
Please, Sign In to add comment