Increase delay of bow mode switching slightly.

This commit is contained in:
sigonasr2 2016-09-19 21:46:24 -05:00
parent 6be55e3cf2
commit f414fdbb68
2 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@ -2045,6 +2045,9 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
BowMode mode = GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand()); BowMode mode = GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand());
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);
if (ev.getAction().name().contains("RIGHT")) { if (ev.getAction().name().contains("RIGHT")) {
if (pd.lastbowmodeswitch+6>=getServerTickTime()) {
return;
}
switch (mode) { switch (mode) {
case CLOSE:{ case CLOSE:{
p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_INFECT, 0.5f, 0.1f); p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_INFECT, 0.5f, 0.1f);
@ -2062,6 +2065,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
aPlugin.API.sendCooldownPacket(p, p.getEquipment().getItemInMainHand(), GenericFunctions.GetRemainingCooldownTime(p, pd.last_dodge, DODGE_COOLDOWN)); aPlugin.API.sendCooldownPacket(p, p.getEquipment().getItemInMainHand(), GenericFunctions.GetRemainingCooldownTime(p, pd.last_dodge, DODGE_COOLDOWN));
}break; }break;
} }
pd.lastbowmodeswitch=getServerTickTime();
} else { } else {
if (pd.lastbowmodeswitch+6>=getServerTickTime()) { if (pd.lastbowmodeswitch+6>=getServerTickTime()) {
return; return;