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);
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);
return true;
}

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@ public class SignRepair extends EssentialsSign
{
sign.setLine(1, "Hand");
}
else if (!repairTarget.equalsIgnoreCase("all") && !repairTarget.equalsIgnoreCase("hand") )
else if (!repairTarget.equalsIgnoreCase("all") && !repairTarget.equalsIgnoreCase("hand"))
{
sign.setLine(1, "§c<hand|all>");
throw new SignException(_("invalidSignLine", 2));
@ -53,6 +53,7 @@ public class SignRepair extends EssentialsSign
throw new SignException(ex.getMessage(), ex);
}
charge.charge(player);
Trade.log("Sign", "Repair", "Interact", username, null, username, charge, sign.getBlock().getLocation(), ess);
return true;
}
}

View File

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

View File

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

View File

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

View File

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