diff options
author | rmichela <deltahat@gmail.com> | 2012-03-04 16:29:56 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-08 01:29:30 -0500 |
commit | c84229ad72e938608dbfbeafbeb7c4940f0bf3de (patch) | |
tree | c1c1747f205725af283f4dbbfe93bc2747d2ce11 /src/test/java | |
parent | e1f7e0bbe8addf46553c4a5d532a449e15d53996 (diff) | |
download | bukkit-c84229ad72e938608dbfbeafbeb7c4940f0bf3de.tar bukkit-c84229ad72e938608dbfbeafbeb7c4940f0bf3de.tar.gz bukkit-c84229ad72e938608dbfbeafbeb7c4940f0bf3de.tar.lz bukkit-c84229ad72e938608dbfbeafbeb7c4940f0bf3de.tar.xz bukkit-c84229ad72e938608dbfbeafbeb7c4940f0bf3de.zip |
[Bleeding] Added ConversationAbandonedEvent and supporting infrastructure. Whenever a conversation exits, the ConversationAbandonedEvent is triggered with details about how the conversation ended and what, if anything caused it to end. Fixes BUKKIT-986
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/bukkit/conversations/FakeConversable.java | 6 | ||||
-rw-r--r-- | src/test/java/org/bukkit/plugin/messaging/TestPlayer.java | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/org/bukkit/conversations/FakeConversable.java b/src/test/java/org/bukkit/conversations/FakeConversable.java index a04bfc8c..87fb3113 100644 --- a/src/test/java/org/bukkit/conversations/FakeConversable.java +++ b/src/test/java/org/bukkit/conversations/FakeConversable.java @@ -14,6 +14,7 @@ public class FakeConversable implements Conversable { public String lastSentMessage; public Conversation begunConversation; public Conversation abandonedConverstion; + public ConversationAbandonedEvent abandonedConversationEvent; public boolean isConversing() { return false; @@ -33,6 +34,11 @@ public class FakeConversable implements Conversable { abandonedConverstion = conversation; } + public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) { + abandonedConverstion = conversation; + abandonedConversationEvent = details; + } + public void sendRawMessage(String message) { lastSentMessage = message; } diff --git a/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java b/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java index 9b5aa5e4..d812f5a7 100644 --- a/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java +++ b/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java @@ -10,6 +10,7 @@ import java.util.UUID; import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.conversations.Conversation; +import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.entity.Arrow; import org.bukkit.entity.Egg; import org.bukkit.entity.Entity; @@ -739,4 +740,8 @@ public class TestPlayer implements Player { public void abandonConversation(Conversation conversation) { throw new UnsupportedOperationException("Not supported yet."); } + + public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) { + throw new UnsupportedOperationException("Not supported yet."); + } } |