disable sendPlayerToDefaultWorld() if not intercept Teleport or Portal

This commit is contained in:
cs8425 2021-06-23 22:37:51 +08:00
parent 126d9ed7f6
commit c714f357ae

View File

@ -128,6 +128,7 @@ public class MVPlayerListener implements Listener {
} else {
Logging.finer("Player joined AGAIN!");
if (this.plugin.getMVConfig().getEnforceAccess() // check this only if we're enforcing access!
&& (this.plugin.getMVConfig().getTeleportIntercept() && this.plugin.getMVConfig().getPortalIntercept()) // only all method Intercept will force send
&& !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);