Code improvements.
This commit is contained in:
@@ -65,10 +65,9 @@ public class ChatsHandler implements ITelnetHandler
|
||||
final String name = st.nextToken();
|
||||
final String message = val.substring(name.length() + 1);
|
||||
final L2PcInstance reciever = L2World.getInstance().getPlayer(name);
|
||||
final CreatureSay cs = new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", message);
|
||||
if (reciever != null)
|
||||
{
|
||||
reciever.sendPacket(cs);
|
||||
reciever.sendPacket(new CreatureSay(0, ChatType.WHISPER, "Telnet Priv", message));
|
||||
_print.println("Telnet Priv->" + name + ": " + message);
|
||||
_print.println("Message Sent!");
|
||||
}
|
||||
|
@@ -306,13 +306,7 @@ public class DebugHandler implements ITelnetHandler
|
||||
|
||||
private long[] findDeadlockedThreads(ThreadMXBean mbean)
|
||||
{
|
||||
// JDK 1.5 only supports the findMonitorDeadlockedThreads()
|
||||
// method, so you need to comment out the following three lines
|
||||
if (mbean.isSynchronizerUsageSupported())
|
||||
{
|
||||
return mbean.findDeadlockedThreads();
|
||||
}
|
||||
return mbean.findMonitorDeadlockedThreads();
|
||||
return mbean.isSynchronizerUsageSupported() ? mbean.findDeadlockedThreads() : mbean.findMonitorDeadlockedThreads();
|
||||
}
|
||||
|
||||
private Thread findMatchingThread(ThreadInfo inf)
|
||||
@@ -354,12 +348,9 @@ public class DebugHandler implements ITelnetHandler
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (obj instanceof L2Character)
|
||||
if ((obj instanceof L2Character) && ((L2Character) obj).hasAI())
|
||||
{
|
||||
if (((L2Character) obj).hasAI())
|
||||
{
|
||||
AICount++;
|
||||
}
|
||||
AICount++;
|
||||
}
|
||||
if (obj instanceof L2ItemInstance)
|
||||
{
|
||||
|
@@ -142,12 +142,9 @@ public class StatusHandler implements ITelnetHandler
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (obj instanceof L2Character)
|
||||
if ((obj instanceof L2Character) && ((L2Character) obj).hasAI())
|
||||
{
|
||||
if (((L2Character) obj).hasAI())
|
||||
{
|
||||
AICount++;
|
||||
}
|
||||
AICount++;
|
||||
}
|
||||
if (obj instanceof L2ItemInstance)
|
||||
{
|
||||
|
Reference in New Issue
Block a user