Adjustments for previous commit.

This commit is contained in:
MobiusDevelopment
2019-06-08 00:48:03 +00:00
parent 6de4ae247c
commit f07e87d3df
14 changed files with 98 additions and 84 deletions

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }

View File

@@ -40,19 +40,20 @@ public class RespawnTaskManager
for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet()) for (Entry<Spawn, List<Long>> entry : PENDING_RESPAWNS.entrySet())
{ {
final Spawn spawn = entry.getKey(); final Spawn spawn = entry.getKey();
for (Long respawnTime : entry.getValue()) final List<Long> schedules = entry.getValue();
for (Long respawnTime : schedules)
{ {
if (time > respawnTime) if (time > respawnTime)
{ {
entry.getValue().remove(respawnTime); schedules.remove(respawnTime);
if (schedules.isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
spawn.doSpawn(); spawn.doSpawn();
spawn._scheduledCount--; spawn._scheduledCount--;
} }
} }
if (entry.getValue().isEmpty())
{
PENDING_RESPAWNS.remove(spawn);
}
} }
}, 0, 1000); }, 0, 1000);
} }