mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
fix: Permission Tag (#418)
This commit is contained in:
parent
94522c237f
commit
69fa988f97
@ -55,11 +55,11 @@ public class PermissionTag implements Tag.Activation{
|
||||
|
||||
@Override
|
||||
public boolean preActivated(TagTarget target, PlayerContainer player, ActivationData activeData, String[] argData) {
|
||||
if (target instanceof AdvancedPortal portal) {
|
||||
var portalName = portal.getName();
|
||||
if (!player.hasPermission(argData[0])) return false;
|
||||
}
|
||||
return false;
|
||||
if (!player.hasPermission(argData[1])) {
|
||||
player.sendMessage(Lang.translate("portal.error.nopermission"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -129,6 +129,7 @@ portal.error.takenname= The name given for the portal is already taken.
|
||||
portal.error.selection.differentworlds= Both the selected points need to be in the same world.
|
||||
portal.error.selection.missing= You need to select both points for the portal.
|
||||
portal.error.save= There was a problem saving the portal.
|
||||
portal.error.nopermission=You don't have permission to use that portal.
|
||||
|
||||
portal.nobuild= You don't have permission to build here!
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user