Fixes, minor API updates.
This commit is contained in:
parent
bb29d3f165
commit
fb943c964e
Binary file not shown.
@ -692,6 +692,9 @@ public class CustomDamage {
|
|||||||
public static void IncreaseWeaponCharges(Player p, int amt) {
|
public static void IncreaseWeaponCharges(Player p, int amt) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
if (pd.rage_time<=TwosideKeeper.getServerTickTime()) {
|
if (pd.rage_time<=TwosideKeeper.getServerTickTime()) {
|
||||||
|
if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)) {
|
||||||
|
amt*=2;
|
||||||
|
}
|
||||||
pd.weaponcharges+=amt;
|
pd.weaponcharges+=amt;
|
||||||
GenericFunctions.sendActionBarMessage(p, "");
|
GenericFunctions.sendActionBarMessage(p, "");
|
||||||
}
|
}
|
||||||
@ -699,6 +702,9 @@ public class CustomDamage {
|
|||||||
|
|
||||||
public static void IncreaseLifestealStacks(Player p, int amt) {
|
public static void IncreaseLifestealStacks(Player p, int amt) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
if (ItemSet.hasFullSet(GenericFunctions.getEquipment(p), p, ItemSet.DAWNTRACKER)) {
|
||||||
|
amt*=2;
|
||||||
|
}
|
||||||
pd.lifestealstacks=Math.min(100,pd.lifestealstacks+amt*((pd.rage_time>TwosideKeeper.getServerTickTime())?2:1));
|
pd.lifestealstacks=Math.min(100,pd.lifestealstacks+amt*((pd.rage_time>TwosideKeeper.getServerTickTime())?2:1));
|
||||||
GenericFunctions.sendActionBarMessage(p, "");
|
GenericFunctions.sendActionBarMessage(p, "");
|
||||||
}
|
}
|
||||||
|
@ -3945,8 +3945,10 @@ public class GenericFunctions {
|
|||||||
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resistance "+WorldShop.toRomanNumeral(GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p)+1));
|
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resistance "+WorldShop.toRomanNumeral(GenericFunctions.getPotionEffectLevel(PotionEffectType.DAMAGE_RESISTANCE, p)+1));
|
||||||
}*/
|
}*/
|
||||||
if (swiftaegislv>0) {
|
if (swiftaegislv>0) {
|
||||||
|
if (pd.swiftaegisamt<10) {
|
||||||
|
pd.swiftaegistime=TwosideKeeper.getServerTickTime();
|
||||||
|
}
|
||||||
pd.swiftaegisamt=Math.min(10,getSwiftAegisAmt(p)+swiftaegislv);
|
pd.swiftaegisamt=Math.min(10,getSwiftAegisAmt(p)+swiftaegislv);
|
||||||
pd.swiftaegistime=TwosideKeeper.getServerTickTime();
|
|
||||||
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resist "+WorldShop.toRomanNumeral(pd.swiftaegisamt));
|
GenericFunctions.sendActionBarMessage(p, ChatColor.GRAY+"Resist "+WorldShop.toRomanNumeral(pd.swiftaegisamt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4209,7 +4211,7 @@ public class GenericFunctions {
|
|||||||
|
|
||||||
public static void PerformAssassinate(Player player, Material name) {
|
public static void PerformAssassinate(Player player, Material name) {
|
||||||
//Try to find a target to look at.
|
//Try to find a target to look at.
|
||||||
LivingEntity target = aPlugin.API.getTargetEntity(player, 100);
|
LivingEntity target = aPlugin.API.rayTraceTargetEntity(player, 100);
|
||||||
if (target!=null && !target.isDead()) {
|
if (target!=null && !target.isDead()) {
|
||||||
//We found a target, try to jump behind them now.
|
//We found a target, try to jump behind them now.
|
||||||
double mult = 0.0;
|
double mult = 0.0;
|
||||||
@ -4383,6 +4385,7 @@ public class GenericFunctions {
|
|||||||
//Automatically appends status effect buffs to the beginning of it.
|
//Automatically appends status effect buffs to the beginning of it.
|
||||||
public static void sendActionBarMessage(Player p, String message, boolean important) {
|
public static void sendActionBarMessage(Player p, String message, boolean important) {
|
||||||
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
String finalmsg = "";
|
||||||
if (pd.rage_time>TwosideKeeper.getServerTickTime()) {
|
if (pd.rage_time>TwosideKeeper.getServerTickTime()) {
|
||||||
message = ChatColor.RED+" !! RAGE ACTIVE !! "+message;
|
message = ChatColor.RED+" !! RAGE ACTIVE !! "+message;
|
||||||
}
|
}
|
||||||
@ -4391,17 +4394,29 @@ public class GenericFunctions {
|
|||||||
String prefix=ActionBarBuffUpdater.getActionBarPrefix(p);
|
String prefix=ActionBarBuffUpdater.getActionBarPrefix(p);
|
||||||
if (prefix.length()>0) {
|
if (prefix.length()>0) {
|
||||||
aPlugin.API.sendActionBarMessage(p, message+" "+prefix);
|
aPlugin.API.sendActionBarMessage(p, message+" "+prefix);
|
||||||
|
finalmsg=message+" "+prefix;
|
||||||
} else {
|
} else {
|
||||||
if (message.length()>0) {
|
if (message.length()>0) {
|
||||||
aPlugin.API.sendActionBarMessage(p, message);
|
aPlugin.API.sendActionBarMessage(p, message);
|
||||||
|
finalmsg=message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (important) {
|
if (important) {
|
||||||
pd.lastimportantactionbarmsg=TwosideKeeper.getServerTickTime();
|
pd.lastimportantactionbarmsg=TwosideKeeper.getServerTickTime();
|
||||||
}
|
}
|
||||||
|
TwosideKeeper.lastActionBarMessage=finalmsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void sendLastImportantActionBarMsgTime(Player p, long last_important_msg_time) {
|
||||||
|
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
|
||||||
|
pd.lastimportantactionbarmsg=last_important_msg_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getLastActionBarMessage() {
|
||||||
|
return TwosideKeeper.lastActionBarMessage;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getDisplayName(LivingEntity ent) {
|
public static String getDisplayName(LivingEntity ent) {
|
||||||
//Strips off the suffix of a mob.
|
//Strips off the suffix of a mob.
|
||||||
if (ent.getCustomName()==null) {
|
if (ent.getCustomName()==null) {
|
||||||
|
@ -317,8 +317,8 @@ public enum ItemSet {
|
|||||||
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Lifesteal");
|
lore.add(ChatColor.DARK_AQUA+" 3 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 3)+"% Lifesteal");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Max Health");
|
lore.add(ChatColor.DARK_AQUA+" 4 - "+ChatColor.WHITE+" +"+ItemSet.GetBaseAmount(set, tier, 4)+" Max Health");
|
||||||
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Powered Mock");
|
lore.add(ChatColor.DARK_AQUA+" 5 - "+ChatColor.WHITE+" Powered Mock");
|
||||||
lore.add(ChatColor.GRAY+" Mock debuff duration increases from");
|
lore.add(ChatColor.GRAY+" Mock cooldown decreases from");
|
||||||
lore.add(ChatColor.GRAY+" 10 -> 20 seconds, making it stackable.");
|
lore.add(ChatColor.GRAY+" 20 -> 10 seconds, making it stackable.");
|
||||||
lore.add(ChatColor.GRAY+" All Lifesteal Stacks and Weapon Charges");
|
lore.add(ChatColor.GRAY+" All Lifesteal Stacks and Weapon Charges");
|
||||||
lore.add(ChatColor.GRAY+" gained are doubled.");
|
lore.add(ChatColor.GRAY+" gained are doubled.");
|
||||||
}break;
|
}break;
|
||||||
|
@ -579,7 +579,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
public static final int LIFESAVER_COOLDOWN=6000;
|
public static final int LIFESAVER_COOLDOWN=6000;
|
||||||
public static final int ARROWBARRAGE_COOLDOWN=2400;
|
public static final int ARROWBARRAGE_COOLDOWN=2400;
|
||||||
public static final int SIPHON_COOLDOWN = 700;
|
public static final int SIPHON_COOLDOWN = 700;
|
||||||
private static final int MOCK_COOLDOWN = 400;
|
public static final int MOCK_COOLDOWN = 400;
|
||||||
|
|
||||||
|
public static String lastActionBarMessage="";
|
||||||
|
|
||||||
public static File filesave;
|
public static File filesave;
|
||||||
public static HashMap<UUID,PlayerStructure> playerdata;
|
public static HashMap<UUID,PlayerStructure> playerdata;
|
||||||
|
@ -421,6 +421,12 @@ public final class TwosideKeeperAPI {
|
|||||||
public static String getActionBarSuffix(LivingEntity ent) {
|
public static String getActionBarSuffix(LivingEntity ent) {
|
||||||
return ActionBarBuffUpdater.getActionBarPrefix(ent);
|
return ActionBarBuffUpdater.getActionBarPrefix(ent);
|
||||||
}
|
}
|
||||||
|
public static String getCurrentActionBarText(Player p) {
|
||||||
|
return GenericFunctions.getLastActionBarMessage();
|
||||||
|
}
|
||||||
|
public static void setActionBarLastImportantMessageTime(Player p, long last_important_msg_time) {
|
||||||
|
GenericFunctions.sendLastImportantActionBarMsgTime(p, last_important_msg_time);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @deprecated Use the version that requires a short. Using a byte makes no sense
|
* @deprecated Use the version that requires a short. Using a byte makes no sense
|
||||||
* as durability can be larger than 256.
|
* as durability can be larger than 256.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user