Skip to content

Commit

Permalink
Forgot to push, oops
Browse files Browse the repository at this point in the history
  • Loading branch information
cjburkey01 committed Jul 25, 2017
1 parent 97cb583 commit 596a704
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
return true;
}
Player p = (Player) sender;
if (!Utils.hasPerm(p, "claimchunk.claim")) {
Utils.toPlayer(p, Utils.getConfigColor("errorColor"), Utils.getLang("NoPermToAccess"));
return true;
}
if (args.length != 1) {
Utils.msg(sender, Utils.getConfigColor("errorColor") + Utils.getLang("AccessArgUsage"));
Utils.msg(sender, Utils.getConfigColor("errorColor") + " " + Utils.getLang("AccessHelp"));
Expand Down
1 change: 1 addition & 0 deletions src/main/java/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ langChunkAlreadyNotClaimed: 'This chunk is not owned.'
langNotYourChunk: 'You do not own this chunk.'
langChunkUnclaimed: 'Chunk unclaimed!'

landNoPermToAccess: 'You do not have permission to give access to chunks.'
langAccessArgUsage: 'Usage: /accesschunks <player>'
langAccessHelp: 'Gives <player> access to interact with all blocks in your claimed chunks.'
langHasAccess: '%%PLAYER%% now has access to your chunks.'
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ permission:
claimchunk.unclaim:
description: 'Allow unclaiming of one''s own chunks.'
default: true
claimchunk.access:
description: 'Allow giving access to other players on one''s chunks.'
default: true

commands:
claimchunk:
Expand Down

0 comments on commit 596a704

Please sign in to comment.