Minor fixes.
This commit is contained in:
parent
c7b6b5fe9e
commit
9d86e06c16
Binary file not shown.
@ -19,6 +19,8 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
|
import aPlugin.DiscordMessageSender;
|
||||||
|
|
||||||
public class AutoUpdatePlugin implements Runnable {
|
public class AutoUpdatePlugin implements Runnable {
|
||||||
List<Plugin> plugins;
|
List<Plugin> plugins;
|
||||||
boolean restarting=false;
|
boolean restarting=false;
|
||||||
@ -71,6 +73,7 @@ public class AutoUpdatePlugin implements Runnable {
|
|||||||
//Save the new plugin hash.
|
//Save the new plugin hash.
|
||||||
plugins.get(i).hash = md5;
|
plugins.get(i).hash = md5;
|
||||||
SaveHash(plugins.get(i));
|
SaveHash(plugins.get(i));
|
||||||
|
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!");
|
||||||
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!");
|
Bukkit.broadcastMessage("The server has detected a new version of "+ChatColor.YELLOW+plugins.get(i).name+". The server will restart in 3 minutes!");
|
||||||
//Move the file to the new location.
|
//Move the file to the new location.
|
||||||
try {
|
try {
|
||||||
|
@ -478,7 +478,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
//Check damage reduction by sending an artifical "1" damage to the player.
|
//Check damage reduction by sending an artifical "1" damage to the player.
|
||||||
if (!p.isDead()) {setPlayerMaxHealth(p);}
|
if (!p.isDead()) {setPlayerMaxHealth(p);}
|
||||||
p.getScoreboard().getTeam(p.getName().toLowerCase()).setSuffix(createHealthbar(((p.getHealth())/p.getMaxHealth())*100,p));
|
p.getScoreboard().getTeam(p.getName().toLowerCase()).setSuffix(createHealthbar(((p.getHealth())/p.getMaxHealth())*100,p));
|
||||||
double old_weapondmg = pd.prev_weapondmg;
|
/*double old_weapondmg = pd.prev_weapondmg;
|
||||||
double old_buffdmg = pd.prev_buffdmg;
|
double old_buffdmg = pd.prev_buffdmg;
|
||||||
double old_partydmg = pd.prev_partydmg;
|
double old_partydmg = pd.prev_partydmg;
|
||||||
double old_armordef = pd.prev_armordef;
|
double old_armordef = pd.prev_armordef;
|
||||||
@ -504,7 +504,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
&& old_partydmg == pd.prev_partydmg && old_buffdmg == pd.prev_buffdmg) {
|
&& old_partydmg == pd.prev_partydmg && old_buffdmg == pd.prev_buffdmg) {
|
||||||
p.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Base Damage: "+ChatColor.RESET+""+ChatColor.DARK_PURPLE+df.format(pd.damagedealt)+" "+ChatColor.GRAY+ChatColor.ITALIC+"Damage Reduction: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+Math.round((1.0-pd.damagereduction)*100)+"%");
|
p.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Base Damage: "+ChatColor.RESET+""+ChatColor.DARK_PURPLE+df.format(pd.damagedealt)+" "+ChatColor.GRAY+ChatColor.ITALIC+"Damage Reduction: "+ChatColor.RESET+""+ChatColor.DARK_AQUA+Math.round((1.0-pd.damagereduction)*100)+"%");
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
//Try to fit into an already existing party.
|
//Try to fit into an already existing party.
|
||||||
@ -5392,12 +5392,14 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server is restarting in 1 minute for a plugin update!");
|
||||||
Bukkit.broadcastMessage(ChatColor.YELLOW+"The server is restarting in 1 minute for a plugin update!");
|
Bukkit.broadcastMessage(ChatColor.YELLOW+"The server is restarting in 1 minute for a plugin update!");
|
||||||
}
|
}
|
||||||
},20*120);
|
},20*120);
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(Bukkit.getPluginManager().getPlugin("TwosideKeeper"), new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
DiscordMessageSender.sendItalicizedRawMessageDiscord("The server is restarting in 10 seconds!");
|
||||||
Bukkit.broadcastMessage(ChatColor.RED+"The server is restarting in 10 seconds!");
|
Bukkit.broadcastMessage(ChatColor.RED+"The server is restarting in 10 seconds!");
|
||||||
}
|
}
|
||||||
},20*170);
|
},20*170);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user