forked from bekvon/Residence
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Only OP can select #35
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only OP can two point selection region.
private void select(Player player, Block block, PlayerInteractEvent event) {
if (Residence.getInstance().getCompatabilityManager().isUsingExternalSelectionTool()) {
return;
}
if (!Utilities.isAdminMode(player) && !player.hasPermission("residence.select")) {
return;
}
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
Location loc = block.getLocation();
Residence.getInstance().getSelectionManager().placeLoc1(player, loc);
player.sendMessage(LocaleLoader.getString("Commands.Select.PrimaryPoint", loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
} else if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
Location loc = block.getLocation();
Residence.getInstance().getSelectionManager().placeLoc2(player, loc);
player.sendMessage(LocaleLoader.getString("Commands.Select.SecondaryPoint", loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
event.setCancelled(true);
}
Only need to change this line of code can be fine.
if (!Utilities.isAdminMode(player) && !player.hasPermission("residence.command.select")) {
return;
}
If my English is very poor, I am sorry, above content from Google translation.
The text was updated successfully, but these errors were encountered: