mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-29 20:24:44 +02:00
Updating permissions for consistency.
This commit is contained in:
@ -16,7 +16,6 @@ public class ArcheryManager {
|
||||
private Player player;
|
||||
private PlayerProfile profile;
|
||||
private int skillLevel;
|
||||
private Permissions permissionsInstance;
|
||||
|
||||
private float dazeBonusMax = advancedConfig.getDazeBonusMax();
|
||||
private float dazeMaxBonusLevel = advancedConfig.getDazeMaxBonusLevel();
|
||||
@ -32,7 +31,6 @@ public class ArcheryManager {
|
||||
return;
|
||||
|
||||
this.skillLevel = profile.getSkillLevel(SkillType.ARCHERY);
|
||||
this.permissionsInstance = Permissions.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -44,17 +42,14 @@ public class ArcheryManager {
|
||||
if(player == null)
|
||||
return;
|
||||
|
||||
if(permissionsInstance == null)
|
||||
return;
|
||||
|
||||
if (!permissionsInstance.trackArrows(player)) {
|
||||
if (!Permissions.trackArrows(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ArrowTrackingEventHandler eventHandler = new ArrowTrackingEventHandler(this, livingEntity);
|
||||
|
||||
int randomChance = 100;
|
||||
if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
||||
if (Permissions.luckyArchery(player)) {
|
||||
randomChance = (int) (randomChance * 0.75);
|
||||
}
|
||||
final float chance = (float) (((double) retrieveBonusMax / (double) retrieveMaxBonusLevel) * skillLevel);
|
||||
@ -73,10 +68,7 @@ public class ArcheryManager {
|
||||
if(player == null)
|
||||
return;
|
||||
|
||||
if(permissionsInstance == null)
|
||||
return;
|
||||
|
||||
if (!permissionsInstance.daze(player)) {
|
||||
if (!Permissions.daze(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -84,7 +76,7 @@ public class ArcheryManager {
|
||||
|
||||
int randomChance = 100;
|
||||
|
||||
if (player.hasPermission("mcmmo.perks.lucky.archery")) {
|
||||
if (Permissions.luckyArchery(player)) {
|
||||
randomChance = (int) (randomChance * 0.75);
|
||||
}
|
||||
|
||||
@ -104,10 +96,7 @@ public class ArcheryManager {
|
||||
if(player == null)
|
||||
return;
|
||||
|
||||
if(permissionsInstance == null)
|
||||
return;
|
||||
|
||||
if (!permissionsInstance.archeryBonus(player)) {
|
||||
if (!Permissions.archeryBonus(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user