[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 Changes
============= =============
[Version 0.7.7.5]
- Resolve issue of right clicking introduced in 1.3.1/2
[Version 0.7.7.4] [Version 0.7.7.4]
- Removed try/catch, it was still segfaulting. - Removed try/catch, it was still segfaulting.
- Built against 1.3.1 - Built against 1.3.1

View File

@ -789,12 +789,18 @@ public class Stargate extends JavaPlugin {
@EventHandler @EventHandler
public void onPlayerInteract(PlayerInteractEvent event) { public void onPlayerInteract(PlayerInteractEvent event) {
if (event.isCancelled()) return;
Player player = event.getPlayer(); 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 // 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) { if (block.getType() == Material.WALL_SIGN) {
Portal portal = Portal.getByBlock(block); Portal portal = Portal.getByBlock(block);
if (portal == null) return; if (portal == null) return;

View File

@ -1,6 +1,6 @@
name: Stargate name: Stargate
main: net.TheDgtl.Stargate.Stargate main: net.TheDgtl.Stargate.Stargate
version: 0.7.7.4 version: 0.7.7.5
description: Stargate mod for Bukkit description: Stargate mod for Bukkit
author: Drakia author: Drakia
website: http://www.thedgtl.net website: http://www.thedgtl.net