Three bugs, two commands

Please Note: The TotalFreedom Forum has now been put into a read-only mode. Total Freedom has now closed down and will not be returning in any way, shape or form. It has been a pleasure to lead this community and I wish you all the best for your futures.
  • I've already written fixes for these commands, but haven't created a pull request just yet (waiting for pull request #43 to go through). This is to let the developers create a ticket without things becoming too confusing.

    Here are the three bugs I mentioned in this thread's title:

    • When doing /list -t, the command redundantly checks to see if the sender is admin twice. It accomplishes this by first checking the sender, then checking the player the sender represents. This results in a NullPointerException when attempting to execute the command from a non-player source (such as Telnet) as the sender does not represent a player from those sources:
      https://i.imgur.com/lGDALMK.png

    • Due to a fuck-up by a developer, /tempban is hardcoded to ban for 24 hours. This explains the inconsistent ban times as noted here: https://forum.totalfreedom.me/d/870-when-a-p…ed-for-24-hours
      https://i.imgur.com/dncjeTZ.png

    • Using /tempban on a player who has joined in the past but isn't currently offline causes the plugin to throw a NullPointerException. This is because the getPlayer method returns null if a player isn't online. The command does verify this, but continues to try to call methods from the null player anyways. Here's the stacktrace:

    image.png