mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +00:00
Merge branch 'master' of https://github.com/ProjectKorra/ProjectKorra.git
This commit is contained in:
commit
74f6f312f2
3 changed files with 23 additions and 12 deletions
|
@ -5,14 +5,17 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldType;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.projectkorra.ProjectKorra.airbending.AirPassive;
|
||||
import com.projectkorra.ProjectKorra.chiblocking.ChiPassive;
|
||||
import com.projectkorra.ProjectKorra.earthbending.EarthPassive;
|
||||
import com.projectkorra.ProjectKorra.firebending.FirePassive;
|
||||
import com.projectkorra.ProjectKorra.firebending.FireStream;
|
||||
import com.projectkorra.ProjectKorra.waterbending.Plantbending;
|
||||
import com.projectkorra.ProjectKorra.waterbending.WaterPassive;
|
||||
|
||||
|
@ -42,6 +45,18 @@ public class BendingManager implements Runnable {
|
|||
EarthPassive.revertSands();
|
||||
Plantbending.regrow();
|
||||
handleDayNight();
|
||||
|
||||
for (int id: FireStream.instances.keySet()) {
|
||||
FireStream.progress(id);
|
||||
}
|
||||
|
||||
for (Block block: FireStream.ignitedblocks.keySet()) {
|
||||
if (block.getType() != Material.FIRE) {
|
||||
FireStream.ignitedblocks.remove(block);
|
||||
}
|
||||
}
|
||||
|
||||
FireStream.dissipateAll();
|
||||
} catch (Exception e) {
|
||||
Methods.stopBending();
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.projectkorra.ProjectKorra;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -207,7 +208,7 @@ public class Commands {
|
|||
|
||||
if (args.length == 2) {
|
||||
//bending display [Element]
|
||||
if (Arrays.asList(airaliases).contains(args[1])) {
|
||||
if (Arrays.asList(airaliases).contains(args[1].toLowerCase())) {
|
||||
if (AbilityModuleManager.airbendingabilities.isEmpty()) {
|
||||
s.sendMessage(ChatColor.GRAY + "There are no airbending abilities available.");
|
||||
return true;
|
||||
|
@ -217,7 +218,7 @@ public class Commands {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (Arrays.asList(wateraliases).contains(args[1])) {
|
||||
if (Arrays.asList(wateraliases).contains(args[1].toLowerCase())) {
|
||||
if (AbilityModuleManager.waterbendingabilities.isEmpty()) {
|
||||
s.sendMessage(ChatColor.AQUA + "There are no waterbending abilities available.");
|
||||
return true;
|
||||
|
@ -227,7 +228,7 @@ public class Commands {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (Arrays.asList(earthaliases).contains(args[1])) {
|
||||
if (Arrays.asList(earthaliases).contains(args[1].toLowerCase())) {
|
||||
if (AbilityModuleManager.earthbendingabilities.isEmpty()) {
|
||||
s.sendMessage(ChatColor.GREEN + "There are no earthbending abilities available.");
|
||||
return true;
|
||||
|
@ -237,7 +238,7 @@ public class Commands {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (Arrays.asList(firealiases).contains(args[1])) {
|
||||
if (Arrays.asList(firealiases).contains(args[1].toLowerCase())) {
|
||||
if (AbilityModuleManager.firebendingabilities.isEmpty()) {
|
||||
s.sendMessage(ChatColor.RED + "There are no firebending abilities available.");
|
||||
return true;
|
||||
|
@ -247,11 +248,12 @@ public class Commands {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
if (Arrays.asList(chialiases).contains(args[1])) {
|
||||
if (Arrays.asList(chialiases).contains(args[1].toLowerCase())) {
|
||||
if (AbilityModuleManager.chiabilities.isEmpty()) {
|
||||
s.sendMessage(ChatColor.GOLD + "There are no chiblocking abilities available.");
|
||||
return true;
|
||||
}
|
||||
|
||||
for (String st: AbilityModuleManager.chiabilities) {
|
||||
s.sendMessage(ChatColor.GOLD + st);
|
||||
}
|
||||
|
|
|
@ -61,10 +61,6 @@ public class FireStream {
|
|||
}
|
||||
|
||||
public boolean progress() {
|
||||
// if (Tools.isRegionProtectedFromBuild(player, Abilities.Blaze, location)) {
|
||||
// remove();
|
||||
// return false;
|
||||
// }
|
||||
if (System.currentTimeMillis() - time >= interval) {
|
||||
location = location.clone().add(direction);
|
||||
time = System.currentTimeMillis();
|
||||
|
@ -97,15 +93,13 @@ public class FireStream {
|
|||
if (Methods.isPlant(block)) {
|
||||
new Plantbending(block);
|
||||
}
|
||||
|
||||
block.setType(Material.FIRE);
|
||||
ignitedblocks.put(block, this.player);
|
||||
ignitedtimes.put(block, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public static boolean isIgnitable(Player player, Block block) {
|
||||
// if (Tools.isRegionProtectedFromBuild(player, Abilities.Blaze,
|
||||
// block.getLocation()))
|
||||
// return false;
|
||||
|
||||
Material[] overwriteable = { Material.SAPLING, Material.LONG_GRASS,
|
||||
Material.DEAD_BUSH, Material.YELLOW_FLOWER, Material.RED_ROSE,
|
||||
|
|
Loading…
Reference in a new issue