0

Fixed lol id times, changed prefix to old format, fixed lol see perms

This commit is contained in:
Pepich 2017-02-07 20:27:55 +01:00
parent bf43118cdc
commit 96b36219e4

View File

@ -15,7 +15,7 @@ import com.redstoner.misc.Main;
import com.redstoner.misc.Utils; import com.redstoner.misc.Utils;
import com.redstoner.modules.Module; import com.redstoner.modules.Module;
@Version(major = 1, minor = 0, revision = 1, compatible = 1) @Version(major = 1, minor = 0, revision = 2, compatible = 1)
public class Saylol implements Module public class Saylol implements Module
{ {
private long lastLol = 0; private long lastLol = 0;
@ -95,7 +95,7 @@ public class Saylol implements Module
if (time - lastLol < 15000) if (time - lastLol < 15000)
{ {
Utils.sendErrorMessage(sender, null, Utils.sendErrorMessage(sender, null,
"You can't use saylol for another " + Math.floor(time - lastLol) + "s."); "You can't use saylol for another " + (14 - (int) Math.ceil((time - lastLol) / 1000)) + "s.");
return true; return true;
} }
if (id < 0 || id >= lols.size()) if (id < 0 || id >= lols.size())
@ -108,12 +108,12 @@ public class Saylol implements Module
name = ((Player) sender).getDisplayName(); name = ((Player) sender).getDisplayName();
else else
name = "&9" + sender.getName(); name = "&9" + sender.getName();
Utils.broadcast(null, name + "&8: &e" + lols.get(id), new BroadcastFilter() Utils.broadcast("&8[&blol&8]", name + "&8: &e" + lols.get(id), new BroadcastFilter()
{ {
@Override @Override
public boolean sendTo(CommandSender recipient) public boolean sendTo(CommandSender recipient)
{ {
return sender.hasPermission("utils.lol.see"); return recipient.hasPermission("utils.lol.see");
} }
}, '&'); }, '&');
lastLol = time; lastLol = time;
@ -137,12 +137,12 @@ public class Saylol implements Module
name = "&9" + sender.getName(); name = "&9" + sender.getName();
Random random = new Random(); Random random = new Random();
int id = random.nextInt(lols.size()); int id = random.nextInt(lols.size());
Utils.broadcast(null, name + "&8: &e" + lols.get(id), new BroadcastFilter() Utils.broadcast("&8[&blol&8]", name + "&8: &e" + lols.get(id), new BroadcastFilter()
{ {
@Override @Override
public boolean sendTo(CommandSender recipient) public boolean sendTo(CommandSender recipient)
{ {
return sender.hasPermission("utils.lol.see"); return recipient.hasPermission("utils.lol.see");
} }
}, '&'); }, '&');
lastLol = time; lastLol = time;