Skip to content

Commit

Permalink
玩家不在线时不调用变量
Browse files Browse the repository at this point in the history
  • Loading branch information
stevei5mc committed Sep 10, 2024
1 parent 3581c3b commit 724593b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ public BaseVariables(Player player) {
}

public void strReplace() {
text();
player();
server();
unicode();
if (player != null && player.isOnline()) {
text();
player();
server();
unicode();
}
}

public void text() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ public EconomyApiVariable(Player player) {
}

public void strReplace() {
economyApi();
if (player != null && player.isOnline()) {
economyApi();
}
}

public void economyApi() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public LuckPermsVar(Player player) {
super(player);
}
public void strReplace() {
lpvar();
if (player != null && player.isOnline()) {
lpvar();
}
}

public void lpvar() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,26 @@ public SmallasWaterPlugins(Player player) {
}

public void strReplace() {
PluginsState ps = PluginsState.getInstance();
if (ps.playerPoints) {
playerPoint();
}
if (ps.rSTask) {
RsTask();
}
if (ps.oreArea) {
OreArea();
}
if (ps.healthAPI) {
HealthAPI();
}
if (ps.rSWeapon) {
RSWeapon();
}
if (ps.levelAwakenSystem) {
LevelAwakenSystem();
if (player != null && player.isOnline()) {
PluginsState ps = PluginsState.getInstance();
if (ps.playerPoints) {
playerPoint();
}
if (ps.rSTask) {
RsTask();
}
if (ps.oreArea) {
OreArea();
}
if (ps.healthAPI) {
HealthAPI();
}
if (ps.rSWeapon) {
RSWeapon();
}
if (ps.levelAwakenSystem) {
LevelAwakenSystem();
}
}
}
/**
Expand Down

0 comments on commit 724593b

Please sign in to comment.