|
@@ -17,7 +17,6 @@
|
|
package com.gmail.nossr50.skills;
|
|
package com.gmail.nossr50.skills;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
-import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.Material;
|
|
import org.bukkit.Material;
|
|
import org.bukkit.World;
|
|
import org.bukkit.World;
|
|
import org.bukkit.block.Block;
|
|
import org.bukkit.block.Block;
|
|
@@ -30,7 +29,6 @@ import org.bukkit.Bukkit;
|
|
import com.gmail.nossr50.Users;
|
|
import com.gmail.nossr50.Users;
|
|
import com.gmail.nossr50.m;
|
|
import com.gmail.nossr50.m;
|
|
import com.gmail.nossr50.mcMMO;
|
|
import com.gmail.nossr50.mcMMO;
|
|
-import com.gmail.nossr50.datatypes.AbilityType;
|
|
|
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
import com.gmail.nossr50.datatypes.SkillType;
|
|
import com.gmail.nossr50.datatypes.SkillType;
|
|
import com.gmail.nossr50.locale.mcLocale;
|
|
import com.gmail.nossr50.locale.mcLocale;
|
|
@@ -229,44 +227,6 @@ public class WoodCutting
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public static void treeFellerCheck(Player player)
|
|
|
|
- {
|
|
|
|
- PlayerProfile PP = Users.getProfile(player);
|
|
|
|
- if(m.isAxes(player.getItemInHand()))
|
|
|
|
- {
|
|
|
|
- /*
|
|
|
|
- * CHECK FOR AXE PREP MODE
|
|
|
|
- */
|
|
|
|
- if(PP.getAxePreparationMode())
|
|
|
|
- PP.setAxePreparationMode(false);
|
|
|
|
-
|
|
|
|
- int ticks = 2;
|
|
|
|
- int x = PP.getSkillLevel(SkillType.WOODCUTTING);
|
|
|
|
-
|
|
|
|
- while(x >= 50)
|
|
|
|
- {
|
|
|
|
- x-=50;
|
|
|
|
- ticks++;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if(!PP.getTreeFellerMode() && Skills.cooldownOver(player, (PP.getSkillDATS(AbilityType.TREE_FELLER)*1000), LoadProperties.treeFellerCooldown))
|
|
|
|
- {
|
|
|
|
- player.sendMessage(mcLocale.getString("Skills.TreeFellerOn"));
|
|
|
|
- for(Player y : player.getWorld().getPlayers())
|
|
|
|
- {
|
|
|
|
- if(y != null && y != player && m.getDistance(player.getLocation(), y.getLocation()) < 10)
|
|
|
|
- y.sendMessage(mcLocale.getString("Skills.TreeFellerPlayer", new Object[] {player.getName()}));
|
|
|
|
- }
|
|
|
|
- PP.setSkillDATS(AbilityType.TREE_FELLER, System.currentTimeMillis()+(ticks*1000));
|
|
|
|
- PP.setTreeFellerMode(true);
|
|
|
|
- }
|
|
|
|
- if(!PP.getTreeFellerMode() && !Skills.cooldownOver(player, (PP.getSkillDATS(AbilityType.TREE_FELLER)*1000), LoadProperties.treeFellerCooldown)){
|
|
|
|
- player.sendMessage(ChatColor.RED+"You are too tired to use that ability again."
|
|
|
|
- +ChatColor.YELLOW+" ("+Skills.calculateTimeLeft(player, (PP.getSkillDATS(AbilityType.TREE_FELLER)*1000), LoadProperties.treeFellerCooldown)+"s)");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public static void woodcuttingBlockCheck(Player player, Block block, mcMMO plugin)
|
|
public static void woodcuttingBlockCheck(Player player, Block block, mcMMO plugin)
|
|
{
|
|
{
|
|
PlayerProfile PP = Users.getProfile(player);
|
|
PlayerProfile PP = Users.getProfile(player);
|