mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-23 07:41:39 +01:00
Fixed players being stuck in SPECTATOR gamemode when accepting invite
This commit is contained in:
parent
c0a38fb9eb
commit
4a209d875e
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user