TvT fixes and improvements.

This commit is contained in:
MobiusDevelopment
2022-04-27 21:04:39 +00:00
parent cdd7f98e9b
commit f31802bd4b
23 changed files with 161 additions and 23 deletions

View File

@@ -175,6 +175,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -256,6 +260,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -275,7 +281,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -896,6 +901,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -175,6 +175,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -256,6 +260,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -275,7 +281,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -896,6 +901,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -175,6 +175,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -256,6 +260,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -275,7 +281,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -896,6 +901,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -175,6 +175,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -256,6 +260,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -275,7 +281,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -896,6 +901,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -173,6 +173,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -254,6 +258,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -273,7 +279,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -894,6 +899,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {

View File

@@ -179,6 +179,10 @@ public class TvT extends Event
} }
case "CancelParticipation": case "CancelParticipation":
{ {
if (player.isOnEvent())
{
return null;
}
// Remove the player from the IP count // Remove the player from the IP count
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0) if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
{ {
@@ -258,6 +262,8 @@ public class TvT extends Event
boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes. boolean team = getRandomBoolean(); // If teams are not even, randomize where extra player goes.
for (Player participant : PLAYER_LIST) for (Player participant : PLAYER_LIST)
{ {
participant.setOnEvent(true);
participant.setRegisteredOnEvent(false);
if (team) if (team)
{ {
BLUE_TEAM.add(participant); BLUE_TEAM.add(participant);
@@ -277,7 +283,6 @@ public class TvT extends Event
team = true; team = true;
} }
addDeathListener(participant); addDeathListener(participant);
participant.setOnEvent(true);
} }
// Make Blue CC. // Make Blue CC.
if (BLUE_TEAM.size() > 1) if (BLUE_TEAM.size() > 1)
@@ -898,6 +903,7 @@ public class TvT extends Event
removeListeners(participant); removeListeners(participant);
participant.setTeam(Team.NONE); participant.setTeam(Team.NONE);
participant.setRegisteredOnEvent(false); participant.setRegisteredOnEvent(false);
participant.setOnEvent(false);
} }
if (PVP_WORLD != null) if (PVP_WORLD != null)
{ {