mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
parent
ab7a83b37e
commit
9354831729
@ -36,6 +36,9 @@ public class ArcheryManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.trackArrows(player)) {
|
if (!permissionsInstance.trackArrows(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -63,6 +66,9 @@ public class ArcheryManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.daze(player)) {
|
if (!permissionsInstance.daze(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -90,6 +96,9 @@ public class ArcheryManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.archeryBonus(player)) {
|
if (!permissionsInstance.archeryBonus(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,9 @@ public class SwordsManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.swordsBleed(player)) {
|
if (!permissionsInstance.swordsBleed(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -52,6 +55,12 @@ public class SwordsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void counterAttackChecks(LivingEntity attacker, int damage) {
|
public void counterAttackChecks(LivingEntity attacker, int damage) {
|
||||||
|
if(player == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.counterAttack(player)) {
|
if (!permissionsInstance.counterAttack(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -75,6 +84,12 @@ public class SwordsManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void serratedStrikes(LivingEntity target, int damage) {
|
public void serratedStrikes(LivingEntity target, int damage) {
|
||||||
|
if(player == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.serratedStrikes(player)) {
|
if (!permissionsInstance.serratedStrikes(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.fastFoodService(player)) {
|
if (!permissionsInstance.fastFoodService(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -67,6 +70,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.sharpenedClaws(player)) {
|
if (!permissionsInstance.sharpenedClaws(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -87,6 +93,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.gore(player)) {
|
if (!permissionsInstance.gore(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -162,6 +171,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.beastLore(player)) {
|
if (!permissionsInstance.beastLore(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -181,6 +193,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.callOfTheWild(player)) {
|
if (!permissionsInstance.callOfTheWild(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -216,6 +231,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.environmentallyAware(player)) {
|
if (!permissionsInstance.environmentallyAware(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -251,6 +269,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.thickFur(player)) {
|
if (!permissionsInstance.thickFur(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -271,6 +292,9 @@ public class TamingManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.shockProof(player)) {
|
if (!permissionsInstance.shockProof(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,9 @@ public class UnarmedManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.disarm(player)) {
|
if (!permissionsInstance.disarm(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -64,6 +67,9 @@ public class UnarmedManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.deflect(player)) {
|
if (!permissionsInstance.deflect(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -91,6 +97,9 @@ public class UnarmedManager {
|
|||||||
if(player == null)
|
if(player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!permissionsInstance.unarmedBonus(player)) {
|
if (!permissionsInstance.unarmedBonus(player)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -111,6 +120,9 @@ public class UnarmedManager {
|
|||||||
if(defender == null)
|
if(defender == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(permissionsInstance == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!permissionsInstance.ironGrip(defender)) {
|
if (!permissionsInstance.ironGrip(defender)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -507,7 +507,13 @@ public class Skills {
|
|||||||
* @param xp the amount of XP to gain
|
* @param xp the amount of XP to gain
|
||||||
*/
|
*/
|
||||||
public static void xpProcessing(Player player, PlayerProfile profile, SkillType type, int xp) {
|
public static void xpProcessing(Player player, PlayerProfile profile, SkillType type, int xp) {
|
||||||
|
if(player == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (type.getPermissions(player)) {
|
if (type.getPermissions(player)) {
|
||||||
|
if(Users.getPlayer(player) == null)
|
||||||
|
return;
|
||||||
|
|
||||||
Users.getPlayer(player).addXP(type, xp);
|
Users.getPlayer(player).addXP(type, xp);
|
||||||
xpCheckSkill(type, player, profile);
|
xpCheckSkill(type, player, profile);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user