geforkt von Mirrors/HeadDB
fix update command
Dieser Commit ist enthalten in:
Ursprung
1bd19efd20
Commit
e12944145b
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>tsp.headdb</groupId>
|
<groupId>tsp.headdb</groupId>
|
||||||
<artifactId>HeadDB</artifactId>
|
<artifactId>HeadDB</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>HeadDB</name>
|
<name>HeadDB</name>
|
||||||
|
@ -121,7 +121,7 @@ public class CommandHeadDB implements CommandExecutor {
|
|||||||
ItemStack item = head.getItemStack();
|
ItemStack item = head.getItemStack();
|
||||||
item.setAmount(amount);
|
item.setAmount(amount);
|
||||||
target.getInventory().addItem(item);
|
target.getInventory().addItem(item);
|
||||||
Utils.sendMessage(sender, "Given &c" + target.getName() + " &ex" + amount + " " + head.getName());
|
Utils.sendMessage(sender, "&7Gave &6" + target.getName() + " &ex" + amount + " " + head.getName());
|
||||||
return true;
|
return true;
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
Utils.sendMessage(sender, "&cID/Amount must be a number!");
|
Utils.sendMessage(sender, "&cID/Amount must be a number!");
|
||||||
@ -135,11 +135,11 @@ public class CommandHeadDB implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.sendMessage(sender, "Updating...");
|
Utils.sendMessage(sender, "&7Updating...");
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
HeadAPI.getDatabase().updateAsync(heads -> {
|
HeadAPI.getDatabase().updateAsync(heads -> {
|
||||||
Utils.sendMessage(sender, "&7Done! Took: &a" + TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - start) + " &7seconds");
|
Utils.sendMessage(sender, "&7Done! Took: &a" + TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - start) + " &7seconds");
|
||||||
Utils.sendMessage(sender, "&7There are &a" + HeadAPI.getHeads() + " &7heads in the database!");
|
Utils.sendMessage(sender, "&7There are &a" + HeadAPI.getHeads().size() + " &7heads in the database!");
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren