Skip to content
Permalink
Browse files

String -> string

  • Loading branch information...
UnknownShadow200 committed Nov 16, 2017
1 parent e09007a commit 212ac354e5c97c18f124a299c9ef5e41c69480c3
@@ -72,9 +72,9 @@ static class ModerationCommands {

static void CalcHandler(Player player, CommandReader cmd)
{
String numberone = cmd.Next();
String op = cmd.Next();
String numbertwo = cmd.Next();
string numberone = cmd.Next();
string op = cmd.Next();
string numbertwo = cmd.Next();
double no1 = 1;
double no2 = 1;

@@ -1108,7 +1108,7 @@ static void RankHandler([NotNull] Player player, [NotNull] CommandReader cmd)

// to make it look like player just logged out in /Info
player.Info.LastSeen = DateTime.UtcNow;
String quitMessage = (silentString.Length < 1 ? "" : "/Quit " + (silentString.Length > 64 ? silentString.Remove(64) : silentString));
string quitMessage = (silentString.Length < 1 ? "" : "/Quit " + (silentString.Length > 64 ? silentString.Remove(64) : silentString));

if (!silent && ConfigKey.ShowConnectionMessages.Enabled()) {
if (!quitMessage.Equals("")) {
@@ -59,7 +59,7 @@ public sealed partial class Player : IClassy {
public int MessageSpam { get; set; }

/// <summary> Last sign clicked by the player</summary>
public String LastSignClicked;
public string LastSignClicked;

/// <summary> Whether the player has completed the login sequence. </summary>
public SessionState State { get; private set; }
@@ -102,7 +102,7 @@ public sealed partial class PlayerInfo : IClassy {

/// <summary> Begins to asynchronously check player's account type. </summary>
public void GeoipLogin() {
String ip = LastIP.ToString();
string ip = LastIP.ToString();
if (IPAddress.Parse(ip).IsLocal() && Server.ExternalIP != null) {
ip = Server.ExternalIP.ToString();
}
@@ -31,9 +31,9 @@ namespace fCraft {

public interface Plugin {

String Name { get; set; }
string Name { get; set; }

String Version { get; set; }
string Version { get; set; }

void Initialize();
}
@@ -5,15 +5,15 @@ namespace fCraft {

public abstract class PluginConfig {

public virtual void Save( Plugin plugin, String file ) {
public virtual void Save( Plugin plugin, string file ) {
// Append plugin directory
String realFile = "plugins/" + plugin.Name + "/" + file;
string realFile = "plugins/" + plugin.Name + "/" + file;
PluginConfigSerializer.Serialize( realFile, this );
}

public virtual PluginConfig Load( Plugin plugin, String file, Type type ) {
public virtual PluginConfig Load( Plugin plugin, string file, Type type ) {
// Append plugin directory
String realFile = "plugins/" + plugin.Name + "/" + file;
string realFile = "plugins/" + plugin.Name + "/" + file;

if ( !Directory.Exists( "plugins/" + plugin.Name ) ) {
Directory.CreateDirectory( "plugins/" + plugin.Name );
@@ -6,15 +6,15 @@ namespace fCraft {

public class PluginConfigSerializer {

public static void Serialize( String configFile, PluginConfig config ) {
public static void Serialize( string configFile, PluginConfig config ) {
XmlSerializer xs = new XmlSerializer( config.GetType() );
StreamWriter writer = File.CreateText( configFile );
xs.Serialize( writer, config );
writer.Flush();
writer.Close();
}

public static PluginConfig Deserialize( String configFile, Type type ) {
public static PluginConfig Deserialize( string configFile, Type type ) {
XmlSerializer xs = new XmlSerializer( type );
StreamReader reader = File.OpenText( configFile );
PluginConfig c = ( PluginConfig )xs.Deserialize( reader );
@@ -77,7 +77,7 @@ public class Portal {
return false;
}

public static String GenerateName(World world) {
public static string GenerateName(World world) {
if (world.Portals != null) {
if (world.Portals.Count > 0) {
bool found = false;
@@ -107,7 +107,7 @@ public class Portal {
return "portal1";
}

public static bool DoesNameExist(World world, String name) {
public static bool DoesNameExist(World world, string name) {
if (world.Portals != null) {
if (world.Portals.Count > 0) {
foreach (Portal portal in world.Portals) {
@@ -63,7 +63,7 @@ public class PortalDB {
try {
lock (IOLock) {
using (StreamReader r = new StreamReader(Paths.PortalDBFileName)) {
String line;
string line;
int count = 0;

while ((line = r.ReadLine()) != null) {
@@ -21,7 +21,7 @@

namespace fCraft.Portals {
class PortalException : Exception {
public PortalException(String message)
public PortalException(string message)
: base(message) {
// Do nothing
}

0 comments on commit 212ac35

Please sign in to comment.
You can’t perform that action at this time.