Prepare getKeepAliveTime method for MCAccess.

No implementation of it yet. If implemented this will help finding
players that do a passive god-mode.
This commit is contained in:
asofold 2013-02-02 08:13:59 +01:00
parent 25a3c9663b
commit aa171f9687
6 changed files with 37 additions and 0 deletions

View File

@ -127,5 +127,12 @@ public interface MCAccess {
* @param i
*/
public void setDead(Player player, int deathTicks);
/**
* Get timestamp of the keep-alive field (not only updated on keep-alive packets).
* @param player The player for which to get the time.
* @return Long.MIN_VALUE if not possible.
*/
public long getKeepAliveTime(Player player);
}

View File

@ -166,5 +166,11 @@ public class MCAccessBukkit implements MCAccess, BlockPropertiesSetup{
}
}
}
@Override
public long getKeepAliveTime(final Player player) {
// TODO: Implement if possible.
return Long.MIN_VALUE;
}
}

View File

@ -153,5 +153,11 @@ public class MCAccessCB2511 implements MCAccess {
mcPlayer.deathTicks = deathTicks;
mcPlayer.dead = true;
}
@Override
public long getKeepAliveTime(final Player player) {
// TODO: Implement if possible.
return Long.MIN_VALUE;
}
}

View File

@ -153,4 +153,10 @@ public class MCAccessCB2512 implements MCAccess{
mcPlayer.dead = true;
}
@Override
public long getKeepAliveTime(final Player player) {
// TODO: Implement if possible.
return Long.MIN_VALUE;
}
}

View File

@ -153,4 +153,10 @@ public class MCAccessCB2545 implements MCAccess{
mcPlayer.dead = true;
}
@Override
public long getKeepAliveTime(final Player player) {
// TODO: Implement if possible.
return Long.MIN_VALUE;
}
}

View File

@ -154,4 +154,10 @@ public class MCAccessCBDev implements MCAccess{
mcPlayer.dead = true;
}
@Override
public long getKeepAliveTime(final Player player) {
// TODO: Implement if possible.
return Long.MIN_VALUE;
}
}