mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 01:42:32 +01:00
Reorganizing code.
This commit is contained in:
@@ -44,7 +44,7 @@ public class vMinecraftUsers {
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean doesPlayerExist(String player) {
|
||||
public boolean doesPlayerExist(String player) {
|
||||
try {
|
||||
Scanner scanner = new Scanner(new File(location));
|
||||
while (scanner.hasNextLine()) {
|
||||
@@ -64,10 +64,26 @@ public class vMinecraftUsers {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================
|
||||
//Function: addUser
|
||||
//Input: Player player: The player to create a profile for
|
||||
//Output: none
|
||||
//Use: Creates the player profile
|
||||
//=====================================================================
|
||||
public static void addUser(Player player){
|
||||
players.addPlayer(player);
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//Function: getProfile
|
||||
//Input: Player player: The player to find the profile for
|
||||
//Output: PlayerList.PlayerProfile: The profile
|
||||
//Use: Gets the player profile
|
||||
//=====================================================================
|
||||
public static PlayerList.PlayerProfile getProfile(Player player){
|
||||
return players.findProfile(player);
|
||||
}
|
||||
|
||||
public static vMinecraftUsers getInstance() {
|
||||
if (instance == null) {
|
||||
@@ -319,6 +335,17 @@ class PlayerList
|
||||
return false;
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//Function: removeIgnore
|
||||
//Input: Player name: The player to unignore
|
||||
//Output: boolean: If the player was successfully unignored
|
||||
//Use: Stops ignoring a player.
|
||||
//=====================================================================
|
||||
public String[] listIgnore()
|
||||
{
|
||||
return ignoreList.toArray(new String[ignoreList.size()]);
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//Function: addAlias
|
||||
//Input: String command: The command to try to call
|
||||
|
||||
Reference in New Issue
Block a user