diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs
index 5a223384..d3844673 100755
--- a/TShockAPI/GetDataHandlers.cs
+++ b/TShockAPI/GetDataHandlers.cs
@@ -62,10 +62,10 @@ namespace TShockAPI
///
public class TileEditEventArgs : HandledEventArgs
{
- ///
- /// The TSPlayer who made the tile edit
- ///
- public TSPlayer Player { get; set; }
+ ///
+ /// The TSPlayer who made the tile edit
+ ///
+ public TSPlayer Player { get; set; }
///
/// The tile coordinate on the X plane
@@ -76,7 +76,7 @@ namespace TShockAPI
/// The tile coordinate on the Y plane
///
public int Y { get; set; }
-
+
///
/// The Tile ID being edited.
///
@@ -87,16 +87,16 @@ namespace TShockAPI
///
public EditAction Action { get; set; }
- ///
- /// Did the tile get destroyed successfully.
- ///
- public EditType editDetail { get; set; }
+ ///
+ /// Did the tile get destroyed successfully.
+ ///
+ public EditType editDetail { get; set; }
///
/// Used when a tile is placed to denote a subtype of tile. (e.g. for tile id 21: Chest = 0, Gold Chest = 1)
///
public byte Style { get; set; }
- }
+ }
///
/// TileEdit - called when a tile is placed or destroyed
@@ -109,12 +109,12 @@ namespace TShockAPI
var args = new TileEditEventArgs
{
- Player = ply,
+ Player = ply,
X = x,
Y = y,
Action = action,
EditData = editData,
- editDetail = editDetail,
+ editDetail = editDetail,
Style = style
};
TileEdit.Invoke(null, args);
@@ -157,14 +157,14 @@ namespace TShockAPI
///
public class PlayerTeamEventArgs : HandledEventArgs
{
- ///
- /// The Terraria player ID of the player
- ///
- public byte PlayerId { get; set; }
- ///
- /// Enable/disable pvp?
- ///
- public byte Team { get; set; }
+ ///
+ /// The Terraria player ID of the player
+ ///
+ public byte PlayerId { get; set; }
+ ///
+ /// Enable/disable pvp?
+ ///
+ public byte Team { get; set; }
}
///
/// TogglePvp - called when a player toggles pvp
@@ -172,16 +172,16 @@ namespace TShockAPI
public static HandlerList PlayerTeam;
private static bool OnPlayerTeam(byte _id, byte _team)
{
- if (PlayerTeam == null)
- return false;
+ if (PlayerTeam == null)
+ return false;
- var args = new PlayerTeamEventArgs
- {
- PlayerId = _id,
- Team = _team,
- };
- PlayerTeam.Invoke(null, args);
- return args.Handled;
+ var args = new PlayerTeamEventArgs
+ {
+ PlayerId = _id,
+ Team = _team,
+ };
+ PlayerTeam.Invoke(null, args);
+ return args.Handled;
}
///
@@ -2681,6 +2681,10 @@ namespace TShockAPI
{
bucket = 3;
}
+ else if (args.TPlayer.inventory[args.TPlayer.selectedItem].type == 3031)
+ {
+ bucket = 4;
+ }
if (type == 1 && !(bucket == 2 || bucket == 0))
{
@@ -2698,7 +2702,7 @@ namespace TShockAPI
return true;
}
- if (type == 0 && !(bucket == 1 || bucket == 0))
+ if (type == 0 && !(bucket == 1 || bucket == 0 || bucket == 4))
{
args.Player.SendErrorMessage("You do not have permission to perform this action.");
args.Player.Disable("Spreading water without holding a water bucket");