Advertisement
Guest User

Untitled

a guest
Jan 4th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. @SubscribeEvent
  2. public void serverTickEvent(ServerTickEvent event) {
  3. if(event.phase == Phase.END) {
  4. if(CasinoMod.PUBLIC_AUCTION != null) {
  5. int duration = CasinoMod.PUBLIC_AUCTION.getDuration();
  6.  
  7. if(duration == 5) {
  8. MinecraftServer.getServer().addChatMessage(new ChatComponentText(AUCTION_PREFIX + "The auction is ending soon!"));
  9. }
  10.  
  11. if(counter % 20 == 0) {
  12. if(duration <= 0) {
  13. CasinoMod.PUBLIC_AUCTION = null;
  14. MinecraftServer.getServer().addChatMessage(new ChatComponentText(AUCTION_PREFIX + "Auction has ended..."));
  15. //give items to players or return original items :)
  16. } else {
  17. CasinoMod.PUBLIC_AUCTION.decrementDuration();
  18. }
  19. } else {
  20. counter++;
  21. }
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement