Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void serverTickEvent(ServerTickEvent event) {
- if(event.phase == Phase.END) {
- if(CasinoMod.PUBLIC_AUCTION != null) {
- int duration = CasinoMod.PUBLIC_AUCTION.getDuration();
- if(duration == 5) {
- MinecraftServer.getServer().addChatMessage(new ChatComponentText(AUCTION_PREFIX + "The auction is ending soon!"));
- }
- if(counter % 20 == 0) {
- if(duration <= 0) {
- CasinoMod.PUBLIC_AUCTION = null;
- MinecraftServer.getServer().addChatMessage(new ChatComponentText(AUCTION_PREFIX + "Auction has ended..."));
- //give items to players or return original items :)
- } else {
- CasinoMod.PUBLIC_AUCTION.decrementDuration();
- }
- } else {
- counter++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement