mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-11 03:30:10 +00:00
Fixed conflicted error
This commit is contained in:
commit
c2878ba36a
18 changed files with 1268 additions and 1488 deletions
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/LocalServer/BukkitForPlugins.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/TagAPI.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/LocalServer/BukkitForPlugins.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/Factions.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/GriefPrevention.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/mcore.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/PreciousStones.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/TagAPI.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/Towny.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/WorldEdit.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/Shawn/Documents/Bending Plugins/WorldGuard.jar"/>
|
||||
|
|
Binary file not shown.
|
@ -5,7 +5,6 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.projectkorra.ProjectKorra;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
@ -67,9 +66,7 @@ public class BendingManager implements Runnable {
|
|||
long time;
|
||||
long interval;
|
||||
|
||||
ArrayList<World> worlds = new ArrayList<World>();
|
||||
ConcurrentHashMap<World, Boolean> nights = new ConcurrentHashMap<World, Boolean>();
|
||||
ConcurrentHashMap<World, Boolean> days = new ConcurrentHashMap<World, Boolean>();
|
||||
private final HashMap<String, Time> dayNight = new HashMap<>();
|
||||
|
||||
static final String defaultsunrisemessage = "You feel the strength of the rising sun empowering your firebending.";
|
||||
static final String defaultsunsetmessage = "You feel the empowering of your firebending subside as the sun sets.";
|
||||
|
@ -143,15 +140,15 @@ public class BendingManager implements Runnable {
|
|||
for (Player player : EarthArmor.instances.keySet()) {
|
||||
EarthArmor.moveArmor(player);
|
||||
}
|
||||
for (int ID: AirSwipe.instances.keySet()) {
|
||||
for (int ID : AirSwipe.instances.keySet()) {
|
||||
AirSwipe.progress(ID);
|
||||
}
|
||||
for (int ID: Tornado.instances.keySet()) {
|
||||
for (int ID : Tornado.instances.keySet()) {
|
||||
Tornado.progress(ID);
|
||||
}
|
||||
|
||||
Tremorsense.manage(Bukkit.getServer());
|
||||
for (int id: FireStream.instances.keySet()) {
|
||||
for (int id : FireStream.instances.keySet()) {
|
||||
FireStream.progress(id);
|
||||
}
|
||||
|
||||
|
@ -159,29 +156,29 @@ public class BendingManager implements Runnable {
|
|||
EarthBlast.progress(ID);
|
||||
}
|
||||
|
||||
for (Block block: FireStream.ignitedblocks.keySet()) {
|
||||
for (Block block : FireStream.ignitedblocks.keySet()) {
|
||||
if (block.getType() != Material.FIRE) {
|
||||
FireStream.ignitedblocks.remove(block);
|
||||
}
|
||||
}
|
||||
|
||||
for (int ID: Catapult.instances.keySet()) {
|
||||
for (int ID : Catapult.instances.keySet()) {
|
||||
Catapult.progress(ID);
|
||||
}
|
||||
|
||||
for (int ID: EarthColumn.instances.keySet()) {
|
||||
for (int ID : EarthColumn.instances.keySet()) {
|
||||
EarthColumn.progress(ID);
|
||||
}
|
||||
|
||||
for (int ID: CompactColumn.instances.keySet()) {
|
||||
for (int ID : CompactColumn.instances.keySet()) {
|
||||
CompactColumn.progress(ID);
|
||||
}
|
||||
|
||||
for (int ID: WaterManipulation.instances.keySet()) {
|
||||
for (int ID : WaterManipulation.instances.keySet()) {
|
||||
WaterManipulation.progress(ID);
|
||||
}
|
||||
|
||||
for (int ID: WaterWall.instances.keySet()) {
|
||||
for (int ID : WaterWall.instances.keySet()) {
|
||||
WaterWall.progress(ID);
|
||||
}
|
||||
|
||||
|
@ -209,65 +206,104 @@ public class BendingManager implements Runnable {
|
|||
}
|
||||
|
||||
public void handleDayNight() {
|
||||
for (World world: plugin.getServer().getWorlds()) {
|
||||
if (world.getWorldType() == WorldType.NORMAL && !worlds.contains(world)) {
|
||||
worlds.add(world);
|
||||
nights.put(world, false);
|
||||
days.put(world, false);
|
||||
}
|
||||
}
|
||||
ArrayList<World> removeworlds = new ArrayList<World>();
|
||||
for (World world: worlds) {
|
||||
if (!plugin.getServer().getWorlds().contains(world)) {
|
||||
removeworlds.add(world);
|
||||
continue;
|
||||
}
|
||||
boolean night = nights.get(world);
|
||||
boolean day = days.get(world);
|
||||
if (Methods.isDay(world) && !day) {
|
||||
for (Player player: world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Fire) && player.hasPermission("bending.message.daymessage")) {
|
||||
player.sendMessage(ChatColor.RED + defaultsunrisemessage);
|
||||
/**
|
||||
* This code is ran on startup, it adds all loaded worlds to the
|
||||
* hashmap.
|
||||
*/
|
||||
if (dayNight.size() < 1) {
|
||||
for (World world : plugin.getServer().getWorlds()) {
|
||||
if (world.getWorldType() == WorldType.NORMAL) {
|
||||
String worldName = world.getName();
|
||||
if (dayNight.containsKey(worldName))
|
||||
return;
|
||||
if (Methods.isDay(world)) {
|
||||
dayNight.put(worldName, Time.DAY);
|
||||
} else {
|
||||
dayNight.put(worldName, Time.NIGHT);
|
||||
}
|
||||
}
|
||||
days.replace(world, true);
|
||||
}
|
||||
|
||||
if (!Methods.isDay(world) && day) {
|
||||
for (Player player: world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Fire) && player.hasPermission("bending.message.daymessage")) {
|
||||
player.sendMessage(ChatColor.RED + defaultsunsetmessage);
|
||||
}
|
||||
}
|
||||
days.replace(world, false);
|
||||
}
|
||||
|
||||
if (Methods.isNight(world) && !night) {
|
||||
for (Player player: world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Water) && player.hasPermission("bending.message.nightmessage")) {
|
||||
if (Methods.isFullMoon(world)) {
|
||||
player.sendMessage(ChatColor.AQUA + defaultfullmoonrisemessage);
|
||||
} else {
|
||||
player.sendMessage(ChatColor.AQUA + defaultmoonrisemessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
nights.replace(world, true);
|
||||
}
|
||||
|
||||
if (!Methods.isNight(world) && night) {
|
||||
for (Player player: world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Water) && player.hasPermission("bending.message.nightmessage")) {
|
||||
player.sendMessage(ChatColor.AQUA + defaultmoonsetmessage);
|
||||
}
|
||||
}
|
||||
nights.replace(world, false);
|
||||
}
|
||||
}
|
||||
|
||||
for (World world: removeworlds) {
|
||||
worlds.remove(world);
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
final String worldName = world.getName();
|
||||
if (!dayNight.containsKey(worldName))
|
||||
return;
|
||||
Time time = dayNight.get(worldName);
|
||||
if (Methods.isDay(world) && time.equals(Time.NIGHT)) {
|
||||
final Time newTime = Time.DAY;
|
||||
sendFirebenderMessage(world, newTime);
|
||||
dayNight.remove(worldName);
|
||||
dayNight.put(worldName, newTime);
|
||||
}
|
||||
|
||||
if (!Methods.isDay(world) && time.equals(Time.DAY)) {
|
||||
final Time newTime = Time.NIGHT;
|
||||
sendFirebenderMessage(world, newTime);
|
||||
dayNight.remove(worldName);
|
||||
dayNight.put(worldName, newTime);
|
||||
}
|
||||
|
||||
if (Methods.isNight(world) && time.equals(Time.DAY)) {
|
||||
final Time newTime = Time.NIGHT;
|
||||
sendWaterbenderMessage(world, newTime);
|
||||
dayNight.remove(worldName);
|
||||
dayNight.put(worldName, newTime);
|
||||
}
|
||||
|
||||
if (!Methods.isNight(world) && time.equals(Time.NIGHT)) {
|
||||
final Time newTime = Time.DAY;
|
||||
sendWaterbenderMessage(world, Time.DAY);
|
||||
dayNight.remove(worldName);
|
||||
dayNight.put(worldName, newTime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static enum Time {
|
||||
DAY, NIGHT;
|
||||
}
|
||||
|
||||
private void sendFirebenderMessage(World world, Time time) {
|
||||
if (time.equals(Time.DAY)) {
|
||||
for (Player player : world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Fire)
|
||||
&& player.hasPermission("bending.message.daymessage")) {
|
||||
player.sendMessage(ChatColor.RED + defaultsunrisemessage);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (Player player : world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Fire)
|
||||
&& player.hasPermission("bending.message.daymessage")) {
|
||||
player.sendMessage(ChatColor.RED + defaultsunsetmessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendWaterbenderMessage(World world, Time time) {
|
||||
if (time.equals(Time.NIGHT)) {
|
||||
for (Player player : world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Water)
|
||||
&& player.hasPermission("bending.message.nightmessage")) {
|
||||
if (Methods.isFullMoon(world)) {
|
||||
player.sendMessage(ChatColor.AQUA
|
||||
+ defaultfullmoonrisemessage);
|
||||
} else {
|
||||
player.sendMessage(ChatColor.AQUA
|
||||
+ defaultmoonrisemessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (Player player : world.getPlayers()) {
|
||||
if (Methods.isBender(player.getName(), Element.Water)
|
||||
&& player.hasPermission("bending.message.nightmessage")) {
|
||||
player.sendMessage(ChatColor.AQUA + defaultmoonsetmessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -478,7 +478,7 @@ public class Commands {
|
|||
s.sendMessage(ChatColor.RED + "You don't have permission to do that.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (isToggledForAll) { // Bending is toggled off for all players.
|
||||
isToggledForAll = false;
|
||||
for (Player player: Bukkit.getOnlinePlayers()) {
|
||||
|
@ -521,6 +521,12 @@ public class Commands {
|
|||
}
|
||||
if (Methods.isBender(un, Element.Water)) {
|
||||
s.sendMessage(Methods.getWaterColor() + "- Waterbender");
|
||||
if (Methods.canPlantbend(p)) {
|
||||
s.sendMessage(Methods.getWaterColor() + " Can Plantbend");
|
||||
}
|
||||
if (Methods.canBloodbend(p)) {
|
||||
s.sendMessage(Methods.getWaterColor() + " Can Bloodbend");
|
||||
}
|
||||
}
|
||||
if (Methods.isBender(un, Element.Earth)) {
|
||||
if (Methods.canMetalbend(p)) {
|
||||
|
@ -540,9 +546,28 @@ public class Commands {
|
|||
s.sendMessage("Abilities: ");
|
||||
for (int i = 1; i <= 9; i++) {
|
||||
String ability = bPlayer.getAbilities().get(i);
|
||||
if (ability != null) s.sendMessage(i + " - " + Methods.getAbilityColor(ability) + ability);
|
||||
if (ability == null || ability.equalsIgnoreCase("null")) {
|
||||
continue;
|
||||
} else {
|
||||
s.sendMessage(i + " - " + Methods.getAbilityColor(ability) + ability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (p.getName().equalsIgnoreCase("MistPhizzle") ||
|
||||
p.getName().equalsIgnoreCase("runefist")
|
||||
|| p.getName().equalsIgnoreCase("Jacklin213")
|
||||
|| p.getName().equalsIgnoreCase("kingbirdy")
|
||||
|| p.getName().equalsIgnoreCase("cpdances")
|
||||
|| p.getName().equalsIgnoreCase("sampepere")) {
|
||||
s.sendMessage(ChatColor.YELLOW + "ProjectKorra Developer");
|
||||
}
|
||||
if (p.getName().equalsIgnoreCase("vidcom")
|
||||
|| p.getName().equalsIgnoreCase("Zolteex")
|
||||
|| p.getName().equalsIgnoreCase("zmeduna")
|
||||
|| p.getName().equalsIgnoreCase("ashe36")) {
|
||||
s.sendMessage(ChatColor.YELLOW + "ProjectKorra Concept Designer");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (args.length == 1) {
|
||||
|
|
|
@ -68,6 +68,7 @@ public class ConfigManager {
|
|||
config.addDefault("Properties.Water.CanBendWithWeapons", true);
|
||||
config.addDefault("Properties.Water.NightFactor", 1.5);
|
||||
config.addDefault("Properties.Water.FullMoonFactor", 3.0);
|
||||
config.addDefault("Properties.Water.CanBendPackedIce", true);
|
||||
|
||||
config.addDefault("Properties.Earth.RevertEarthbending", true);
|
||||
config.addDefault("Properties.Earth.SafeRevert", true);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,7 +16,6 @@ import com.projectkorra.ProjectKorra.Flight;
|
|||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
|
||||
|
||||
public class AirBlast {
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.projectkorra.ProjectKorra.airbending;
|
|||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.projectkorra.ProjectKorra.airbending;
|
|||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.HashMap;
|
|||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.projectkorra.ProjectKorra.airbending;
|
|||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
|
|
|
@ -23,8 +23,7 @@ public class AirSuction {
|
|||
public static ConcurrentHashMap<Integer, AirSuction> instances = new ConcurrentHashMap<Integer, AirSuction>();
|
||||
private static ConcurrentHashMap<String, Long> cooldowns = new ConcurrentHashMap<String, Long>();
|
||||
private static ConcurrentHashMap<Player, Location> origins = new ConcurrentHashMap<Player, Location>();
|
||||
// private static ConcurrentHashMap<Player, Long> timers = new
|
||||
// ConcurrentHashMap<Player, Long>();
|
||||
|
||||
static final long soonesttime = config.getLong("Properties.GlobalCooldown");
|
||||
static final double maxspeed = AirBlast.maxspeed;
|
||||
|
||||
|
@ -36,7 +35,6 @@ public class AirSuction {
|
|||
private static double affectingradius = config.getDouble("Abilities.Air.AirSuction.Radius");
|
||||
private static double pushfactor = config.getDouble("Abilities.Air.AirSuction.Push");
|
||||
private static double originselectrange = 10;
|
||||
// private static long interval = AirBlast.interval;
|
||||
|
||||
private Location location;
|
||||
private Location origin;
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.projectkorra.ProjectKorra.airbending;
|
|||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.bukkit.block.Block;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.projectkorra.ProjectKorra.BendingPlayer;
|
||||
import com.projectkorra.ProjectKorra.Methods;
|
||||
import com.projectkorra.ProjectKorra.ProjectKorra;
|
||||
import com.projectkorra.ProjectKorra.Ability.AvatarState;
|
||||
|
|
|
@ -38,6 +38,7 @@ Properties:
|
|||
CanBendWithWeapons: false
|
||||
NightFactor: 1.5
|
||||
FullMoonFactor: 3.0
|
||||
CanBendPackedIce: true
|
||||
Earth:
|
||||
RevertEarthbending: true
|
||||
SafeRevert: true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: ProjectKorra
|
||||
author: ProjectKorra
|
||||
version: 1.3.0 BETA 6
|
||||
version: 1.3.0 BETA 8
|
||||
main: com.projectkorra.ProjectKorra.ProjectKorra
|
||||
commands:
|
||||
projectkorra:
|
||||
|
|
Loading…
Reference in a new issue