[Version 0.7.7.5]

- Resolve issue of right clicking introduced in 1.3.1/2
This commit is contained in:
Steven Scott 2012-09-11 21:49:50 -07:00
parent 9e784c0eaf
commit d3834c5709
3 changed files with 12 additions and 4 deletions

2
README
View File

@ -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

View File

@ -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;

View File

@ -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