Skip to content

Commit

Permalink
2.6.0正式提交
Browse files Browse the repository at this point in the history
  • Loading branch information
nullaqua committed Apr 16, 2022
1 parent 4b8d124 commit a2b8372
Show file tree
Hide file tree
Showing 15 changed files with 421 additions and 120 deletions.
17 changes: 12 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.lanzhi</groupId>
<artifactId>BluestarGame</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
<packaging>jar</packaging>

<name>BluestarGame</name>
Expand Down Expand Up @@ -120,14 +120,21 @@
<scope>system</scope>
<systemPath>${project.basedir}/lib/Vault.jar</systemPath>
</dependency>
<!--
<dependency>
<groupId>com.github.lanzhi6</groupId>
<artifactId>BlggguestarTpsControl</artifactId>
<version>1.0</version>
<groupId>org.purpur</groupId>
<artifactId>purpur</artifactId>
<version>1.18.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/purpur-1.18.2.jar</systemPath>
</dependency>
<dependency>
<groupId>com.github.lanzhi6</groupId>
<artifactId>BluestarTpsControl</artifactId>
<version>1.5</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/BluestarTpsControl-spigotPlugin-1.5.jar</systemPath>
</dependency>
<!--
<dependency>
<groupId>com.github.lanzhi6</groupId>
<artifactId>BlggguestaasdrTpsControl</artifactId>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/me/lanzhi/bluestargame/BluestarGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import me.lanzhi.bluestargame.Type.superSponge;
import me.lanzhi.bluestargame.Type.muted;
import me.lanzhi.bluestargame.commands.*;
import me.lanzhi.bluestargame.papi.BluestarGamePapi;
import me.lanzhi.bluestargame.register.RegisterListeners;
import me.lanzhi.bluestargame.register.RegisterRecipe;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -71,6 +72,7 @@ public void onEnable()
CtrlSponge.set((List<superSponge>) Data.getList("superSponges"));
this.task = CtrlSponge.ctrlsponge.runTaskTimer(plugin, 0L, 2L);
econ=getServer().getServicesManager().getRegistration(Economy.class).getProvider();
new BluestarGamePapi();

System.out.println("BluestarGame已加载");
}
Expand All @@ -81,7 +83,7 @@ public void onDisable()
this.task.cancel();
CTRL.theend();
CTRL.all(false);
Bukkit.clearRecipes();
RegisterRecipe.cancellationRecipes();
Data.set("superSponges",CtrlSponge.get());
Data.save();
PlayerMap.save();
Expand Down
76 changes: 39 additions & 37 deletions src/main/java/me/lanzhi/bluestargame/Ctrls/CTRL.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.bukkit.ChatColor;
import org.bukkit.scheduler.BukkitTask;

import static me.lanzhi.bluestargame.BluestarGame.*;

public class CTRL
{
public static BukkitTask task = null;
Expand All @@ -17,11 +19,11 @@ public static synchronized void runAuto(boolean b)
BluestarGame.config.set("auto", b);
if (!b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机事件自动切换已关闭!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机事件自动切换已关闭!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机事件自动切换已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机事件自动切换已启用!");
}
}
if ((b) && (task == null))
Expand Down Expand Up @@ -78,11 +80,11 @@ public static void randdamage(boolean b)
BluestarGame.Data.set("randdamage", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机伤害已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机伤害已启用!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机伤害已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机伤害已禁用!");
}
}

Expand All @@ -100,11 +102,11 @@ public static void randchat(boolean b)
BluestarGame.Data.set("randchat", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机聊天颜色已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机聊天颜色已启用!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机聊天颜色已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机聊天颜色已禁用!");
}
}

Expand All @@ -122,12 +124,12 @@ public static void randsheep(boolean b)
BluestarGame.Data.set("randsheep", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机羊毛颜色已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机羊毛颜色已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "对羊染色以及羊毛掉落物的颜色都会随机!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]随机羊毛颜色已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"随机羊毛颜色已禁用!");
}
}

Expand All @@ -147,7 +149,7 @@ public static void the24(boolean b)
BluestarGame.Data.set("the24", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]24点开始!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"24点开始!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "4个数字为:");
StringBuilder nums=new StringBuilder();
nums.append(ChatColor.GREEN);
Expand All @@ -168,7 +170,7 @@ public static void the24(boolean b)
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]24点已结束!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"24点已结束!");
}
}

Expand All @@ -186,12 +188,12 @@ public static void morediamond(boolean b)
BluestarGame.Data.set("morediamond", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多钻石已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖钻石会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多钻石已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖钻石会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多钻石已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多钻石已禁用!");
}
}

Expand All @@ -209,12 +211,12 @@ public static void morecoal(boolean b)
BluestarGame.Data.set("morecoal", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多煤炭已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖煤炭会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多煤炭已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖煤炭会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多煤炭已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多煤炭已禁用!");
}
}

Expand All @@ -232,12 +234,12 @@ public static void moreredstone(boolean b)
BluestarGame.Data.set("moreredstone", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多红石已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖红石会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多红石已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖红石会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多红石已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多红石已禁用!");
}
}

Expand All @@ -255,12 +257,12 @@ public static void morecopper(boolean b)
BluestarGame.Data.set("morecopper", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多粗铜已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖粗铜会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多粗铜已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖粗铜会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多粗铜已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多粗铜已禁用!");
}
}

Expand All @@ -278,12 +280,12 @@ public static void moreiron(boolean b)
BluestarGame.Data.set("moreiron", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多粗铁已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖粗铁会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多粗铁已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖粗铁会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多粗铁已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多粗铁已禁用!");
}
}

Expand All @@ -301,12 +303,12 @@ public static void moregold(boolean b)
BluestarGame.Data.set("moregold", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多粗金已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖粗金会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多粗金已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖粗金会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多粗金已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多粗金已禁用!");
}
}

Expand All @@ -324,12 +326,12 @@ public static void moreemerald(boolean b)
BluestarGame.Data.set("moreemerald", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多绿宝石已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖绿宝石会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多绿宝石已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖绿宝石会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多绿宝石已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多绿宝石已禁用!");
}
}

Expand All @@ -347,12 +349,12 @@ public static void morelapis(boolean b)
BluestarGame.Data.set("morelapis", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多青金石已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]挖青金石会多掉一个哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多青金石已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"挖青金石会多掉一个哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]更多青金石已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"更多青金石已禁用!");
}
}

Expand All @@ -369,12 +371,12 @@ public static void respawn(boolean b)
BluestarGame.Data.set("respawn", b);
if (b)
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]复活已启用!");
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]生物死亡会直接复活哦!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"复活已启用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"生物死亡会直接复活哦!");
}
else
{
Bukkit.getServer().broadcastMessage(ChatColor.GOLD + "[BluestarGame]复活已禁用!");
Bukkit.getServer().broadcastMessage(messageHead+ChatColor.GOLD+"复活已禁用!");
}
}
}
Expand Down
Loading

0 comments on commit a2b8372

Please sign in to comment.