Advertisement
Guest User

Untitled

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