@@ -34,6 +34,7 @@ import java.io.*;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import static pers.xanadu.enderdragon.util.UpdateChecker.checkUpdate;
|
import static pers.xanadu.enderdragon.util.UpdateChecker.checkUpdate;
|
||||||
|
|
||||||
@@ -203,8 +204,11 @@ public final class EnderDragon extends JavaPlugin {
|
|||||||
Objects.requireNonNull(getCommand("enderdragon")).setTabCompleter(new TabCompleter());
|
Objects.requireNonNull(getCommand("enderdragon")).setTabCompleter(new TabCompleter());
|
||||||
}
|
}
|
||||||
private void unregisterCommands(){
|
private void unregisterCommands(){
|
||||||
Objects.requireNonNull(getCommand("enderdragon")).setExecutor(null);
|
Optional.ofNullable(getCommand("enderdragon"))
|
||||||
Objects.requireNonNull(getCommand("enderdragon")).setTabCompleter(null);
|
.ifPresent(command -> {
|
||||||
|
command.setExecutor(null);
|
||||||
|
command.setTabCompleter(null);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
private void loadConfig(){
|
private void loadConfig(){
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
|
|||||||
@@ -1,10 +1,49 @@
|
|||||||
package pers.xanadu.enderdragon.config;
|
package pers.xanadu.enderdragon.config;
|
||||||
|
|
||||||
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
|
import static pers.xanadu.enderdragon.EnderDragon.plugin;
|
||||||
|
|
||||||
public class FileUpdater {
|
public class FileUpdater {
|
||||||
public static void update() throws IOException {
|
public static void update() throws IOException {
|
||||||
Lang.warn("Nothing to update.");
|
boolean updated = false;
|
||||||
|
File folder = new File(plugin.getDataFolder(),"setting");
|
||||||
|
if(folder.exists()){
|
||||||
|
File[] files = folder.listFiles();
|
||||||
|
if(files != null){
|
||||||
|
for(File file : files){
|
||||||
|
FileConfiguration config = YamlConfiguration.loadConfiguration(file);
|
||||||
|
String ver = config.getString("version");
|
||||||
|
if(!"2.4.0".equals(ver)) {
|
||||||
|
Lang.error("The version of setting/"+file.getName()+" is not supported!");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
updated = true;
|
||||||
|
String name = file.getName();
|
||||||
|
Config.copyFile("setting/"+name,"new/setting/"+name,true);
|
||||||
|
}
|
||||||
|
File new_folder = new File(plugin.getDataFolder(),"new/setting/");
|
||||||
|
files = new_folder.listFiles();
|
||||||
|
if(files != null){
|
||||||
|
for(File file : files){
|
||||||
|
FileConfiguration fc = YamlConfiguration.loadConfiguration(file);
|
||||||
|
fc.set("version","2.5.4");
|
||||||
|
fc.set("bossbar.create_fog",fc.getBoolean("bossbar.create_frog"));
|
||||||
|
fc.set("bossbar.create_frog",null);
|
||||||
|
fc.save(file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (updated){
|
||||||
|
Lang.info("New config files are generated in plugins/EnderDragon/new.");
|
||||||
|
Lang.warn("Attention: Please confirm the accuracy before using new config!");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Lang.warn("Nothing to update!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.bukkit.potion.PotionEffect;
|
|||||||
import pers.xanadu.enderdragon.manager.DragonManager;
|
import pers.xanadu.enderdragon.manager.DragonManager;
|
||||||
import pers.xanadu.enderdragon.manager.WorldManager;
|
import pers.xanadu.enderdragon.manager.WorldManager;
|
||||||
import pers.xanadu.enderdragon.metadata.MyDragon;
|
import pers.xanadu.enderdragon.metadata.MyDragon;
|
||||||
|
import pers.xanadu.enderdragon.util.Version;
|
||||||
|
|
||||||
import static pers.xanadu.enderdragon.manager.DragonManager.getSpecialKey;
|
import static pers.xanadu.enderdragon.manager.DragonManager.getSpecialKey;
|
||||||
|
|
||||||
@@ -34,6 +35,7 @@ public class DragonFireballListener implements Listener {
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
private static final Particle ILLEGAL_SPELL_MOB = Version.NBT_UPDATE?null:Particle.valueOf("SPELL_MOB");
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void OnEffectCloudSpawn(final EntitySpawnEvent e){
|
public void OnEffectCloudSpawn(final EntitySpawnEvent e){
|
||||||
@@ -51,8 +53,14 @@ public class DragonFireballListener implements Listener {
|
|||||||
effectCloud.setRadiusPerTick((float) myDragon.effect_cloud_expand_speed/20f);
|
effectCloud.setRadiusPerTick((float) myDragon.effect_cloud_expand_speed/20f);
|
||||||
effectCloud.setDuration(myDragon.effect_cloud_duration * 20);
|
effectCloud.setDuration(myDragon.effect_cloud_duration * 20);
|
||||||
if(myDragon.effect_cloud_color_R != -1){
|
if(myDragon.effect_cloud_color_R != -1){
|
||||||
effectCloud.setParticle(Particle.SPELL_MOB);
|
Color color = Color.fromRGB(myDragon.effect_cloud_color_R,myDragon.effect_cloud_color_G,myDragon.effect_cloud_color_B);
|
||||||
effectCloud.setColor(Color.fromRGB(myDragon.effect_cloud_color_R,myDragon.effect_cloud_color_G,myDragon.effect_cloud_color_B));
|
if (Version.NBT_UPDATE){
|
||||||
|
effectCloud.setParticle(Particle.ENTITY_EFFECT, color);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
effectCloud.setParticle(ILLEGAL_SPELL_MOB);
|
||||||
|
}
|
||||||
|
effectCloud.setColor(color);
|
||||||
}
|
}
|
||||||
effectCloud.clearCustomEffects();
|
effectCloud.clearCustomEffects();
|
||||||
for(PotionEffect effect : myDragon.effect_cloud_potion){
|
for(PotionEffect effect : myDragon.effect_cloud_potion){
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class DragonSpawnListener implements Listener {
|
|||||||
if(bossBar != null){
|
if(bossBar != null){
|
||||||
bossBar.setColor(BarColor.valueOf(myDragon.bossbar_color));
|
bossBar.setColor(BarColor.valueOf(myDragon.bossbar_color));
|
||||||
bossBar.setStyle(BarStyle.valueOf(myDragon.bossbar_style));
|
bossBar.setStyle(BarStyle.valueOf(myDragon.bossbar_style));
|
||||||
if(myDragon.bossbar_create_frog) bossBar.addFlag(BarFlag.CREATE_FOG);
|
if(myDragon.bossbar_create_fog) bossBar.addFlag(BarFlag.CREATE_FOG);
|
||||||
else bossBar.removeFlag(BarFlag.CREATE_FOG);
|
else bossBar.removeFlag(BarFlag.CREATE_FOG);
|
||||||
if(myDragon.bossbar_darken_sky) bossBar.addFlag(BarFlag.DARKEN_SKY);
|
if(myDragon.bossbar_darken_sky) bossBar.addFlag(BarFlag.DARKEN_SKY);
|
||||||
else bossBar.removeFlag(BarFlag.DARKEN_SKY);
|
else bossBar.removeFlag(BarFlag.DARKEN_SKY);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
|||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import pers.xanadu.enderdragon.config.Config;
|
import pers.xanadu.enderdragon.config.Config;
|
||||||
|
import pers.xanadu.enderdragon.manager.DragonManager;
|
||||||
import pers.xanadu.enderdragon.manager.GlowManager;
|
import pers.xanadu.enderdragon.manager.GlowManager;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -57,7 +58,7 @@ public class PlayerListener implements Listener {
|
|||||||
int amount = item.getAmount();
|
int amount = item.getAmount();
|
||||||
e.getItem().setAmount(amount-1);
|
e.getItem().setAmount(amount-1);
|
||||||
}
|
}
|
||||||
EnderCrystal crystal = (EnderCrystal) world.spawnEntity(cen,EntityType.ENDER_CRYSTAL);
|
EnderCrystal crystal = (EnderCrystal) world.spawnEntity(cen, DragonManager.getENDER_CRYSTAL());
|
||||||
crystal.setShowingBottom(false);
|
crystal.setShowingBottom(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ public class DragonManager {
|
|||||||
private static Method getY;
|
private static Method getY;
|
||||||
private static Method getZ;
|
private static Method getZ;
|
||||||
private static final Pattern pattern_attacker_top = Pattern.compile("%attacker_top_(\\d+)%");
|
private static final Pattern pattern_attacker_top = Pattern.compile("%attacker_top_(\\d+)%");
|
||||||
|
@Getter
|
||||||
|
private static final EntityType ENDER_CRYSTAL = Version.NBT_UPDATE?EntityType.END_CRYSTAL:EntityType.valueOf("ENDER_CRYSTAL");
|
||||||
|
|
||||||
public static void reload(){
|
public static void reload(){
|
||||||
final List<MyDragon> dragons = new ArrayList<>();
|
final List<MyDragon> dragons = new ArrayList<>();
|
||||||
@@ -219,7 +221,7 @@ public class DragonManager {
|
|||||||
myDragon.glow_color = f.getString("glow_color","random");
|
myDragon.glow_color = f.getString("glow_color","random");
|
||||||
myDragon.bossbar_color = f.getString("bossbar.color","WHITE").toUpperCase();
|
myDragon.bossbar_color = f.getString("bossbar.color","WHITE").toUpperCase();
|
||||||
myDragon.bossbar_style = f.getString("bossbar.style","SOLID").toUpperCase();
|
myDragon.bossbar_style = f.getString("bossbar.style","SOLID").toUpperCase();
|
||||||
myDragon.bossbar_create_frog = f.getBoolean("bossbar.create_frog",true);
|
myDragon.bossbar_create_fog = f.getBoolean("bossbar.create_fog",true);
|
||||||
myDragon.bossbar_darken_sky = f.getBoolean("bossbar.darken_sky",true);
|
myDragon.bossbar_darken_sky = f.getBoolean("bossbar.darken_sky",true);
|
||||||
myDragon.bossbar_play_boss_music = f.getBoolean("bossbar.play_boss_music",true);
|
myDragon.bossbar_play_boss_music = f.getBoolean("bossbar.play_boss_music",true);
|
||||||
myDragon.effect_cloud_original_radius = f.getDouble("effect_cloud.original_radius",3);
|
myDragon.effect_cloud_original_radius = f.getDouble("effect_cloud.original_radius",3);
|
||||||
@@ -583,7 +585,7 @@ public class DragonManager {
|
|||||||
if(world == null) return;
|
if(world == null) return;
|
||||||
cen.add(0.5,1,0.5);
|
cen.add(0.5,1,0.5);
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
EnderCrystal crystal = (EnderCrystal) world.spawnEntity(cen.clone().add(nxt[i][0],0,nxt[i][1]), EntityType.ENDER_CRYSTAL);
|
EnderCrystal crystal = (EnderCrystal) world.spawnEntity(cen.clone().add(nxt[i][0],0,nxt[i][1]), ENDER_CRYSTAL);
|
||||||
if(Config.crystal_invulnerable) crystal.setInvulnerable(true);
|
if(Config.crystal_invulnerable) crystal.setInvulnerable(true);
|
||||||
crystal.setShowingBottom(false);
|
crystal.setShowingBottom(false);
|
||||||
}
|
}
|
||||||
@@ -599,7 +601,7 @@ public class DragonManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
EnderCrystal crystal = (EnderCrystal) world.spawnEntity(cen.clone().add(nxt[i][0],0,nxt[i][1]), EntityType.ENDER_CRYSTAL);
|
EnderCrystal crystal = (EnderCrystal) world.spawnEntity(cen.clone().add(nxt[i][0],0,nxt[i][1]), ENDER_CRYSTAL);
|
||||||
if(Config.crystal_invulnerable) crystal.setInvulnerable(true);
|
if(Config.crystal_invulnerable) crystal.setInvulnerable(true);
|
||||||
crystal.setShowingBottom(false);
|
crystal.setShowingBottom(false);
|
||||||
crystal.addScoreboardTag("ed_spe_"+uniqueId);
|
crystal.addScoreboardTag("ed_spe_"+uniqueId);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class MyDragon implements Comparable<MyDragon>{
|
|||||||
public String glow_color;
|
public String glow_color;
|
||||||
public String bossbar_color;
|
public String bossbar_color;
|
||||||
public String bossbar_style;
|
public String bossbar_style;
|
||||||
public boolean bossbar_create_frog;
|
public boolean bossbar_create_fog;
|
||||||
public boolean bossbar_darken_sky;
|
public boolean bossbar_darken_sky;
|
||||||
public boolean bossbar_play_boss_music;
|
public boolean bossbar_play_boss_music;
|
||||||
public double effect_cloud_original_radius;
|
public double effect_cloud_original_radius;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
yml.set(path+"title",bbs.title.getText());
|
yml.set(path+"title",bbs.title.getText());
|
||||||
yml.set(path+"color",bbs.color.name());
|
yml.set(path+"color",bbs.color.name());
|
||||||
yml.set(path+"style",bbs.style.name());
|
yml.set(path+"style",bbs.style.name());
|
||||||
yml.set(path+"create_frog",bbs.k());
|
yml.set(path+"create_fog",bbs.k());
|
||||||
yml.set(path+"darken_sky",bbs.i());
|
yml.set(path+"darken_sky",bbs.i());
|
||||||
yml.set(path+"play_boss_music",bbs.j());
|
yml.set(path+"play_boss_music",bbs.j());
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -72,7 +72,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
||||||
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
||||||
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
||||||
bbs.setCreateFog(yml.getBoolean(path+"create_frog",true));
|
bbs.setCreateFog(yml.getBoolean(path+"create_fog",true));
|
||||||
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
||||||
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -86,7 +86,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
convertColor(myDragon.bossbar_color),
|
convertColor(myDragon.bossbar_color),
|
||||||
convertStyle(myDragon.bossbar_style)
|
convertStyle(myDragon.bossbar_style)
|
||||||
);
|
);
|
||||||
bbs.setCreateFog(myDragon.bossbar_create_frog);
|
bbs.setCreateFog(myDragon.bossbar_create_fog);
|
||||||
bbs.setDarkenSky(myDragon.bossbar_darken_sky);
|
bbs.setDarkenSky(myDragon.bossbar_darken_sky);
|
||||||
bbs.setPlayMusic(myDragon.bossbar_play_boss_music);
|
bbs.setPlayMusic(myDragon.bossbar_play_boss_music);
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
yml.set(path+"title",bbs.title.getText());
|
yml.set(path+"title",bbs.title.getText());
|
||||||
yml.set(path+"color",bbs.color.name());
|
yml.set(path+"color",bbs.color.name());
|
||||||
yml.set(path+"style",bbs.style.name());
|
yml.set(path+"style",bbs.style.name());
|
||||||
yml.set(path+"create_frog",bbs.p());
|
yml.set(path+"create_fog",bbs.p());
|
||||||
yml.set(path+"darken_sky",bbs.n());
|
yml.set(path+"darken_sky",bbs.n());
|
||||||
yml.set(path+"play_boss_music",bbs.o());
|
yml.set(path+"play_boss_music",bbs.o());
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -72,7 +72,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
||||||
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
||||||
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
||||||
bbs.setCreateFog(yml.getBoolean(path+"create_frog",true));
|
bbs.setCreateFog(yml.getBoolean(path+"create_fog",true));
|
||||||
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
||||||
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -86,7 +86,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
convertColor(myDragon.bossbar_color),
|
convertColor(myDragon.bossbar_color),
|
||||||
convertStyle(myDragon.bossbar_style)
|
convertStyle(myDragon.bossbar_style)
|
||||||
);
|
);
|
||||||
bbs.setCreateFog(myDragon.bossbar_create_frog);
|
bbs.setCreateFog(myDragon.bossbar_create_fog);
|
||||||
bbs.setDarkenSky(myDragon.bossbar_darken_sky);
|
bbs.setDarkenSky(myDragon.bossbar_darken_sky);
|
||||||
bbs.setPlayMusic(myDragon.bossbar_play_boss_music);
|
bbs.setPlayMusic(myDragon.bossbar_play_boss_music);
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
yml.set(path+"title",bbs.title.getText());
|
yml.set(path+"title",bbs.title.getText());
|
||||||
yml.set(path+"color",bbs.color.name());
|
yml.set(path+"color",bbs.color.name());
|
||||||
yml.set(path+"style",bbs.style.name());
|
yml.set(path+"style",bbs.style.name());
|
||||||
yml.set(path+"create_frog",bbs.isCreateFog());
|
yml.set(path+"create_fog",bbs.isCreateFog());
|
||||||
yml.set(path+"darken_sky",bbs.isDarkenSky());
|
yml.set(path+"darken_sky",bbs.isDarkenSky());
|
||||||
yml.set(path+"play_boss_music",bbs.isPlayMusic());
|
yml.set(path+"play_boss_music",bbs.isPlayMusic());
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -72,7 +72,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
||||||
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
||||||
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
||||||
bbs.setCreateFog(yml.getBoolean(path+"create_frog",true));
|
bbs.setCreateFog(yml.getBoolean(path+"create_fog",true));
|
||||||
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
||||||
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -86,7 +86,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
convertColor(myDragon.bossbar_color),
|
convertColor(myDragon.bossbar_color),
|
||||||
convertStyle(myDragon.bossbar_style)
|
convertStyle(myDragon.bossbar_style)
|
||||||
);
|
);
|
||||||
bbs.setCreateFog(myDragon.bossbar_create_frog);
|
bbs.setCreateFog(myDragon.bossbar_create_fog);
|
||||||
bbs.setDarkenSky(myDragon.bossbar_darken_sky);
|
bbs.setDarkenSky(myDragon.bossbar_darken_sky);
|
||||||
bbs.setPlayMusic(myDragon.bossbar_play_boss_music);
|
bbs.setPlayMusic(myDragon.bossbar_play_boss_music);
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
yml.set(path+"title",bbs.title.getText());
|
yml.set(path+"title",bbs.title.getText());
|
||||||
yml.set(path+"color",bbs.color.name());
|
yml.set(path+"color",bbs.color.name());
|
||||||
yml.set(path+"style",bbs.style.name());
|
yml.set(path+"style",bbs.style.name());
|
||||||
yml.set(path+"create_frog",bbs.isCreateFog());
|
yml.set(path+"create_fog",bbs.isCreateFog());
|
||||||
yml.set(path+"darken_sky",bbs.isDarkenSky());
|
yml.set(path+"darken_sky",bbs.isDarkenSky());
|
||||||
yml.set(path+"play_boss_music",bbs.isPlayMusic());
|
yml.set(path+"play_boss_music",bbs.isPlayMusic());
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -72,7 +72,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
||||||
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
||||||
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
||||||
bbs.setCreateFog(yml.getBoolean(path+"create_frog",true));
|
bbs.setCreateFog(yml.getBoolean(path+"create_fog",true));
|
||||||
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
||||||
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
yml.set(path+"title",bbs.title.getText());
|
yml.set(path+"title",bbs.title.getText());
|
||||||
yml.set(path+"color",bbs.color.name());
|
yml.set(path+"color",bbs.color.name());
|
||||||
yml.set(path+"style",bbs.style.name());
|
yml.set(path+"style",bbs.style.name());
|
||||||
yml.set(path+"create_frog",bbs.isCreateFog());
|
yml.set(path+"create_fog",bbs.isCreateFog());
|
||||||
yml.set(path+"darken_sky",bbs.isDarkenSky());
|
yml.set(path+"darken_sky",bbs.isDarkenSky());
|
||||||
yml.set(path+"play_boss_music",bbs.isPlayMusic());
|
yml.set(path+"play_boss_music",bbs.isPlayMusic());
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
@@ -72,7 +72,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
bbs.title = CraftChatMessage.fromString(yml.getString(path+"title"), true)[0];
|
||||||
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
bbs.color = BossBattle.BarColor.valueOf(yml.getString(path+"color"));
|
||||||
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
bbs.style = BossBattle.BarStyle.valueOf(yml.getString(path+"style"));
|
||||||
bbs.setCreateFog(yml.getBoolean(path+"create_frog",true));
|
bbs.setCreateFog(yml.getBoolean(path+"create_fog",true));
|
||||||
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
bbs.setDarkenSky(yml.getBoolean(path+"darken_sky",true));
|
||||||
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
bbs.setPlayMusic(yml.getBoolean(path+"play_boss_music",true));
|
||||||
}catch (ReflectiveOperationException e){
|
}catch (ReflectiveOperationException e){
|
||||||
|
|||||||
+2
-2
@@ -27,7 +27,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
yml.set(path+"title",bossBar.getTitle());
|
yml.set(path+"title",bossBar.getTitle());
|
||||||
yml.set(path+"color",bossBar.getColor().name());
|
yml.set(path+"color",bossBar.getColor().name());
|
||||||
yml.set(path+"style",bossBar.getStyle().name());
|
yml.set(path+"style",bossBar.getStyle().name());
|
||||||
yml.set(path+"create_frog",bossBar.hasFlag(BarFlag.CREATE_FOG));
|
yml.set(path+"create_fog",bossBar.hasFlag(BarFlag.CREATE_FOG));
|
||||||
yml.set(path+"darken_sky",bossBar.hasFlag(BarFlag.DARKEN_SKY));
|
yml.set(path+"darken_sky",bossBar.hasFlag(BarFlag.DARKEN_SKY));
|
||||||
yml.set(path+"play_boss_music",bossBar.hasFlag(BarFlag.PLAY_BOSS_MUSIC));
|
yml.set(path+"play_boss_music",bossBar.hasFlag(BarFlag.PLAY_BOSS_MUSIC));
|
||||||
});
|
});
|
||||||
@@ -58,7 +58,7 @@ public class BossBarManager implements IBossBarManager {
|
|||||||
bossBar.setTitle(yml.getString(path+"title"));
|
bossBar.setTitle(yml.getString(path+"title"));
|
||||||
bossBar.setColor(BarColor.valueOf(yml.getString(path+"color")));
|
bossBar.setColor(BarColor.valueOf(yml.getString(path+"color")));
|
||||||
bossBar.setStyle(BarStyle.valueOf(yml.getString(path+"style")));
|
bossBar.setStyle(BarStyle.valueOf(yml.getString(path+"style")));
|
||||||
if(yml.getBoolean(path+"create_frog",true)) bossBar.addFlag(BarFlag.CREATE_FOG);
|
if(yml.getBoolean(path+"create_fog",true)) bossBar.addFlag(BarFlag.CREATE_FOG);
|
||||||
else bossBar.removeFlag(BarFlag.CREATE_FOG);
|
else bossBar.removeFlag(BarFlag.CREATE_FOG);
|
||||||
if(yml.getBoolean(path+"darken_sky",true)) bossBar.addFlag(BarFlag.DARKEN_SKY);
|
if(yml.getBoolean(path+"darken_sky",true)) bossBar.addFlag(BarFlag.DARKEN_SKY);
|
||||||
else bossBar.removeFlag(BarFlag.DARKEN_SKY);
|
else bossBar.removeFlag(BarFlag.DARKEN_SKY);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import java.lang.reflect.Field;
|
|||||||
import static org.bukkit.Bukkit.getServer;
|
import static org.bukkit.Bukkit.getServer;
|
||||||
|
|
||||||
public class Version {
|
public class Version {
|
||||||
public static final String setting_dragon = "2.4.0";
|
public static final String setting_dragon = "2.5.4";
|
||||||
public static final String lang = "2.2.0";
|
public static final String lang = "2.2.0";
|
||||||
public static final String config = "2.3.0";
|
public static final String config = "2.3.0";
|
||||||
public static final String data = "2.2.0";
|
public static final String data = "2.2.0";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: EnderDragon
|
name: EnderDragon
|
||||||
version: 2.5.3
|
version: 2.5.4
|
||||||
main: pers.xanadu.enderdragon.EnderDragon
|
main: pers.xanadu.enderdragon.EnderDragon
|
||||||
author: Xanadu13
|
author: Xanadu13
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#文件版本,请勿修改
|
#文件版本,请勿修改
|
||||||
version: 2.4.0
|
version: 2.5.4
|
||||||
|
|
||||||
#用于插件内部识别,每一种末影龙的unique_name都需要设为不同值!
|
#用于插件内部识别,每一种末影龙的unique_name都需要设为不同值!
|
||||||
unique_name: 'default'
|
unique_name: 'default'
|
||||||
@@ -120,7 +120,7 @@ bossbar:
|
|||||||
|
|
||||||
# [true/false]
|
# [true/false]
|
||||||
# 生成迷雾
|
# 生成迷雾
|
||||||
create_frog: true
|
create_fog: true
|
||||||
# 使天空阴暗
|
# 使天空阴暗
|
||||||
darken_sky: true
|
darken_sky: true
|
||||||
# 播放打末影龙时候的BGM
|
# 播放打末影龙时候的BGM
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
version: 2.4.0
|
version: 2.5.4
|
||||||
|
|
||||||
#This is used for plugin internal identification.
|
#This is used for plugin internal identification.
|
||||||
#Please make sure the value is unique among all the types of dragons
|
#Please make sure the value is unique among all the types of dragons
|
||||||
@@ -126,7 +126,7 @@ bossbar:
|
|||||||
style: 'SOLID'
|
style: 'SOLID'
|
||||||
|
|
||||||
# [true/false]
|
# [true/false]
|
||||||
create_frog: true
|
create_fog: true
|
||||||
darken_sky: true
|
darken_sky: true
|
||||||
play_boss_music: true
|
play_boss_music: true
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#文件版本,请勿修改
|
#文件版本,请勿修改
|
||||||
version: 2.4.0
|
version: 2.5.4
|
||||||
|
|
||||||
#用于插件内部识别,每一种末影龙的unique_name都需要设为不同值!
|
#用于插件内部识别,每一种末影龙的unique_name都需要设为不同值!
|
||||||
unique_name: 'special001'
|
unique_name: 'special001'
|
||||||
@@ -119,7 +119,7 @@ bossbar:
|
|||||||
|
|
||||||
# [true/false]
|
# [true/false]
|
||||||
# 生成迷雾
|
# 生成迷雾
|
||||||
create_frog: true
|
create_fog: true
|
||||||
# 使天空阴暗
|
# 使天空阴暗
|
||||||
darken_sky: true
|
darken_sky: true
|
||||||
# 播放打末影龙时候的BGM
|
# 播放打末影龙时候的BGM
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## Special thanks to Phaxius for the translation
|
## Special thanks to Phaxius for the translation
|
||||||
|
|
||||||
# File version, do not edit
|
# File version, do not edit
|
||||||
version: 2.4.0
|
version: 2.5.4
|
||||||
|
|
||||||
# Unique ID used by plugin to identify each type of dragon
|
# Unique ID used by plugin to identify each type of dragon
|
||||||
# unique_name needs to be different in each dragon settings file
|
# unique_name needs to be different in each dragon settings file
|
||||||
@@ -141,7 +141,7 @@ bossbar:
|
|||||||
style: 'SEGMENTED_12'
|
style: 'SEGMENTED_12'
|
||||||
|
|
||||||
# [true/false]
|
# [true/false]
|
||||||
create_frog: true
|
create_fog: true
|
||||||
darken_sky: true
|
darken_sky: true
|
||||||
play_boss_music: true
|
play_boss_music: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user