Prevent jobs from earning players money. Add temporary revenue source.
Add bug report announcement message.
This commit is contained in:
parent
e3e199c1e3
commit
8f97b8b94b
@ -2489,13 +2489,29 @@ public void runTick() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (Main.SERVER_TICK_TIME%72000==0) {
|
||||||
|
for (int i=0;i<SPEED_CONTROL.size();i++) {
|
||||||
|
SPEED_CONTROL.get(i).p.sendMessage(ChatColor.AQUA+""+ChatColor.ITALIC+" Please report any and all bugs on the bug report website! http://zgamers.domain.com/");
|
||||||
|
SPEED_CONTROL.get(i).p.sendMessage(ChatColor.WHITE+"No matter how small, we'll get things resolved faster with your help!");
|
||||||
|
SPEED_CONTROL.get(i).p.sendMessage("");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (Main.SERVER_TICK_TIME%36000==0) {
|
if (Main.SERVER_TICK_TIME%36000==0) {
|
||||||
//Every 30 minutes, clear out the list of poisoned mobs, in case some are non-existent now.
|
//Every 30 minutes, clear out the list of poisoned mobs, in case some are non-existent now.
|
||||||
mob_list.clear();
|
mob_list.clear();
|
||||||
//Report player incomes.
|
//Report player incomes.
|
||||||
for (int i=0;i<SPEED_CONTROL.size();i++) {
|
for (int i=0;i<SPEED_CONTROL.size();i++) {
|
||||||
|
//Every 30 minutes, award players with income who are doing things.
|
||||||
|
double earned = 0;
|
||||||
|
if (getPlayerData(SPEED_CONTROL.get(i).p).gameinteractions>10000) {earned=20;} else {
|
||||||
|
earned=(getPlayerData(SPEED_CONTROL.get(i).p).gameinteractions/10000d)*10d;
|
||||||
|
}
|
||||||
|
economy.depositPlayer(p.getName(), earned);
|
||||||
|
getPlayerData(SPEED_CONTROL.get(i).p).gameinteractions=0;
|
||||||
|
DecimalFormat df = new DecimalFormat("#0.00");
|
||||||
|
SPEED_CONTROL.get(i).p.sendMessage(ChatColor.YELLOW+"You made $"+df.format(earned)+" in the past hour!");
|
||||||
SPEED_CONTROL.get(i).updatePlayerSpd();
|
SPEED_CONTROL.get(i).updatePlayerSpd();
|
||||||
try
|
/*try
|
||||||
{
|
{
|
||||||
String filename= "PlayerBuffData.txt";
|
String filename= "PlayerBuffData.txt";
|
||||||
FileWriter fw = new FileWriter(filename,true); //the true will append the new data
|
FileWriter fw = new FileWriter(filename,true); //the true will append the new data
|
||||||
@ -2509,7 +2525,7 @@ public void runTick() {
|
|||||||
catch(IOException ioe)
|
catch(IOException ioe)
|
||||||
{
|
{
|
||||||
System.err.println("IOException: " + ioe.getMessage());
|
System.err.println("IOException: " + ioe.getMessage());
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Main.SERVER_TICK_TIME%600==0) {
|
if (Main.SERVER_TICK_TIME%600==0) {
|
||||||
@ -4231,7 +4247,9 @@ public void payDay(int time)
|
|||||||
public void gainMoneyExp(String p,String job,double amount,double exp) {
|
public void gainMoneyExp(String p,String job,double amount,double exp) {
|
||||||
Player m = Bukkit.getPlayer(p);
|
Player m = Bukkit.getPlayer(p);
|
||||||
if (m!=null) {
|
if (m!=null) {
|
||||||
|
/* DISABLED AT THE MOMENT.
|
||||||
gainMoneyExp(m,job,amount,exp);
|
gainMoneyExp(m,job,amount,exp);
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
Bukkit.getLogger().severe("Could not find player "+p+"! Could not add in job experience!");
|
Bukkit.getLogger().severe("Could not find player "+p+"! Could not add in job experience!");
|
||||||
}
|
}
|
||||||
@ -4272,6 +4290,7 @@ public void payDay(int time)
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void gainMoneyExp(Player p,String job,double amount,double exp) {
|
public void gainMoneyExp(Player p,String job,double amount,double exp) {
|
||||||
|
/* DISABLED AT THE MOMENT.
|
||||||
String[] jobs = getJobs(p);
|
String[] jobs = getJobs(p);
|
||||||
int slot=-1;
|
int slot=-1;
|
||||||
if (getConfig().getBoolean("halloween-enabled") || getConfig().getBoolean("thanksgiving-enabled")) {
|
if (getConfig().getBoolean("halloween-enabled") || getConfig().getBoolean("thanksgiving-enabled")) {
|
||||||
@ -4314,6 +4333,7 @@ public void payDay(int time)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//saveAccountsConfig() //Commented out;
|
//saveAccountsConfig() //Commented out;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void levelUpJob(Player p, String job) {
|
public void levelUpJob(Player p, String job) {
|
||||||
|
@ -261,7 +261,7 @@ public class PlayerBuffData {
|
|||||||
last_money_report_time=Main.SERVER_TICK_TIME;
|
last_money_report_time=Main.SERVER_TICK_TIME;
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName().toLowerCase()+".settings.notify6")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName().toLowerCase()+".settings.notify6")) {
|
||||||
DecimalFormat df = new DecimalFormat("#0.00");
|
DecimalFormat df = new DecimalFormat("#0.00");
|
||||||
p.sendMessage(ChatColor.YELLOW+""+ChatColor.ITALIC+"You have earned $"+df.format(money_gained)+" from your jobs in the past hour.");
|
//p.sendMessage(ChatColor.YELLOW+""+ChatColor.ITALIC+"You have earned $"+df.format(money_gained)+" from your jobs in the past hour.");
|
||||||
}
|
}
|
||||||
money_gained=0;
|
money_gained=0;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import org.bukkit.entity.Player;
|
|||||||
public class PlayerData {
|
public class PlayerData {
|
||||||
int buildamt=10;
|
int buildamt=10;
|
||||||
Material lastblocktype=null;
|
Material lastblocktype=null;
|
||||||
|
int gameinteractions=0;
|
||||||
long lastinteracttime=0;
|
long lastinteracttime=0;
|
||||||
long lastminetime=0;
|
long lastminetime=0;
|
||||||
long lastsneaktime=0;
|
long lastsneaktime=0;
|
||||||
|
@ -4480,6 +4480,8 @@ implements Listener
|
|||||||
int myData=this.plugin.getPlayerDataSlot(p);
|
int myData=this.plugin.getPlayerDataSlot(p);
|
||||||
boolean has_silktouch=p.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
boolean has_silktouch=p.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH);
|
||||||
|
|
||||||
|
this.plugin.getPlayerData(p).gameinteractions+=50;
|
||||||
|
|
||||||
//*******************************//Job Buffs Begin here!
|
//*******************************//Job Buffs Begin here!
|
||||||
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && p.getAllowFlight()) {
|
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && p.getAllowFlight()) {
|
||||||
if (p.getGameMode()!=GameMode.CREATIVE) {
|
if (p.getGameMode()!=GameMode.CREATIVE) {
|
||||||
@ -12053,6 +12055,7 @@ implements Listener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockPlace(BlockPlaceEvent e) {
|
public void onBlockPlace(BlockPlaceEvent e) {
|
||||||
Player p = e.getPlayer();
|
Player p = e.getPlayer();
|
||||||
|
this.plugin.getPlayerData(p).gameinteractions+=50;
|
||||||
//***********************************//JOB BUFFFS!!! HYPE
|
//***********************************//JOB BUFFFS!!! HYPE
|
||||||
if (this.plugin.PlayerinJob(p, "Builder")) {
|
if (this.plugin.PlayerinJob(p, "Builder")) {
|
||||||
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && !p.getAllowFlight()) {
|
if (this.plugin.hasJobBuff("Builder", p, Job.JOB40) && !p.getAllowFlight()) {
|
||||||
@ -16228,6 +16231,7 @@ implements Listener
|
|||||||
public void onPlayerMove(PlayerMoveEvent e) {
|
public void onPlayerMove(PlayerMoveEvent e) {
|
||||||
if (e.getPlayer().isOnGround() && this.plugin.hasJobBuff("Fisherman", e.getPlayer(), Job.JOB40) && e.getPlayer().getItemInHand().getType()==Material.FISHING_ROD && !e.getPlayer().getAllowFlight()) {
|
if (e.getPlayer().isOnGround() && this.plugin.hasJobBuff("Fisherman", e.getPlayer(), Job.JOB40) && e.getPlayer().getItemInHand().getType()==Material.FISHING_ROD && !e.getPlayer().getAllowFlight()) {
|
||||||
this.plugin.getPlayerData(e.getPlayer()).haslanded=true;
|
this.plugin.getPlayerData(e.getPlayer()).haslanded=true;
|
||||||
|
this.plugin.getPlayerData(e.getPlayer()).gameinteractions+=1;
|
||||||
e.getPlayer().setAllowFlight(true);
|
e.getPlayer().setAllowFlight(true);
|
||||||
e.getPlayer().sendMessage(ChatColor.DARK_GRAY+""+ChatColor.ITALIC+"Flight enabled...");
|
e.getPlayer().sendMessage(ChatColor.DARK_GRAY+""+ChatColor.ITALIC+"Flight enabled...");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user