Re-Enabled Rocket Booster when Christmas Event is Deactivated.
This commit is contained in:
parent
6b5ad31745
commit
464531b06e
Binary file not shown.
@ -615,18 +615,14 @@ public class Christmas {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean RunPlayerInteractEvent(PlayerInteractEvent ev) {
|
public static boolean RunPlayerInteractEvent(PlayerInteractEvent ev) {
|
||||||
if (TwosideKeeper.CHRISTMASEVENT_ACTIVATED) {
|
|
||||||
Player p = ev.getPlayer();
|
Player p = ev.getPlayer();
|
||||||
|
if (TwosideKeeper.CHRISTMASEVENT_ACTIVATED) {
|
||||||
if (ev.getAction()==Action.RIGHT_CLICK_BLOCK) {
|
if (ev.getAction()==Action.RIGHT_CLICK_BLOCK) {
|
||||||
Block b = ev.getClickedBlock();
|
Block b = ev.getClickedBlock();
|
||||||
if (b.getType()==Material.SMOOTH_BRICK && isChristmasTreeSchematic(p.getEquipment().getItemInMainHand())) {
|
if (b.getType()==Material.SMOOTH_BRICK && isChristmasTreeSchematic(p.getEquipment().getItemInMainHand())) {
|
||||||
return UseTreeSchematic(ev, p, b);
|
return UseTreeSchematic(ev, p, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((ev.getAction()==Action.RIGHT_CLICK_AIR ||
|
|
||||||
ev.getAction()==Action.RIGHT_CLICK_BLOCK) && ev.useInteractedBlock()==Result.DENY) {
|
|
||||||
UseRocketBooster(ev, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ev.getAction()==Action.RIGHT_CLICK_BLOCK && ev.getClickedBlock().getType()==Material.CHEST) {
|
if (ev.getAction()==Action.RIGHT_CLICK_BLOCK && ev.getClickedBlock().getType()==Material.CHEST) {
|
||||||
Block b = ev.getClickedBlock();
|
Block b = ev.getClickedBlock();
|
||||||
@ -665,9 +661,13 @@ public class Christmas {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((ev.getAction()==Action.RIGHT_CLICK_AIR ||
|
||||||
|
ev.getAction()==Action.RIGHT_CLICK_BLOCK) && ev.useInteractedBlock()==Result.DENY) {
|
||||||
|
UseRocketBooster(ev, p);
|
||||||
|
}
|
||||||
if ((ev.getAction()==Action.RIGHT_CLICK_AIR || ev.getAction()==Action.RIGHT_CLICK_BLOCK) &&
|
if ((ev.getAction()==Action.RIGHT_CLICK_AIR || ev.getAction()==Action.RIGHT_CLICK_BLOCK) &&
|
||||||
isSantaDimensionalBox(ev.getPlayer().getEquipment().getItemInMainHand())) {
|
isSantaDimensionalBox(p.getEquipment().getItemInMainHand())) {
|
||||||
UseSantaDimensionalBox(ev.getPlayer());
|
UseSantaDimensionalBox(p);
|
||||||
ev.setUseInteractedBlock(Result.DENY);
|
ev.setUseInteractedBlock(Result.DENY);
|
||||||
ev.setUseItemInHand(Result.DENY);
|
ev.setUseItemInHand(Result.DENY);
|
||||||
ev.setCancelled(true);
|
ev.setCancelled(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user