mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-06 02:51:32 +01:00
Add some debugging to make it easier to diagnose kit errors.
This commit is contained in:
parent
dbceccaa3e
commit
0f6625aea9
@ -8,6 +8,7 @@ import com.earth2me.essentials.utils.StringUtil;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.logging.Level;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
|
|
||||||
|
|
||||||
@ -91,6 +92,11 @@ public class Commandkit extends EssentialsCommand
|
|||||||
|
|
||||||
for (final Kit kit : kits)
|
for (final Kit kit : kits)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
kit.checkDelay(userFrom);
|
||||||
|
kit.checkAffordable(userFrom);
|
||||||
kit.setTime(userFrom);
|
kit.setTime(userFrom);
|
||||||
kit.expandItems(userTo);
|
kit.expandItems(userTo);
|
||||||
kit.chargeUser(userTo);
|
kit.chargeUser(userTo);
|
||||||
@ -101,6 +107,19 @@ public class Commandkit extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
userTo.sendMessage(tl("kitReceive", kit.getName()));
|
userTo.sendMessage(tl("kitReceive", kit.getName()));
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (NoChargeException ex)
|
||||||
|
{
|
||||||
|
if (ess.getSettings().isDebug())
|
||||||
|
{
|
||||||
|
ess.getLogger().log(Level.INFO, "Soft kit error, abort spawning " + kit.getName(), ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
ess.showError(userFrom.getSource(), ex, "\\ kit: " + kit.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user