Fixed players being stuck in SPECTATOR gamemode when accepting invite

This commit is contained in:
Florian CUNY 2019-12-30 16:17:10 +01:00
parent c0a38fb9eb
commit 4a209d875e
2 changed files with 0 additions and 4 deletions

View File

@ -118,8 +118,6 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
private void acceptTeamInvite(User user, Invite invite) {
// Remove the invite
itc.removeInvite(playerUUID);
// Put player into Spectator mode
user.setGameMode(GameMode.SPECTATOR);
// Get the player's island - may be null if the player has no island
Island island = getIslands().getIsland(getWorld(), playerUUID);
// Get the team's island
@ -157,7 +155,6 @@ public class IslandTeamInviteAcceptCommand extends ConfirmableCommand {
.involvedPlayer(playerUUID)
.build();
Bukkit.getPluginManager().callEvent(e);
}
private void cleanPlayer(User user) {

View File

@ -106,7 +106,6 @@ public class SafeSpotTeleportTest {
when(iwm.getAddon(Mockito.any())).thenReturn(Optional.empty());
// Player
// Return first survival and then spectator
when(player.getGameMode()).thenReturn(GameMode.SURVIVAL);
when(loc.getWorld()).thenReturn(world);
when(loc.getBlockX()).thenReturn(0);