mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Added bypass nodes for offline inspecting & long-distance inspecting.
Also fixed some JavaDoc typos.
This commit is contained in:
@ -46,7 +46,6 @@ public class CommandHelper {
|
||||
*
|
||||
* @param inspect The player to retrieve stats for
|
||||
* @param display The sender to display stats to
|
||||
* @param online true if the player to retrieve stats for is online, false otherwise
|
||||
*/
|
||||
public static void printGatheringSkills(Player inspect, CommandSender display) {
|
||||
if (Skills.hasGatheringSkills(inspect)) {
|
||||
@ -85,7 +84,6 @@ public class CommandHelper {
|
||||
*
|
||||
* @param inspect The player to retrieve stats for
|
||||
* @param display The sender to display stats to
|
||||
* @param online true if the player to retrieve stats for is online, false otherwise
|
||||
*/
|
||||
public static void printCombatSkills(Player inspect, CommandSender display) {
|
||||
if (Skills.hasCombatSkills(inspect)) {
|
||||
@ -124,7 +122,6 @@ public class CommandHelper {
|
||||
*
|
||||
* @param inspect The player to retrieve stats for
|
||||
* @param display The sender to display stats to
|
||||
* @param online true if the player to retrieve stats for is online, false otherwise
|
||||
*/
|
||||
public static void printMiscSkills(Player inspect, CommandSender display) {
|
||||
if (Skills.hasMiscSkills(inspect)) {
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
|
||||
import com.gmail.nossr50.Users;
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.mcPermissions;
|
||||
import com.gmail.nossr50.commands.CommandHelper;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -39,7 +40,7 @@ public class InspectCommand implements CommandExecutor {
|
||||
if (target.isOnline()) {
|
||||
Player player = (Player) target;
|
||||
|
||||
if (sender instanceof Player && !sender.isOp() && !m.isNear(((Player) sender).getLocation(), player.getLocation(), 5.0)) {
|
||||
if (sender instanceof Player && !sender.isOp() && !m.isNear(((Player) sender).getLocation(), player.getLocation(), 5.0) && !mcPermissions.getInstance().inspectDistanceBypass((Player) sender)) {
|
||||
sender.sendMessage(mcLocale.getString("Inspect.TooFar"));
|
||||
return true;
|
||||
}
|
||||
@ -53,7 +54,7 @@ public class InspectCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if (sender instanceof Player && !sender.isOp()) {
|
||||
if (sender instanceof Player && !sender.isOp() && !mcPermissions.getInstance().inspectOfflineBypass((Player) sender)) {
|
||||
sender.sendMessage(mcLocale.getString("Inspect.Offline"));
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user