-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...a/cn/stevei5mc/NewTipsVariables/variables/supportPlugins/smallasWater/RsTaskVariable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package cn.stevei5mc.NewTipsVariables.variables.supportPlugins.smallasWater; | ||
|
||
import cn.nukkit.Player; | ||
import tip.utils.variables.BaseVariable; | ||
import com.task.utils.tasks.PlayerFile; | ||
import com.task.utils.tasks.taskitems.PlayerTask; | ||
import java.util.LinkedList; | ||
|
||
public class RsTaskVariable extends BaseVariable { | ||
public RsTaskVariable(Player player) { | ||
super(player); | ||
} | ||
|
||
public void strReplace() { | ||
RsTaskVar(); | ||
} | ||
|
||
public void RsTaskVar() { | ||
//这个代码的是复制TipsVeriable的 | ||
PlayerFile file = PlayerFile.getPlayerFile(this.player.getName()); | ||
LinkedList<PlayerTask> tasks = file.getInviteTasks(); | ||
String taskName = "暂无"; | ||
if (tasks.size() > 0) { | ||
PlayerTask task = (PlayerTask)tasks.get(0); | ||
if (task != null) { | ||
taskName = task.getTaskName(); | ||
} | ||
} | ||
|
||
this.addStrReplaceString("{task-name}", taskName); | ||
this.addStrReplaceString("{task-count}", file.getCount() + ""); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters