mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Trade Confirm Plugin Event
This commit is contained in:
parent
d1f18a2154
commit
cea97ac558
@ -8,6 +8,8 @@ import com.eu.habbo.messages.outgoing.inventory.AddHabboItemComposer;
|
||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserStatusComposer;
|
||||
import com.eu.habbo.messages.outgoing.trading.*;
|
||||
import com.eu.habbo.plugin.events.furniture.FurnitureRedeemedEvent;
|
||||
import com.eu.habbo.plugin.events.trading.TradeConfirmEvent;
|
||||
import com.eu.habbo.threading.runnables.QueryDeleteHabboItem;
|
||||
import gnu.trove.set.hash.THashSet;
|
||||
import org.slf4j.Logger;
|
||||
@ -145,6 +147,12 @@ public class RoomTrade {
|
||||
RoomTradeUser userOne = this.users.get(0);
|
||||
RoomTradeUser userTwo = this.users.get(1);
|
||||
|
||||
boolean tradeConfirmEventRegistered = Emulator.getPluginManager().isRegistered(TradeConfirmEvent.class, true);
|
||||
TradeConfirmEvent tradeConfirmEvent = new TradeConfirmEvent(userOne, userTwo);
|
||||
if (tradeConfirmEventRegistered) {
|
||||
Emulator.getPluginManager().fireEvent(tradeConfirmEvent);
|
||||
}
|
||||
|
||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
|
||||
|
||||
int tradeId = 0;
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.eu.habbo.plugin.events.trading;
|
||||
|
||||
import com.eu.habbo.habbohotel.rooms.RoomTradeUser;
|
||||
import com.eu.habbo.plugin.Event;
|
||||
|
||||
public class TradeConfirmEvent extends Event {
|
||||
public final RoomTradeUser userOne;
|
||||
public final RoomTradeUser userTwo;
|
||||
|
||||
public TradeConfirmEvent(RoomTradeUser userOne, RoomTradeUser userTwo) {
|
||||
this.userOne = userOne;
|
||||
this.userTwo = userTwo;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user