From 44be58f6a4ad6efb962ff9f1bd7c82ed91ea672c Mon Sep 17 00:00:00 2001 From: Steven Scott Date: Sat, 7 Jan 2012 13:16:43 -0800 Subject: [PATCH] [Version 0.7.4.1] - Quick API update to add player to the activate event --- README | 2 ++ src/net/TheDgtl/Stargate/Portal.java | 2 +- .../TheDgtl/Stargate/event/StargateActivateEvent.java | 11 ++++++++++- src/plugin.yml | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README b/README index 98fb877..1e7df73 100644 --- a/README +++ b/README @@ -198,6 +198,8 @@ createConflict=Gate conflicts with existing gate ============= Changes ============= +[Version 0.7.4.1] + - Quick API update to add player to the activate event [Version 0.7.4.0] - Fixed issue with non-air closed portal blocks - Added StargatePortalEvent/onStargatePortal event diff --git a/src/net/TheDgtl/Stargate/Portal.java b/src/net/TheDgtl/Stargate/Portal.java index 41b52bb..0555f44 100644 --- a/src/net/TheDgtl/Stargate/Portal.java +++ b/src/net/TheDgtl/Stargate/Portal.java @@ -441,7 +441,7 @@ public class Portal { } public void activate(Player player) { - StargateActivateEvent event = new StargateActivateEvent(this); + StargateActivateEvent event = new StargateActivateEvent(this, player); Stargate.server.getPluginManager().callEvent(event); if (event.isCancelled()) return; diff --git a/src/net/TheDgtl/Stargate/event/StargateActivateEvent.java b/src/net/TheDgtl/Stargate/event/StargateActivateEvent.java index c007477..2df02be 100644 --- a/src/net/TheDgtl/Stargate/event/StargateActivateEvent.java +++ b/src/net/TheDgtl/Stargate/event/StargateActivateEvent.java @@ -1,12 +1,21 @@ package net.TheDgtl.Stargate.event; +import org.bukkit.entity.Player; + import net.TheDgtl.Stargate.Portal; public class StargateActivateEvent extends StargateEvent { private static final long serialVersionUID = -8058490029263773684L; + + Player player; - public StargateActivateEvent(Portal portal) { + public StargateActivateEvent(Portal portal, Player player) { super("StargatActivateEvent", portal); + this.player = player; + } + + public Player getPlayer() { + return player; } } diff --git a/src/plugin.yml b/src/plugin.yml index fcebdd6..eafc021 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.7.4.0 +version: 0.7.4.1 description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net