Add extra trade log messages for sign charges.

This commit is contained in:
KHobbits 2013-02-28 03:15:21 +00:00
parent 0ddcfafbc0
commit 8d2b10d783
9 changed files with 15 additions and 4 deletions

View File

@ -46,6 +46,7 @@ public class SignGameMode extends EssentialsSign
performSetMode(mode.toLowerCase(Locale.ENGLISH), player); performSetMode(mode.toLowerCase(Locale.ENGLISH), player);
player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName())); player.sendMessage(_("gameMode", _(player.getGameMode().toString().toLowerCase(Locale.ENGLISH)), player.getDisplayName()));
Trade.log("Sign", "gameMode", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
charge.charge(player); charge.charge(player);
return true; return true;
} }

View File

@ -31,6 +31,7 @@ public class SignHeal extends EssentialsSign
player.setFireTicks(0); player.setFireTicks(0);
player.sendMessage(_("youAreHealed")); player.sendMessage(_("youAreHealed"));
charge.charge(player); charge.charge(player);
Trade.log("Sign", "Heal", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
} }

View File

@ -49,6 +49,7 @@ public class SignInfo extends EssentialsSign
} }
charge.charge(player); charge.charge(player);
Trade.log("Sign", "Info", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
} }

View File

@ -63,6 +63,7 @@ public class SignKit extends EssentialsSign
final List<String> items = Kit.getItems(player, kit); final List<String> items = Kit.getItems(player, kit);
Kit.expandItems(ess, player, items); Kit.expandItems(ess, player, items);
charge.charge(player); charge.charge(player);
Trade.log("Sign", "Kit", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
} }
catch (NoChargeException ex) catch (NoChargeException ex)
{ {

View File

@ -53,6 +53,7 @@ public class SignRepair extends EssentialsSign
throw new SignException(ex.getMessage(), ex); throw new SignException(ex.getMessage(), ex);
} }
charge.charge(player); charge.charge(player);
Trade.log("Sign", "Repair", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
} }

View File

@ -39,6 +39,7 @@ public class SignSpawnmob extends EssentialsSign
} }
charge.charge(player); charge.charge(player);
Trade.log("Sign", "Spawnmob", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
} }

View File

@ -44,12 +44,14 @@ public class SignTime extends EssentialsSign
{ {
player.getWorld().setTime(time + 24000); player.getWorld().setTime(time + 24000);
charge.charge(player); charge.charge(player);
Trade.log("Sign", "TimeDay", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
if ("§2Night".equalsIgnoreCase(timeString)) if ("§2Night".equalsIgnoreCase(timeString))
{ {
player.getWorld().setTime(time + 37700); player.getWorld().setTime(time + 37700);
charge.charge(player); charge.charge(player);
Trade.log("Sign", "TimeNight", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
throw new SignException(_("onlyDayNight")); throw new SignException(_("onlyDayNight"));

View File

@ -59,6 +59,7 @@ public class SignWarp extends EssentialsSign
try try
{ {
player.getTeleport().warp(warpName, charge, TeleportCause.PLUGIN); player.getTeleport().warp(warpName, charge, TeleportCause.PLUGIN);
Trade.log("Sign", "Warp", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -43,12 +43,14 @@ public class SignWeather extends EssentialsSign
{ {
player.getWorld().setStorm(false); player.getWorld().setStorm(false);
charge.charge(player); charge.charge(player);
Trade.log("Sign", "WeatherSun", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
if ("§2Storm".equalsIgnoreCase(weatherString)) if ("§2Storm".equalsIgnoreCase(weatherString))
{ {
player.getWorld().setStorm(true); player.getWorld().setStorm(true);
charge.charge(player); charge.charge(player);
Trade.log("Sign", "WeatherStorm", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true; return true;
} }
throw new SignException(_("onlySunStorm")); throw new SignException(_("onlySunStorm"));