示例#1
0
 public static void addSeconds(final Player player, final int seconds) {
   if (!b******g.fdsjfhkdsjfdsjhk().getServerHandler().isEOTW()
       && DTRBitmaskType.SAFE_ZONE.appliesAt(player.getLocation())) {
     return;
   }
   if (isTagged(player)) {
     final int secondsTaggedFor =
         (int)
             ((SpawnTagHandler.spawnTags.get(player.getName()) - System.currentTimeMillis())
                 / 1000L);
     final int newSeconds = Math.min(secondsTaggedFor + seconds, 60);
     SpawnTagHandler.spawnTags.put(
         player.getName(), System.currentTimeMillis() + newSeconds * 1000L);
   } else {
     player.sendMessage(
         ChatColor.YELLOW + "You have been spawn-tagged for §c" + seconds + " §eseconds!");
     SpawnTagHandler.spawnTags.put(player.getName(), System.currentTimeMillis() + seconds * 1000L);
   }
 }
示例#2
0
 public static boolean isTagged(final Player player) {
   return SpawnTagHandler.spawnTags.containsKey(player.getName())
       && SpawnTagHandler.spawnTags.get(player.getName()) > System.currentTimeMillis();
 }
示例#3
0
 public static long getTag(final Player player) {
   return SpawnTagHandler.spawnTags.get(player.getName()) - System.currentTimeMillis();
 }