forked from unimatrix/web
Update DuneRealms.java
This commit is contained in:
parent
f0d6a38727
commit
52db9c484c
1 changed files with 18 additions and 1 deletions
|
|
@ -380,7 +380,24 @@ public final class DuneRealms extends JavaPlugin implements Listener, CommandExe
|
|||
// Only the current Steward of Dune has legal spice travel privileges.
|
||||
if(emperorSanctioned(p,planet)) {
|
||||
if(sharedDatabase==null){p.sendMessage(ChatColor.RED+"Emperor-sanctioned travel requires shared database.");return;}
|
||||
sharedDatabase.issueArrakisPermit(p.getUniqueId(),System.currentTimeMillis()+120000L);
|
||||
|
||||
try {
|
||||
sharedDatabase.issueArrakisPermit(
|
||||
p.getUniqueId(),
|
||||
System.currentTimeMillis() + 120000L
|
||||
);
|
||||
} catch (java.sql.SQLException e) {
|
||||
getLogger().log(
|
||||
java.util.logging.Level.SEVERE,
|
||||
"Failed to issue Arrakis travel permit for " + p.getName(),
|
||||
e
|
||||
);
|
||||
p.sendMessage(
|
||||
ChatColor.RED + "Unable to authorize Arrakis travel. Please try again."
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream(bytes);
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff