mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 19:50:37 +00:00
Merge pull request #393 from jedk1/master
Update ComboManager to new ClickTypes & NPE
This commit is contained in:
commit
9e2df0a138
5 changed files with 16 additions and 9 deletions
|
@ -23,7 +23,6 @@ import org.bukkit.entity.Entity;
|
|||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -36,7 +35,7 @@ public abstract class EarthAbility extends ElementalAbility {
|
|||
private static final ConcurrentHashMap<Block, Information> MOVED_EARTH = new ConcurrentHashMap<Block, Information>();
|
||||
private static final ConcurrentHashMap<Integer, Information> TEMP_AIR_LOCATIONS = new ConcurrentHashMap<Integer, Information>();
|
||||
private static final ArrayList<Block> PREVENT_PHYSICS = new ArrayList<Block>();
|
||||
private static final ItemStack DIAMOND_PICKAXE = new ItemStack(Material.DIAMOND_PICKAXE);
|
||||
//private static final ItemStack DIAMOND_PICKAXE = new ItemStack(Material.DIAMOND_PICKAXE);
|
||||
|
||||
public EarthAbility(Player player) {
|
||||
super(player);
|
||||
|
@ -563,8 +562,8 @@ public abstract class EarthAbility extends ElementalAbility {
|
|||
if (sourceblock.getType() == Material.AIR || sourceblock.isLiquid()) {
|
||||
info.getState().update(true);
|
||||
} else {
|
||||
GeneralMethods.dropItems(block,
|
||||
GeneralMethods.getDrops(block, info.getState().getType(), info.getState().getRawData(), DIAMOND_PICKAXE));
|
||||
//GeneralMethods.dropItems(block,
|
||||
// GeneralMethods.getDrops(block, info.getState().getType(), info.getState().getRawData(), DIAMOND_PICKAXE));
|
||||
}
|
||||
|
||||
if (GeneralMethods.isAdjacentToThreeOrMoreSources(block)) {
|
||||
|
|
|
@ -75,8 +75,8 @@ public class ComboManager {
|
|||
|
||||
ArrayList<AbilityInformation> fireWheel = new ArrayList<>();
|
||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.SHIFT_DOWN));
|
||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK));
|
||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK));
|
||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK_BLOCK));
|
||||
fireWheel.add(new AbilityInformation("FireShield", ClickType.RIGHT_CLICK_BLOCK));
|
||||
fireWheel.add(new AbilityInformation("Blaze", ClickType.SHIFT_UP));
|
||||
COMBO_ABILITIES.put("FireWheel", new ComboAbilityInfo("FireWheel", fireWheel, FireCombo.class));
|
||||
DESCRIPTIONS.put("FireWheel", "A high-speed wheel of fire that travels along the ground for long distances dealing high damage.");
|
||||
|
|
|
@ -73,7 +73,13 @@ public class AirBubble extends AirAbility {
|
|||
|
||||
@Override
|
||||
public void progress() {
|
||||
if (!player.isSneaking() || !bPlayer.canBend(this)) {
|
||||
if (!player.isSneaking()) {
|
||||
remove();
|
||||
return;
|
||||
} else if (!waterBubble && !bPlayer.canBend(this)) {
|
||||
remove();
|
||||
return;
|
||||
} else if (waterBubble && !bPlayer.canBend(getAbility("WaterBubble"))) {
|
||||
remove();
|
||||
return;
|
||||
} else {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class RemoveCommand extends PKCommand {
|
|||
return;
|
||||
}
|
||||
sender.sendMessage(e.getColor() + "You have removed your " + e.toString().toLowerCase() + "bending.");
|
||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, player, e, Result.REMOVE));
|
||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerChangeElementEvent(sender, (Player) sender, e, Result.REMOVE));
|
||||
return;
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "You do not have that element!");
|
||||
|
|
|
@ -216,8 +216,10 @@ public class IceSpikeBlast extends IceAbility {
|
|||
progressing = false;
|
||||
}
|
||||
originalSource.revertBlock();
|
||||
if (player != null && player.isOnline()) {
|
||||
bPlayer.addCooldown("IceSpikeBlast", cooldown);
|
||||
}
|
||||
}
|
||||
|
||||
private void returnWater() {
|
||||
new WaterReturn(player, sourceBlock);
|
||||
|
|
Loading…
Reference in a new issue