mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Fix an IllegalStateException related to restricted servers
This commit is contained in:
parent
4e58e01ec4
commit
82dcc68023
@ -724,7 +724,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
|
||||
if (!e.getTarget().canAccess(e.getPlayer())) {
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(getTranslation("no_server_permission"));
|
||||
if (e.getPlayer().getServer() != null) e.getPlayer().sendMessage(getTranslation("no_server_permission"));
|
||||
else e.getPlayer().disconnect(getTranslation("no_server_permission"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>net.ME1312.Galaxi</groupId>
|
||||
<artifactId>GalaxiEngine</artifactId>
|
||||
<version>18w47f</version>
|
||||
<version>18w49a</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -244,7 +244,7 @@ public final class ExHost {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error.println(e);
|
||||
engine.stop();
|
||||
engine.stop(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,8 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
|
||||
if (!e.getTarget().canAccess(e.getPlayer())) {
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(getTranslation("no_server_permission"));
|
||||
if (e.getPlayer().getServer() != null) e.getPlayer().sendMessage(getTranslation("no_server_permission"));
|
||||
else e.getPlayer().disconnect(getTranslation("no_server_permission"));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user