Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 4 commits
  • 17 files changed
  • 0 commit comments
  • 2 contributors
Commits on Aug 09, 2012
Jonathan Back to 1.0.7, things are not done. Bugs everywhere. bb8f69e
Commits on Aug 10, 2012
Jonathan Merged the pull request entirely. d9c9b6c
Commits on Aug 12, 2012
@superlode Merge remote-tracking branch 'origin/master'
Conflicts:
	Bending2/.devbuild/MinecraftTLA_v1.0.7.jar
	Bending2/src/main/BendingManager.java
4d50e02
@superlode TagApi test 945e2bc
View
5 Bending2/.classpath
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="C:/Users/Alex/Desktop/Bukkit Related/McMyAdmin 2 -- 1.1/Minecraft/CraftBukkit.jar"/>
<classpathentry kind="lib" path="C:/Users/Alex/Desktop/Bukkit Related/McMyAdmin 2 -- 1.1/Minecraft/plugins/WorldEdit.jar"/>
<classpathentry kind="lib" path="C:/Users/Alex/Desktop/Bukkit Related/McMyAdmin 2 -- 1.1/Minecraft/plugins/Worldguard.jar"/>
- <classpathentry kind="lib" path="C:/Users/Alex/Downloads/PreciousStones.jar"/>
+ <classpathentry kind="lib" path="C:/Users/Alex/Downloads/PreciousStones.jar"/>
+ <classpathentry kind="lib" path="C:/Users/Alex/Downloads/TagAPI.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
View
BIN  Bending2/.devbuild/MinecraftTLA_v1.0.7.jar
Binary file not shown
View
6 Bending2/plugin.yml
@@ -1,6 +1,6 @@
name: Bending
main: main.Bending
-version: 1.0.8
+version: 1.0.7
commands:
bending:
description: Chooses the many features of Bending.
@@ -303,4 +303,6 @@ permissions:
bending.chiblocker.FastPunch:
default: op
bending.water.IceSpike:
- default: true
+ default: true
+ bending.chiblocker.Paralyze:
+ default: op
View
33 Bending2/src/chiblocker/HighJump.java
@@ -1,33 +0,0 @@
-package chiblocker;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.entity.Player;
-import org.bukkit.util.Vector;
-
-public class HighJump {
-
- private int jumpheight = 1;
- private long cooldown = 10000;
-
- private Map<String, Long> cooldowns = new HashMap<String, Long>();
-
- public HighJump(Player p){
- jump(p);
- }
-
- private void jump(Player p) {
- if (cooldowns.containsKey(p.getName()) && cooldowns.get(p.getName()) + cooldown >= System.currentTimeMillis())
- return;
- if (p.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.AIR)
- return;
- Vector vec = p.getVelocity();
- vec.setY(jumpheight);
- p.setVelocity(vec);
- cooldowns.put(p.getName(), System.currentTimeMillis());
- return;
- }
- }
View
92 Bending2/src/chiblocker/RapidPunch.java
@@ -1,92 +0,0 @@
-package chiblocker;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import net.minecraft.server.Packet18ArmAnimation;
-
-import org.bukkit.craftbukkit.entity.CraftPlayer;
-import org.bukkit.entity.Entity;
-import org.bukkit.entity.LivingEntity;
-import org.bukkit.entity.Player;
-
-import tools.Tools;
-
-public class RapidPunch {
-
- private static int damage = 1;
- private int distance = 8;
- private long cooldown = 15000;
- private static int punches = 2;
-
- private static Map<String, Long> cooldowns = new HashMap<String,Long>();
- public static ConcurrentHashMap<Player, Entity> targets = new ConcurrentHashMap<Player, Entity>();
- private static Map<String, Integer> numpunches = new HashMap<String, Integer>();
- public static Map<String, Long> timers = new HashMap<String, Long>();
- public static List<Player> punching = new ArrayList<Player>();
-
- public RapidPunch(Player p) {//, Entity t) {
- if (targets.contains(p))
- return;
- if (cooldowns.containsKey(p.getName()) && cooldowns.get(p.getName()) + cooldown >= System.currentTimeMillis())
- return;
- double lowestdistance = distance + 1;
- Entity t = null;
- for (Entity entity : Tools.getEntitiesAroundPoint(p.getEyeLocation(), distance)) {
- if (Tools.getDistanceFromLine(p.getEyeLocation().getDirection(), p.getEyeLocation(),
- entity.getLocation()) <= 2
- && (entity instanceof LivingEntity)
- && (entity.getEntityId() != p.getEntityId())) {
- double distance = p.getEyeLocation().distance(entity.getLocation());
- if (distance < lowestdistance) {
- t = entity;
- lowestdistance = distance;
- }
- }
- }
- if (t == null)
- return;
- targets.put(p , t);
- numpunches.put(p.getName(), 0);
- }
-
- public static void startPunch(Player p) {
- if (numpunches.get(p.getName()) >= punches)
- //punching.remove(p);
- targets.remove(p);
- Entity t = targets.get(p);
- //((LivingEntity)t).setHealth(((LivingEntity)t).getHealth() - damage);
- if (t instanceof LivingEntity && t != null){
- //Tools.damageEntity(p, t, damage);
- LivingEntity lt = (LivingEntity)t;
- lt.setNoDamageTicks(0);
- //int finalhealth = (lt.getHealth() - damage < 0)? 0:(lt.getHealth() - damage);
- //lt.setHealth(finalhealth);
- lt.damage(damage, p);
- lt.setNoDamageTicks(0);
- }
- //((LivingEntity)t).damage(damage);
- //Tools.damageEntity(p, t, damage);
- cooldowns.put(p.getName(), System.currentTimeMillis());
- swing(p);
- int incr = numpunches.get(p.getName());
- incr++;
- numpunches.put(p.getName(), incr);
-
- }
-
- private static void swing(Player p) {
- //punching.add(p);
- timers.put(p.getName(), System.currentTimeMillis());
- Packet18ArmAnimation packet = new Packet18ArmAnimation();
- packet.a = p.getEntityId();
- packet.b = (byte)1;
- for (Player observer : p.getWorld().getPlayers())
- ((CraftPlayer)observer).getHandle().netServerHandler.sendPacket(packet);
- Tools.verbose("Swingning" + p.getName());
- }
-
-}
View
7 Bending2/src/chiblocking/HighJump.java
@@ -16,13 +16,14 @@
private Map<String, Long> cooldowns = new HashMap<String, Long>();
public HighJump(Player p) {
+ if (cooldowns.containsKey(p.getName())
+ && cooldowns.get(p.getName()) + cooldown >= System
+ .currentTimeMillis())
+ return;
jump(p);
}
private void jump(Player p) {
- if (cooldowns.containsKey(p.getName()))
- if (cooldowns.get(p.getName()) + cooldown >= System.currentTimeMillis())
- return;
if (p.getLocation().getBlock().getRelative(BlockFace.DOWN)
.getType() == Material.AIR)
return;
View
4 Bending2/src/chiblocking/Paralyze.java
@@ -0,0 +1,4 @@
+package chiblocking;
+
+public class Paralyze {
+}
View
70 Bending2/src/chiblocking/RapidPunch.java
@@ -20,79 +20,57 @@
private static int damage = 1;
private int distance = 8;
private long cooldown = 15000;
- private static int punches = 2;
+ private static int punches = 5;
private static Map<String, Long> cooldowns = new HashMap<String, Long>();
- public static ConcurrentHashMap<Player, Entity> targets = new ConcurrentHashMap<Player, Entity>();
- private static Map<String, Integer> numpunches = new HashMap<String, Integer>();
- public static Map<String, Long> timers = new HashMap<String, Long>();
+ public static ConcurrentHashMap<Player, RapidPunch> instance = new ConcurrentHashMap<Player, RapidPunch>();
+ private int numpunches;
+ //private long timers;
+ private Entity target;
public static List<Player> punching = new ArrayList<Player>();
public RapidPunch(Player p) {// , Entity t) {
- if (targets.contains(p))
+ if (instance.contains(p))
return;
if (cooldowns.containsKey(p.getName())
&& cooldowns.get(p.getName()) + cooldown >= System
.currentTimeMillis())
return;
- double lowestdistance = distance + 1;
- Entity t = null;
- for (Entity entity : Tools.getEntitiesAroundPoint(p.getEyeLocation(),
- distance)) {
- if (Tools.getDistanceFromLine(p.getEyeLocation().getDirection(),
- p.getEyeLocation(), entity.getLocation()) <= 2
- && (entity instanceof LivingEntity)
- && (entity.getEntityId() != p.getEntityId())) {
- double distance = p.getEyeLocation().distance(
- entity.getLocation());
- if (distance < lowestdistance) {
- t = entity;
- lowestdistance = distance;
- }
- }
- }
+
+ Entity t = Tools.getTargettedEntity(p, distance);
+
if (t == null)
return;
- targets.put(p, t);
- numpunches.put(p.getName(), 0);
+
+ target = t;
+ numpunches= 0;
+ instance.put(p, this);
+ Tools.verbose("PUNCH MOFO");
}
- public static void startPunch(Player p) {
- if (numpunches.get(p.getName()) >= punches)
- // punching.remove(p);
- targets.remove(p);
- Entity t = targets.get(p);
- // ((LivingEntity)t).setHealth(((LivingEntity)t).getHealth() - damage);
- if (t instanceof LivingEntity && t != null) {
- // Tools.damageEntity(p, t, damage);
- LivingEntity lt = (LivingEntity) t;
- lt.setNoDamageTicks(0);
- // int finalhealth = (lt.getHealth() - damage < 0)?
- // 0:(lt.getHealth() - damage);
- // lt.setHealth(finalhealth);
- lt.damage(damage, p);
+ public void startPunch(Player p) {
+ if (numpunches >= punches)
+ instance.remove(p);
+ if (target instanceof LivingEntity && target != null) {
+ LivingEntity lt = (LivingEntity) target;
+ Tools.damageEntity(p, target, damage);
lt.setNoDamageTicks(0);
+ Tools.verbose("PUNCHIN MOFO");
}
- // ((LivingEntity)t).damage(damage);
- // Tools.damageEntity(p, t, damage);
cooldowns.put(p.getName(), System.currentTimeMillis());
swing(p);
- int incr = numpunches.get(p.getName());
- incr++;
- numpunches.put(p.getName(), incr);
-
+ numpunches++;
}
- private static void swing(Player p) {
+ private void swing(Player p) {
// punching.add(p);
- timers.put(p.getName(), System.currentTimeMillis());
+ //timers = System.currentTimeMillis();
Packet18ArmAnimation packet = new Packet18ArmAnimation();
packet.a = p.getEntityId();
packet.b = (byte) 1;
for (Player observer : p.getWorld().getPlayers())
((CraftPlayer) observer).getHandle().netServerHandler
.sendPacket(packet);
- // Tools.verbose("Swingning" + p.getName());
}
public static String getDescription() {
View
34 Bending2/src/firebending/WallOfFire.java
@@ -5,11 +5,11 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-
+
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
-import org.bukkit.World;
+import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Entity;
@@ -23,7 +23,7 @@
import tools.ConfigManager;
import tools.Tools;
-public class WallOfFire {
+public class WallOfFire {
private static int ID = Integer.MIN_VALUE;
private int id;
@@ -36,7 +36,7 @@
private int damage = ConfigManager.wallOfFireDamage;
private static long interval = ConfigManager.wallOfFireInterval;
private static long cooldown = ConfigManager.wallOfFireCooldown;
- public static ConcurrentHashMap<Integer, WallOfFire> instances = new ConcurrentHashMap<Integer, WallOfFire>();
+ public static ConcurrentHashMap<Integer, WallOfFire> instances = new ConcurrentHashMap<Integer, WallOfFire>();
private static Map<Player, Long> durations = new HashMap<Player, Long>();
private static Map<Player, Long> intervals = new HashMap<Player, Long>();
private static Map<Player, Location> locations = new HashMap<Player, Location>();
@@ -45,13 +45,13 @@
private static Map<Player, List<Location>> blockslocation = new HashMap<Player, List<Location>>();
private static Map<Entity, Long> damaged = new HashMap<Entity, Long>();
private static long damageinterval = 1000;
-
-
-
+
+
+
public WallOfFire(Player player) {
if (ID >= Integer.MAX_VALUE) {
ID = Integer.MIN_VALUE;
- }
+ }
id = ID++;
this.player = player;
instances.put(id, this);
@@ -81,11 +81,11 @@ public WallOfFire(Player player) {
(double) duration, world);
damage = (int) Tools.firebendingDayAugment((double) damage,
world);
- }
+ }
WallOfFireStart(player);
}
}
-
+
public void WallOfFireStart(Player p) {
durations.put(p, System.currentTimeMillis());
intervals.put(p, System.currentTimeMillis());
@@ -97,7 +97,7 @@ public void WallOfFireStart(Player p) {
if (!tblock.isEmpty() || !FireStream.isIgnitable(tblock)) {
instances.remove(p);
durations.remove(p);
- }
+ }
}
public static void manageWallOfFire(int ID) {
@@ -144,8 +144,8 @@ public static void manageWallOfFire(int ID) {
blocks.add(loca);
block.getWorld().playEffect(loca,
Effect.MOBSPAWNER_FLAMES, 1, 20);
- blockslocation.put(p, blocks);
- }
+ blockslocation.put(p, blocks);
+ }
}
}
}
@@ -180,18 +180,18 @@ public static void manageWallOfFire(int ID) {
.getZ()) * 0.2));
en.setFireTicks(81);
damaged.put(en, System.currentTimeMillis());
- }
+ }
}
}
}
}
}
}
- }
+ }
public static String getDescription() {
return "To use this ability, click at a location. A wall of fire "
+ "will appear at this location, igniting enemies caught in it "
+ "and blocking projectiles.";
- }
-}
+ }
+}
View
24 Bending2/src/main/Bending.java
@@ -76,7 +76,8 @@
public final BendingManager manager = new BendingManager(this);
public final BendingListener listener = new BendingListener(this);
-
+ public final TagAPIListener Taglistener = new TagAPIListener();
+
private static Map<String, String> commands = new HashMap<String, String>();
public static ConcurrentHashMap<String, List<BendingType>> benders = new ConcurrentHashMap<String, List<BendingType>>();
@@ -119,6 +120,11 @@ public void onEnable() {
chiblockingabilities = Abilities.getChiBlockingAbilities();
getServer().getPluginManager().registerEvents(listener, this);
+
+ if (Bukkit.getPluginManager().getPlugin("TagAPI") != null
+ && ConfigManager.useTagAPI){
+ getServer().getPluginManager().registerEvents(Taglistener, this);
+ }
getServer().getScheduler().scheduleSyncRepeatingTask(this, manager, 0,
1);
@@ -1122,6 +1128,22 @@ else if (args[0].equalsIgnoreCase("display") && player != null
sender.sendMessage(ChatColor.AQUA + "Imported BendingPlayers to MySQL.");
return true;
}
+ if (args[0].equalsIgnoreCase("check"))
+ {
+ for (String players: benders.keySet()){
+ sender.sendMessage(players + " :" + benders.get(players).size());
+ sender.sendMessage(Tools.isBender(players) ? "True" : "False");
+ sender.sendMessage(ChatColor.RED + (Tools.isBender(players, BendingType.Fire) ? "True" : "False"));
+ sender.sendMessage(ChatColor.AQUA + (Tools.isBender(players, BendingType.Water) ? "True" : "False"));
+ sender.sendMessage(ChatColor.GRAY + (Tools.isBender(players, BendingType.Air) ? "True" : "False"));
+ sender.sendMessage(ChatColor.GREEN + (Tools.isBender(players, BendingType.Earth) ? "True" : "False"));
+ sender.sendMessage(ChatColor.GOLD + (Tools.isBender(players, BendingType.ChiBlocker) ? "True" : "False"));
+ for (BendingType type: benders.get(players)){
+ sender.sendMessage(ChatColor.AQUA + type.toString());
+ }
+
+ }
+ }
}
sender.sendMessage(ChatColor.RED
+ "Use /bending help <page> if you want to see a list of commands.");
View
45 Bending2/src/main/BendingListener.java
@@ -70,6 +70,7 @@
import airbending.Speed;
import airbending.Tornado;
import chiblocking.HighJump;
+import chiblocking.Paralyze;
import chiblocking.RapidPunch;
import earthbending.Catapult;
import earthbending.Collapse;
@@ -385,46 +386,20 @@ public void onPlayerSwing(PlayerAnimationEvent event) {
new AvatarState(player);
}
- if (Tools.canBend(player, Tools.getBendingAbility(player))) {
-
- if (Tools.getBendingAbility(player) == Abilities.HighJump) {
- new HighJump(player);
- }
-
- if (Tools.getBendingAbility(player) == Abilities.RapidPunch
- && !RapidPunch.punching.contains(player)) {
- if (RapidPunch.timers.containsKey(player.getName())){
- if (RapidPunch.timers.get(player.getName()) + 1000 <= System.currentTimeMillis()){
- new RapidPunch(player);
- }
- } else {
- new RapidPunch(player);
- }
- }
-
+ if (Tools.getBendingAbility(player) == Abilities.HighJump) {
+ new HighJump(player);
}
- if (Tools.canBend(player, Tools.getBendingAbility(player))) {
-
- if (Tools.getBendingAbility(player) == Abilities.HighJump) {
- new HighJump(player);
- }
-
- if (Tools.getBendingAbility(player) == Abilities.RapidPunch
- && !RapidPunch.punching.contains(player)) {
- if (RapidPunch.timers.containsKey(player.getName())) {
- if (RapidPunch.timers.get(player.getName()) + 1000 <= System
- .currentTimeMillis()) {
- new RapidPunch(player);
- }
- } else {
- new RapidPunch(player);
- }
- }
-
+ if (Tools.getBendingAbility(player) == Abilities.RapidPunch) {
+ new RapidPunch(player);
+ }
+
+ if (Tools.getBendingAbility(player) == Abilities.Paralyze) {
+ //new Paralyze(player);
}
}
+
}
@EventHandler
View
34 Bending2/src/main/BendingManager.java
@@ -14,7 +14,8 @@
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
-import chiblocker.RapidPunch;
+import chiblocking.RapidPunch;
+
import tools.Abilities;
import tools.AvatarState;
@@ -24,9 +25,9 @@
import tools.Tools;
import waterbending.Bloodbending;
import waterbending.FastSwimming;
-import waterbending.FreezeMelt;
-import waterbending.HealingWaters;
-import waterbending.IceSpike;
+import waterbending.FreezeMelt;
+import waterbending.HealingWaters;
+import waterbending.IceSpike;
import waterbending.WaterManipulation;
import waterbending.WaterPassive;
import waterbending.WaterSpout;
@@ -160,9 +161,8 @@ private void manageEarthbending() {
}
for (Player player : EarthArmor.instances.keySet()) {
- EarthArmor.moveArmor(player);
- }
-
+ EarthArmor.moveArmor(player);
+ }
EarthPassive.revertSands();
Tremorsense.manage(plugin.getServer());
@@ -236,8 +236,8 @@ private void manageFirebending() {
Fireball.fireballs.remove(entity);
}
}
- for (int ID : WallOfFire.instances.keySet()) {
- WallOfFire.manageWallOfFire(ID);
+ for (Player player : WallOfFire.instance.keySet()) {
+ WallOfFire.instance.get(player).progress();
}
@@ -254,8 +254,8 @@ private void manageFirebending() {
}
private void manageChiBlocking() {
- for (Player p : RapidPunch.targets.keySet())
- RapidPunch.startPunch(p);
+ for (Player p : RapidPunch.instance.keySet())
+ RapidPunch.instance.get(p).startPunch(p);
}
private void manageWaterbending() {
@@ -279,8 +279,12 @@ private void manageWaterbending() {
for (int ID : IceSpike.instances.keySet()) {
IceSpike.instances.get(ID).progress();
+ }
+
+ for (int ID : IceSpike.instances.keySet()) {
+ IceSpike.instances.get(ID).progress();
}
-
+
Bloodbending.progressAll();
HealingWaters.heal(plugin.getServer());
@@ -485,7 +489,7 @@ private void handleVerbosity() {
// lightnings = Lightning.instances.size();
int walloffireplayers = 0;
- walloffires = WallOfFire.instances.size();
+ walloffires = WallOfFire.instance.size();
int bloodbendings, freezemelts, watermanipulations, waterspouts, waterwalls, waves;
@@ -627,5 +631,5 @@ private void verbose(String name, int instances, int players,
}
Tools.writeToLog(name + ": " + instances + " instances for " + players
+ " players.");
- }
-}
+ }
+}
View
27 Bending2/src/main/StorageManager.java
@@ -7,9 +7,13 @@
import java.util.Arrays;
import java.util.List;
+import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
+import org.kitteh.tag.TagAPI;
+import org.kitteh.tag.TagAPIException;
+
import tools.Abilities;
import tools.BendingType;
import tools.ConfigManager;
@@ -59,6 +63,13 @@ public void removeBending(Player player) {
}
List<BendingType> templist = new ArrayList<BendingType>();
Bending.benders.put(player.getName(), templist);
+ if (Bukkit.getPluginManager().isPluginEnabled("TagAPI")
+ && ConfigManager.useTagAPI)
+ try {
+ TagAPI.refreshPlayer(player);
+ } catch (TagAPIException e){
+
+ }
//Bending.benders.remove(player.getName());
return;
}
@@ -141,7 +152,7 @@ public boolean isBender(String player, BendingType type) {
&& type == BendingType.Fire) {
return true;
}
- if (config.getKey(player).contains("f")
+ if (config.getKey(player).contains("c")
&& type == BendingType.ChiBlocker) {
return true;
}
@@ -281,6 +292,13 @@ public void setBending(Player player, BendingType type) {
List<BendingType> templist = new ArrayList<BendingType>();
templist.add(type);
Bending.benders.put(player.getName(), templist);
+ if (Bukkit.getPluginManager().isPluginEnabled("TagAPI")
+ && ConfigManager.useTagAPI)
+ try {
+ TagAPI.refreshPlayer(player);
+ } catch (TagAPIException e){
+
+ }
}
public void setBending(Player player, String type) {
@@ -355,6 +373,13 @@ else if (StorageManager.useMySQL) {
templist.add(type);
}
Bending.benders.put(player.getName(), templist);
+ if (Bukkit.getPluginManager().isPluginEnabled("TagAPI")
+ && ConfigManager.useTagAPI)
+ try {
+ TagAPI.refreshPlayer(player);
+ } catch (TagAPIException e){
+
+ }
}
View
37 Bending2/src/main/TagAPIListener.java
@@ -0,0 +1,37 @@
+package main;
+
+import org.bukkit.ChatColor;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
+import org.kitteh.tag.PlayerReceiveNameTagEvent;
+
+import tools.BendingType;
+import tools.ConfigManager;
+import tools.Tools;
+
+public class TagAPIListener implements Listener {
+ @EventHandler
+ public void onNameTag(PlayerReceiveNameTagEvent event) {
+ if (!event.isModified())
+
+ if (event.getNamedPlayer().hasPermission("bending.avatar")) {
+ event.setTag(Tools.getColor(ConfigManager.getColor("Avatar")) + event.getNamedPlayer().getName());
+ }
+
+ else if (Tools.isBender(event.getNamedPlayer().getName(), BendingType.Air)) {
+ event.setTag(Tools.getColor(ConfigManager.getColor("Air")) + event.getNamedPlayer().getName());
+ }
+ else if (Tools.isBender(event.getNamedPlayer().getName(), BendingType.Earth)) {
+ event.setTag(Tools.getColor(ConfigManager.getColor("Earth")) + event.getNamedPlayer().getName());
+ }
+ else if (Tools.isBender(event.getNamedPlayer().getName(), BendingType.Fire)) {
+ event.setTag(Tools.getColor(ConfigManager.getColor("Fire")) + event.getNamedPlayer().getName());
+ }
+ else if (Tools.isBender(event.getNamedPlayer().getName(), BendingType.ChiBlocker)) {
+ event.setTag(Tools.getColor(ConfigManager.getColor("ChiBlocker")) + event.getNamedPlayer().getName());
+ }
+ else if (Tools.isBender(event.getNamedPlayer().getName(), BendingType.Water)) {
+ event.setTag(Tools.getColor(ConfigManager.getColor("Water")) + event.getNamedPlayer().getName());
+ }
+ }
+}
View
4 Bending2/src/tools/Abilities.java
@@ -12,7 +12,7 @@
WaterBubble, FreezeMelt, HealingWaters, Plantbending, WaterManipulation, WaterWall, Wave, Bloodbending, WaterSpout, IceSpike,
- HighJump, RapidPunch,
+ HighJump, RapidPunch, Paralyze,
AvatarState;
@@ -33,7 +33,7 @@
}
private enum ChiBlockingAbilities {
- HighJump, RapidPunch;
+ HighJump, RapidPunch, Paralyze;
}
public static Abilities getAbility(String ability) {
View
6 Bending2/src/tools/ConfigManager.java
@@ -146,6 +146,7 @@
public static int icespikeareadamage = 2;
public static int icespikearearadius = 4;
public static double icespikeareathrowingmult = 1;
+ public static boolean useTagAPI = true;
private static List<String> defaultearthbendable = new ArrayList<String>();
@@ -202,6 +203,8 @@ public void load(File file) {
"Bending.Option.Bend-With-Weapon.Fire", false));
useWeapon.put("Water", config.getBoolean(
"Bending.Option.Bend-With-Weapon.Water", false));
+
+ useTagAPI = config.getBoolean("Bending.Option.Use-TagAPI", true);
// MySQL
useMySQL = config.getBoolean("MySQL.Use-MySQL");
dbHost = config.getString("MySQL.MySQL-host",
@@ -472,7 +475,8 @@ private MemoryConfiguration getDefaults() {
config.set("Bending.Option.Bend-With-Weapon.Water", true);
config.set("Bending.Option.Bend-With-Weapon.Earth", true);
config.set("Bending.Option.Bend-With-Weapon.ChiBlocker", false);
- config.set("Bending.Option.Bend-To-Item", false);
+ config.set("Bending.Option.Bend-To-Item", false);
+ config.set("Bending.Option.Use-TagAPI", true);
config.set("Bending.Option.Reverse-Earthbending", true);
config.set("Bending.Option.Reverse-Earthbending-Check-Time", 500000);
View
2  Bending2/src/tools/Tools.java
@@ -518,7 +518,7 @@ public static boolean isBlockTouching(Block block1, Block block2) {
}
public static Entity getTargettedEntity(Player player, double range) {
- double longestr = range;
+ double longestr = range + 1;
Entity target = null;
Location origin = player.getEyeLocation();
Vector direction = player.getEyeLocation().getDirection();

No commit comments for this range

Something went wrong with that request. Please try again.