Increase delay of bow mode switching slightly.
This commit is contained in:
parent
6be55e3cf2
commit
f414fdbb68
Binary file not shown.
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user