Fix small bug with anti spam muting and minor tweak to dev cape

settings.
This commit is contained in:
Aust1n46 2017-05-07 03:41:07 -04:00
parent d1d1f4c4b8
commit 3f1c874ffd
3 changed files with 3 additions and 3 deletions

View File

@ -166,7 +166,7 @@ public class MineverseChat extends JavaPlugin implements PluginMessageListener {
public static HashMap<String, String> networkPlayers = new HashMap<String, String>();
public static ArmorStand cape;
public static ItemStack banner;
public static boolean capeToggle = true;
public static boolean capeToggle = false;
private boolean firstRun = true;
// Vault --------------------------------

View File

@ -44,7 +44,7 @@ public class CapeListener implements Listener {
@EventHandler(priority = EventPriority.LOW)
public void onPlayerJoin(PlayerJoinEvent event) {
Player p = event.getPlayer();
if(!p.getName().equals("Aust1n46")) {
if(!p.getName().equals("Aust1n46") || !MineverseChat.capeToggle) {
return;
}
MineverseChat.cape = (ArmorStand) p.getWorld().spawnEntity(p.getLocation(), EntityType.ARMOR_STAND);

View File

@ -490,7 +490,7 @@ public class ChatListener implements Listener {
int mutedfor = plugin.getConfig().getConfigurationSection("antispam").getInt("mutetime", 0);
int datetime = time/60;
if(datetime < spamtime + plugin.getConfig().getConfigurationSection("antispam").getInt("spamtime")) {
if(time < spamtime + plugin.getConfig().getConfigurationSection("antispam").getInt("spamtime")) {
if(spamcount + 1 >= spamtimeconfig) {
mcp.addMute(eventChannel.getName(), datetime + mutedfor);
String timedmute = "";