mirror of
https://github.com/plexusorg/Module-NUSH.git
synced 2024-10-31 17:17:13 +00:00
Fix set time
This commit is contained in:
parent
94ff2fa56e
commit
dcee385ae5
@ -48,4 +48,10 @@ public class NUSHModule extends PlexModule
|
||||
enabled = toggle;
|
||||
config.set("server.enabled", toggle);
|
||||
}
|
||||
|
||||
public static void setTime(int minutes)
|
||||
{
|
||||
time = minutes;
|
||||
config.set("server.wait_time", minutes);
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class UserData
|
||||
USERS_MAP.remove(player.getUniqueId());
|
||||
}
|
||||
},
|
||||
20L * 60L * NUSHModule.getConfig().getInt("server.wait_time", 2));
|
||||
20L * 60L * NUSHModule.getTime());
|
||||
}
|
||||
|
||||
public static boolean isNewPlayer(Player player)
|
||||
|
@ -68,7 +68,7 @@ public class NUSHCommand extends PlexCommand
|
||||
return MiniMessage.miniMessage().deserialize("<red>The time must be a number!");
|
||||
}
|
||||
|
||||
NUSHModule.getConfig().set("server.wait_time", time);
|
||||
NUSHModule.setTime(time);
|
||||
return MiniMessage.miniMessage().deserialize("<gray>The wait time for new players before they can chat is now set to <yellow>" + time + "</yellow> minutes.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user