This is VERY easy to add..
Notes:
Server updating is not needed, player logging is not needed. All this does is take your SERVER BONUS from Config which is usually 1, and makes it 2 on Saturday and on Sunday.
First, go into your Config class and declare:
Also, in your Config class, find:
and change it to:
Next, go into your Client class and add in one of your welcome messages (OPTIONAL):
Now, in PlayerHandler, add this method in there:
And, still in PlayerHandler add this below updatePlayerNames();:
Also, in PlayerHandler, add this import:
Enjoy.
Notes:
Server updating is not needed, player logging is not needed. All this does is take your SERVER BONUS from Config which is usually 1, and makes it 2 on Saturday and on Sunday.
First, go into your Config class and declare:
Code:
public static boolean doubleEXPWeekend = false;
Also, in your Config class, find:
Code:
public static final double SERVER_EXP_BONUS = 1;
Code:
public static double SERVER_EXP_BONUS = 1;
Next, go into your Client class and add in one of your welcome messages (OPTIONAL):
Code:
if (Config.doubleEXPWeekend == true) {
sendMessage("Enjoy Double EXP Weekend!");
}
Now, in PlayerHandler, add this method in there:
Code:
public final void getDoubleEXPWeekend() {
Calendar calendar = new GregorianCalendar();
int day = calendar.get(Calendar.DAY_OF_WEEK);
Config.doubleEXPWeekend = false;
if (day > 6) {
Config.doubleEXPWeekend = true;
Config.SERVER_EXP_BONUS = 2;
return;
} else if (day < 2) {
Config.doubleEXPWeekend = true;
Config.SERVER_EXP_BONUS = 2;
return;
}
Config.SERVER_EXP_BONUS = 1;
}
And, still in PlayerHandler add this below updatePlayerNames();:
Code:
getDoubleEXPWeekend();
Also, in PlayerHandler, add this import:
Code:
import java.util.Calendar;
import java.util.GregorianCalendar;
Enjoy.