Crossfire JXClient, Trunk  R20561
SettingsEntries.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff.
19  * Copyright (C) 2006-2011 Andreas Kirschbaum.
20  */
21 
22 package com.realtime.crossfire.jxclient.settings;
23 
25 import org.jetbrains.annotations.NotNull;
26 
31 public class SettingsEntries {
32 
36  @NotNull
37  public static final SettingsEntry<String> SERVER = new SettingsEntry<>("server", "crossfire.metalforge.net", "The server last connected to.");
38 
42  @NotNull
43  public static final SettingsEntry<Boolean> MESSAGE_LOG_SETTINGS_ENTRY = new SettingsEntry<>("messagelog", false, "Whether to record all text messages into a file.");
44 
48  private SettingsEntries() {
49  }
50 
57  @NotNull
58  public static SettingsEntry<String> getPlayerSettingsEntry(@NotNull final String hostname) {
59  return new SettingsEntry<>("player_"+hostname, "", "The charactername last played on the server.");
60  }
61 
68  @NotNull
69  public static SettingsEntry<String> getLoginAccountSettingsEntry(@NotNull final String hostname) {
70  return new SettingsEntry<>("login_account_"+hostname, "", "The account last logged in on the server.");
71  }
72 
80  @NotNull
81  public static SettingsEntry<String> getLoginAccountSettingsEntry(@NotNull final String hostname, @NotNull final String accountName) {
82  return new SettingsEntry<>("login_account_"+hostname+"_"+accountName, "", "The character last selected on the account.");
83  }
84 
92  @NotNull
93  public static SettingsEntry<Long> getPickupSettingsEntry(@NotNull final String hostname, @NotNull final String characterName) {
94  return new SettingsEntry<>("pickup_"+hostname+"_"+characterName, Pickup.PU_NOTHING, "The character's pickup mode.");
95  }
96 
97 }
static SettingsEntry< String > getLoginAccountSettingsEntry(@NotNull final String hostname)
Returns the SettingsEntry for the default account name on a server.
SettingsEntries()
Private constructor to prevent instantiation.
static SettingsEntry< String > getLoginAccountSettingsEntry(@NotNull final String hostname, @NotNull final String accountName)
Returns the SettingsEntry for the default character name on an account.
Defines constants for pickup mode.
Definition: Pickup.java:33
All defined entries in the settings file.
static final SettingsEntry< Boolean > MESSAGE_LOG_SETTINGS_ENTRY
Whether to record of all text messages received from the server.
static SettingsEntry< Long > getPickupSettingsEntry(@NotNull final String hostname, @NotNull final String characterName)
Returns the SettingsEntry for the default pickup mode of a character.
static SettingsEntry< String > getPlayerSettingsEntry(@NotNull final String hostname)
Returns the SettingsEntry for the default character name on a server.
static final SettingsEntry< String > SERVER
The server to which the previous connection was made.
static final long PU_NOTHING
Pickup mode: nothing.
Definition: Pickup.java:43