mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 10:36:17 +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
|
@Override
|
||||||
public boolean preActivated(TagTarget target, PlayerContainer player, ActivationData activeData, String[] argData) {
|
public boolean preActivated(TagTarget target, PlayerContainer player, ActivationData activeData, String[] argData) {
|
||||||
if (target instanceof AdvancedPortal portal) {
|
if (!player.hasPermission(argData[1])) {
|
||||||
var portalName = portal.getName();
|
player.sendMessage(Lang.translate("portal.error.nopermission"));
|
||||||
if (!player.hasPermission(argData[0])) return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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.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.selection.missing= You need to select both points for the portal.
|
||||||
portal.error.save= There was a problem saving 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!
|
portal.nobuild= You don't have permission to build here!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user