Class SteamTrading
- java.lang.Object
-
- in.dragonbra.javasteam.handlers.ClientMsgHandler
-
- in.dragonbra.javasteam.steam.handlers.steamtrading.SteamTrading
-
public class SteamTrading extends ClientMsgHandler
This handler is used for initializing Steam trades with other clients.
-
-
Field Summary
-
Fields inherited from class in.dragonbra.javasteam.handlers.ClientMsgHandler
client
-
-
Constructor Summary
Constructors Constructor Description SteamTrading()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelTrade(SteamID user)Cancels an already sent trade proposal.voidhandleMsg(IPacketMsg packetMsg)Handles a client message.voidrespondToTrade(int tradeId, boolean acceptTrade)Responds to a trade proposal.voidtrade(SteamID user)Proposes a trade to another client.-
Methods inherited from class in.dragonbra.javasteam.handlers.ClientMsgHandler
getClient, isExpectDisconnection, setExpectDisconnection, setup
-
-
-
-
Method Detail
-
trade
public void trade(SteamID user)
Proposes a trade to another client.- Parameters:
user- The client to trade.
-
respondToTrade
public void respondToTrade(int tradeId, boolean acceptTrade)Responds to a trade proposal.- Parameters:
tradeId- The trade id of the received proposal.acceptTrade- if set to true, the trade will be accepted.
-
cancelTrade
public void cancelTrade(SteamID user)
Cancels an already sent trade proposal.- Parameters:
user- The user.
-
handleMsg
public void handleMsg(IPacketMsg packetMsg)
Description copied from class:ClientMsgHandlerHandles a client message. This should not be called directly.- Specified by:
handleMsgin classClientMsgHandler- Parameters:
packetMsg- The packet message that contains the data.
-
-