Fix the time not being converted correctly.

This commit is contained in:
graywolf336 2014-07-14 18:03:17 -05:00
parent c7de4364b1
commit f042af4731
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.concurrent.TimeUnit;
import org.bukkit.Location;
import org.bukkit.configuration.file.YamlConfiguration;
@ -123,7 +124,7 @@ public class OldInputOutput {
j = pl.getJailManager().getJails().iterator().next();
}
Prisoner p = new Prisoner(pl.getServer().getOfflinePlayer(name).getUniqueId().toString(), name, set.getBoolean("muted"), (long) set.getInt("RemainTime"), set.getString("Jailer"), set.getString("reason"));
Prisoner p = new Prisoner(pl.getServer().getOfflinePlayer(name).getUniqueId().toString(), name, set.getBoolean("muted"), TimeUnit.MILLISECONDS.convert(set.getInt("RemainTime") / 6, TimeUnit.MINUTES), set.getString("Jailer"), set.getString("reason"));
p.setOfflinePending(set.getBoolean("Offline"));
p.setToBeTransferred(transfer);

View File

@ -2,7 +2,7 @@ name: Jail
main: com.graywolf336.jail.JailMain
version: ${project.version}-b${BUILD_NUMBER}
description: Ban too harsh? Kick/mute/whatever not enough? Jail bad players!
authors: [matejdro,multidude,graywolf336]
authors: [graywolf336]
website: dev.bukkit.org/server-mods/jail/
softdepend: [WorldEdit, Vault]
load: POSTWORLD