Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!p.hasPermission("stoneharry.freetalk"))
- {
- long sent = System.currentTimeMillis();
- long lasttime = lastmessage.get(p.getName());
- if (lasttime != 0)
- {
- int result = (int)(sent-lasttime);
- if (result < 60)
- {
- chat.setCancelled(true);
- p.sendMessage(ChatColor.RED + "You must wait " + ChatColor.AQUA + String.valueOf(result) + ChatColor.RED + " more seconds before you can send a message again.");
- }
- }
- else
- {
- lastmessage.put(p.getName(), sent);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment