[Version 0.7.7.5]
- Resolve issue of right clicking introduced in 1.3.1/2
This commit is contained in:
parent
9e784c0eaf
commit
d3834c5709
2
README
2
README
@ -212,6 +212,8 @@ Client randomly crashes on teleport.
|
||||
=============
|
||||
Changes
|
||||
=============
|
||||
[Version 0.7.7.5]
|
||||
- Resolve issue of right clicking introduced in 1.3.1/2
|
||||
[Version 0.7.7.4]
|
||||
- Removed try/catch, it was still segfaulting.
|
||||
- Built against 1.3.1
|
||||
|
@ -789,12 +789,18 @@ public class Stargate extends JavaPlugin {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (event.isCancelled()) return;
|
||||
Player player = event.getPlayer();
|
||||
Block block = event.getClickedBlock();
|
||||
Block block = null;
|
||||
if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) {
|
||||
block = player.getTargetBlock(null, 5);
|
||||
} else {
|
||||
block = event.getClickedBlock();
|
||||
}
|
||||
|
||||
if (block == null) return;
|
||||
|
||||
// Right click
|
||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR) {
|
||||
if (block.getType() == Material.WALL_SIGN) {
|
||||
Portal portal = Portal.getByBlock(block);
|
||||
if (portal == null) return;
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: Stargate
|
||||
main: net.TheDgtl.Stargate.Stargate
|
||||
version: 0.7.7.4
|
||||
version: 0.7.7.5
|
||||
description: Stargate mod for Bukkit
|
||||
author: Drakia
|
||||
website: http://www.thedgtl.net
|
||||
|
Loading…
Reference in New Issue
Block a user