|
@@ -36,6 +36,12 @@ public class TamingManager {
|
|
* @param damage The damage being absorbed by the wolf
|
|
* @param damage The damage being absorbed by the wolf
|
|
*/
|
|
*/
|
|
public void fastFoodService(Wolf wolf, int damage) {
|
|
public void fastFoodService(Wolf wolf, int damage) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.fastFoodService(player)) {
|
|
if (!permissionsInstance.fastFoodService(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -61,6 +67,12 @@ public class TamingManager {
|
|
* @param event The event to modify
|
|
* @param event The event to modify
|
|
*/
|
|
*/
|
|
public void sharpenedClaws(EntityDamageEvent event) {
|
|
public void sharpenedClaws(EntityDamageEvent event) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.sharpenedClaws(player)) {
|
|
if (!permissionsInstance.sharpenedClaws(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -78,6 +90,12 @@ public class TamingManager {
|
|
* @param event The event to modify
|
|
* @param event The event to modify
|
|
*/
|
|
*/
|
|
public void gore(EntityDamageEvent event) {
|
|
public void gore(EntityDamageEvent event) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.gore(player)) {
|
|
if (!permissionsInstance.gore(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -150,6 +168,12 @@ public class TamingManager {
|
|
* @param livingEntity The entity to examine
|
|
* @param livingEntity The entity to examine
|
|
*/
|
|
*/
|
|
public void beastLore(LivingEntity livingEntity) {
|
|
public void beastLore(LivingEntity livingEntity) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.beastLore(player)) {
|
|
if (!permissionsInstance.beastLore(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -166,6 +190,12 @@ public class TamingManager {
|
|
* @param summonAmount The amount of material needed to summon the entity
|
|
* @param summonAmount The amount of material needed to summon the entity
|
|
*/
|
|
*/
|
|
private void callOfTheWild(EntityType type, int summonAmount) {
|
|
private void callOfTheWild(EntityType type, int summonAmount) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.callOfTheWild(player)) {
|
|
if (!permissionsInstance.callOfTheWild(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -198,6 +228,12 @@ public class TamingManager {
|
|
* @param cause The damage cause of the event
|
|
* @param cause The damage cause of the event
|
|
*/
|
|
*/
|
|
private void environmentallyAware(EntityDamageEvent event, DamageCause cause) {
|
|
private void environmentallyAware(EntityDamageEvent event, DamageCause cause) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.environmentallyAware(player)) {
|
|
if (!permissionsInstance.environmentallyAware(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -230,6 +266,12 @@ public class TamingManager {
|
|
* @param cause The damage cause of the event
|
|
* @param cause The damage cause of the event
|
|
*/
|
|
*/
|
|
private void thickFur(EntityDamageEvent event, DamageCause cause) {
|
|
private void thickFur(EntityDamageEvent event, DamageCause cause) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.thickFur(player)) {
|
|
if (!permissionsInstance.thickFur(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -247,6 +289,12 @@ public class TamingManager {
|
|
* @param event The event to modify
|
|
* @param event The event to modify
|
|
*/
|
|
*/
|
|
private void shockProof(EntityDamageEvent event) {
|
|
private void shockProof(EntityDamageEvent event) {
|
|
|
|
+ if(player == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ if(permissionsInstance == null)
|
|
|
|
+ return;
|
|
|
|
+
|
|
if (!permissionsInstance.shockProof(player)) {
|
|
if (!permissionsInstance.shockProof(player)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|