Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.plugin.java.JavaPlugin;
- import java.text.SimpleDateFormat;
- import java.util.Date;
- /**
- * @author VINETOS on 19/09/2015.
- */
- public class Main extends JavaPlugin {
- @Override
- public void onEnable() {
- }
- private int seconds = 72;
- @Override
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- if(command.getName().equalsIgnoreCase("date")){
- //19/09/2015 15:42
- String date = new SimpleDateFormat("dd/MM/yy HH:mm").format(new Date(System.currentTimeMillis()));
- String date2 = new SimpleDateFormat("mm:ss").format(new Date(seconds * 1000));
- sender.sendMessage("§cDate générale: "+date+ " §aDate compte à rebourd: " + date2);
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment