Nasty bugs are nasty.

This commit is contained in:
main() 2012-02-25 13:11:21 +01:00
parent 5c48899d92
commit ccb96ead10
2 changed files with 2 additions and 1 deletions

View File

@ -135,7 +135,7 @@ public class MVPlayerListener implements Listener {
return;
} else {
this.plugin.log(Level.FINER, "Player joined AGAIN!");
if (!this.plugin.getMVPerms().hasPermission(p, "multiverse.access." + p.getWorld(), false)) {
if (!this.plugin.getMVPerms().hasPermission(p, "multiverse.access." + p.getWorld().getName(), false)) {
p.sendMessage("[MV] - Sorry you can't be in this world anymore!");
this.sendPlayerToDefaultWorld(p);
}

View File

@ -308,6 +308,7 @@ public class TestWorldProperties {
mockPlayer = mock(Player.class);
when(mockPlayer.getWorld()).thenReturn(mvWorld.getCBWorld());
when(mockPlayer.hasPlayedBefore()).thenReturn(true);
when(mockPlayer.hasPermission("multiverse.access.world")).thenReturn(true);
playerChatEvent = PowerMockito.mock(PlayerChatEvent.class);
when(playerChatEvent.getPlayer()).thenReturn(mockPlayer);
when(playerChatEvent.getFormat()).thenReturn("format");