Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Permission Tag #418

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public String description() {

@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
Expand Down
1 change: 1 addition & 0 deletions lang/src/main/resources/lang/en_GB.lang
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,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!

Expand Down
Loading