diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java index 315b387d1..cf6e41eba 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java @@ -4,7 +4,9 @@ import org.bukkit.Effect; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerJoinEvent; +import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.gadget.types.ParticleGadget; import mineplex.core.updater.UpdateType; @@ -40,4 +42,13 @@ public class ParticleLegend extends ParticleGadget player.getWorld().playEffect(player.getLocation().add(0, 1, 0), Effect.ENDER_SIGNAL, 0); } } + + @EventHandler + public void legendOwner(PlayerJoinEvent event) + { + if (Manager.getClientManager().Get(event.getPlayer()).GetRank().Has(Rank.LEGEND)) + { + Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); + } + } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/personalServer/HostServerCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/personalServer/HostServerCommand.java index 9f9b36d39..2c12e1d8d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/personalServer/HostServerCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/personalServer/HostServerCommand.java @@ -4,17 +4,21 @@ import org.bukkit.entity.Player; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; +import mineplex.core.recharge.Recharge; public class HostServerCommand extends CommandBase { public HostServerCommand(PersonalServerManager plugin) { - super(plugin, Rank.ULTRA, "hostserver"); + super(plugin, Rank.LEGEND, "hostserver"); } @Override public void Execute(Player caller, String[] args) { + if (!Recharge.Instance.use(caller, "Host Server", 30000, false, false)) + return; + Plugin.hostServer(caller, caller.getName()); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java b/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java index 75e62abcd..763c27f25 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/personalServer/PersonalServerManager.java @@ -20,6 +20,7 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.core.itemstack.ItemStackFactory; +import mineplex.core.recharge.Recharge; import mineplex.serverdata.Region; import mineplex.serverdata.ServerGroup; import mineplex.serverdata.ServerManager; @@ -66,13 +67,16 @@ public class PersonalServerManager extends MiniPlugin { if (_interfaceItem.equals(event.getPlayer().getItemInHand())) { - if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.ULTRA)) + if (!Recharge.Instance.use(event.getPlayer(), "Host Server Melon", 30000, false, false)) + return; + + if (_clientManager.Get(event.getPlayer()).GetRank().Has(Rank.LEGEND)) { showHostMessage(event.getPlayer()); } else { - UtilPlayer.message(event.getPlayer(), F.main("Server", "Only players with " + F.rank(Rank.ULTRA) + C.mBody + "+ can host private servers")); + UtilPlayer.message(event.getPlayer(), F.main("Server", "Only players with " + F.rank(Rank.LEGEND) + C.mBody + "+ can host private servers")); } } } @@ -81,11 +85,13 @@ public class PersonalServerManager extends MiniPlugin { UtilPlayer.message(player, C.cRed + "------------------------------------------------"); UtilPlayer.message(player, "This will create a Mineplex Player Server for you."); - UtilPlayer.message(player, "Here you can play your favourite games with friends!"); + UtilPlayer.message(player, "Here you can play your favorite games with friends!"); + new JsonMessage("Please ").click(ClickEvent.RUN_COMMAND, "/hostserver") .hover(HoverEvent.SHOW_TEXT, C.cGray + "Click to Create Server") .extra("CLICK HERE").color(Color.GREEN).extra(" to confirm you want to do this.") .color(Color.WHITE).send(JsonMessage.MessageType.CHAT_BOX, player); + UtilPlayer.message(player, C.cRed + "------------------------------------------------"); } @@ -112,7 +118,7 @@ public class PersonalServerManager extends MiniPlugin public void hostServer(Player player, String serverName) { - createGroup(player, serverName, 24, 24, "Smash"); + createGroup(player, serverName, 12, 24, "Smash"); } private void createGroup(final Player host, final String serverName, int minPlayers, int maxPlayers, String games) diff --git a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java index 26f865d51..f070c6bf6 100644 --- a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java +++ b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java @@ -322,7 +322,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor { public void run() { - if (_clientManager.Get(name).GetRank() == Rank.ALL || _clientManager.Get(name).GetRank() == Rank.ULTRA || _clientManager.Get(name).GetRank() == Rank.HERO) + if (_clientManager.Get(name).GetRank() == Rank.ALL || _clientManager.Get(name).GetRank() == Rank.ULTRA || _clientManager.Get(name).GetRank() == Rank.HERO || _clientManager.Get(name).GetRank() == Rank.LEGEND) { _clientManager.SaveRank(name, mineplex.core.common.Rank.valueOf(rank), perm); System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + rank + " " + (perm ? "permanently." : "for 1 month.")); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java index 5d9a1aa85..517aef484 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java @@ -253,7 +253,7 @@ public class GameHostManager implements Listener public boolean isPrivateServer() { - return Manager.GetHost() != null || Manager.GetHost().length() > 0; + return Manager.GetHost() != null && Manager.GetHost().length() > 0; } @EventHandler diff --git a/Webserver/ServerHandler/ServerHandler.1.2.dotCover b/Webserver/ServerHandler/ServerHandler.1.2.dotCover deleted file mode 100644 index 6f8c06edc..000000000 --- a/Webserver/ServerHandler/ServerHandler.1.2.dotCover +++ /dev/null @@ -1,11 +0,0 @@ - - - C:\Work\LOC\Webserver\ServerHandler - - - - - - - - \ No newline at end of file diff --git a/Webserver/ServerHandler/ServerHandler.5.1.ReSharper.user b/Webserver/ServerHandler/ServerHandler.5.1.ReSharper.user deleted file mode 100644 index 1ea032aa0..000000000 --- a/Webserver/ServerHandler/ServerHandler.5.1.ReSharper.user +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Never - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Webserver/ServerHandler/ServerHandler.sln b/Webserver/ServerHandler/ServerHandler.sln deleted file mode 100644 index e17e98ca0..000000000 --- a/Webserver/ServerHandler/ServerHandler.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerHandler", "ServerHandler\ServerHandler.csproj", "{7674049F-5C67-4CD0-AD1F-8F23C718E37B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7674049F-5C67-4CD0-AD1F-8F23C718E37B}.Debug|x86.ActiveCfg = Debug|x86 - {7674049F-5C67-4CD0-AD1F-8F23C718E37B}.Debug|x86.Build.0 = Debug|x86 - {7674049F-5C67-4CD0-AD1F-8F23C718E37B}.Release|x86.ActiveCfg = Release|x86 - {7674049F-5C67-4CD0-AD1F-8F23C718E37B}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Webserver/ServerHandler/ServerHandler.sln.DotSettings.user b/Webserver/ServerHandler/ServerHandler.sln.DotSettings.user deleted file mode 100644 index 24050a119..000000000 --- a/Webserver/ServerHandler/ServerHandler.sln.DotSettings.user +++ /dev/null @@ -1,2 +0,0 @@ - - True \ No newline at end of file diff --git a/Webserver/ServerHandler/ServerHandler.suo b/Webserver/ServerHandler/ServerHandler.suo deleted file mode 100644 index f64c6cf90..000000000 Binary files a/Webserver/ServerHandler/ServerHandler.suo and /dev/null differ diff --git a/Webserver/ServerHandler/ServerHandler/Form1.Designer.cs b/Webserver/ServerHandler/ServerHandler/Form1.Designer.cs deleted file mode 100644 index cd7d9756a..000000000 --- a/Webserver/ServerHandler/ServerHandler/Form1.Designer.cs +++ /dev/null @@ -1,175 +0,0 @@ -namespace ServerHandler -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.button4 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.button5 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(100, 12); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(135, 26); - this.button1.TabIndex = 0; - this.button1.Text = "Start"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(100, 55); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(135, 26); - this.button2.TabIndex = 1; - this.button2.Text = "Start"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // button3 - // - this.button3.Location = new System.Drawing.Point(100, 97); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(135, 26); - this.button3.TabIndex = 2; - this.button3.Text = "Start"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); - // - // button4 - // - this.button4.Location = new System.Drawing.Point(100, 138); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(135, 26); - this.button4.TabIndex = 3; - this.button4.Text = "Start"; - this.button4.UseVisualStyleBackColor = true; - this.button4.Click += new System.EventHandler(this.button4_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(37, 19); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(29, 13); - this.label1.TabIndex = 4; - this.label1.Text = "HG1"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(37, 62); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(29, 13); - this.label2.TabIndex = 5; - this.label2.Text = "HG2"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(37, 104); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(29, 13); - this.label3.TabIndex = 6; - this.label3.Text = "HG3"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(37, 145); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(29, 13); - this.label4.TabIndex = 7; - this.label4.Text = "HG4"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(37, 184); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(29, 13); - this.label5.TabIndex = 9; - this.label5.Text = "HG5"; - // - // button5 - // - this.button5.Location = new System.Drawing.Point(100, 177); - this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(135, 26); - this.button5.TabIndex = 8; - this.button5.Text = "Start"; - this.button5.UseVisualStyleBackColor = true; - this.button5.Click += new System.EventHandler(this.button5_Click); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(244, 216); - this.Controls.Add(this.label5); - this.Controls.Add(this.button5); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.button4); - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.button1); - this.Name = "Form1"; - this.Text = "Form1"; - this.Closing += OnFormClosing; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button3; - private System.Windows.Forms.Button button4; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Button button5; - } -} - diff --git a/Webserver/ServerHandler/ServerHandler/Form1.cs b/Webserver/ServerHandler/ServerHandler/Form1.cs deleted file mode 100644 index 31a143d17..000000000 --- a/Webserver/ServerHandler/ServerHandler/Form1.cs +++ /dev/null @@ -1,72 +0,0 @@ -namespace ServerHandler -{ - using System; - using System.Windows.Forms; - - public partial class Form1 : Form - { - private readonly Server _hg1; - private readonly Server _hg2; - private readonly Server _hg3; - private readonly Server _hg4; - private readonly Server _hg5; - - public Form1() - { - InitializeComponent(); - - _hg1 = new Server("hg1"); - _hg2 = new Server("hg2"); - _hg3 = new Server("hg3"); - _hg4 = new Server("hg4"); - _hg5 = new Server("hg5"); - } - - private void OnFormClosing(object sender, EventArgs e) - { - _hg1.Stop(); - _hg2.Stop(); - _hg3.Stop(); - _hg4.Stop(); - } - - private void button1_Click(object sender, EventArgs e) - { - ToggleServerAndButton(_hg1, (Button)sender); - } - - private void button2_Click(object sender, EventArgs e) - { - ToggleServerAndButton(_hg2, (Button)sender); - } - - private void button3_Click(object sender, EventArgs e) - { - ToggleServerAndButton(_hg3, (Button)sender); - } - - private void button4_Click(object sender, EventArgs e) - { - ToggleServerAndButton(_hg4, (Button)sender); - } - - private void button5_Click(object sender, EventArgs e) - { - ToggleServerAndButton(_hg5, (Button) sender); - } - - private void ToggleServerAndButton(Server server, Button button) - { - server.ToggleRunning(); - - if (server.ShouldBeRunning()) - { - button.Text = "Stop"; - } - else - { - button.Text = "Start"; - } - } - } -} diff --git a/Webserver/ServerHandler/ServerHandler/Form1.resx b/Webserver/ServerHandler/ServerHandler/Form1.resx deleted file mode 100644 index 1af7de150..000000000 --- a/Webserver/ServerHandler/ServerHandler/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Webserver/ServerHandler/ServerHandler/Program.cs b/Webserver/ServerHandler/ServerHandler/Program.cs deleted file mode 100644 index 04bcfffe3..000000000 --- a/Webserver/ServerHandler/ServerHandler/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; - -namespace ServerHandler -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); - } - } -} diff --git a/Webserver/ServerHandler/ServerHandler/Properties/AssemblyInfo.cs b/Webserver/ServerHandler/ServerHandler/Properties/AssemblyInfo.cs deleted file mode 100644 index c5af84309..000000000 --- a/Webserver/ServerHandler/ServerHandler/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ServerHandler")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Windows User")] -[assembly: AssemblyProduct("ServerHandler")] -[assembly: AssemblyCopyright("Copyright © Windows User 2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6c5498e0-d3d9-4c0a-8a68-0c1de5bda313")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Webserver/ServerHandler/ServerHandler/Properties/Resources.Designer.cs b/Webserver/ServerHandler/ServerHandler/Properties/Resources.Designer.cs deleted file mode 100644 index 271284c8a..000000000 --- a/Webserver/ServerHandler/ServerHandler/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.269 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ServerHandler.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ServerHandler.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/Webserver/ServerHandler/ServerHandler/Properties/Resources.resx b/Webserver/ServerHandler/ServerHandler/Properties/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/Webserver/ServerHandler/ServerHandler/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Webserver/ServerHandler/ServerHandler/Properties/Settings.Designer.cs b/Webserver/ServerHandler/ServerHandler/Properties/Settings.Designer.cs deleted file mode 100644 index 693ed01ca..000000000 --- a/Webserver/ServerHandler/ServerHandler/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.269 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ServerHandler.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/Webserver/ServerHandler/ServerHandler/Properties/Settings.settings b/Webserver/ServerHandler/ServerHandler/Properties/Settings.settings deleted file mode 100644 index 39645652a..000000000 --- a/Webserver/ServerHandler/ServerHandler/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Webserver/ServerHandler/ServerHandler/Server.cs b/Webserver/ServerHandler/ServerHandler/Server.cs deleted file mode 100644 index 710fed810..000000000 --- a/Webserver/ServerHandler/ServerHandler/Server.cs +++ /dev/null @@ -1,117 +0,0 @@ -namespace ServerHandler -{ - using System; - using System.Diagnostics; - using System.IO; - using System.Reflection; - using System.Threading; - using System.Windows.Forms; - - public class Server - { - private bool _shouldBeRunning; - private Thread _watcherThread; - private Process _serverProcess; - private String _path; - - public Server(String path) - { - _path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\" + path; - - _watcherThread = new Thread(Watch); - _watcherThread.Start(); - } - - public bool ShouldBeRunning() - { - return _shouldBeRunning; - } - - public void ToggleRunning() - { - _shouldBeRunning = !_shouldBeRunning; - - if (_serverProcess == null) - { - try - { - String memParams = "-Djava.ext.dirs=lib -Xincgc -Xmx2048M "; - String args = memParams + "-jar " + "\"" + _path + @"\craftbukkit-0.0.1-snapshot.jar"; - var processInfo = new ProcessStartInfo("java.exe", args); - processInfo.WorkingDirectory = _path; - processInfo.Verb = "runas"; - processInfo.UseShellExecute = false; - - _serverProcess = new Process(); - _serverProcess.StartInfo = processInfo; - } - catch (Exception ex) - { - MessageBox.Show("Error creating process " + ex.Message + "\n" + ex.StackTrace); - } - } - - if (!_shouldBeRunning) - { - if (!_serverProcess.HasExited) - { - _serverProcess.Kill(); - } - } - } - - public void PrepFiles() - { - var worldDirectory = new DirectoryInfo(_path + @"\world"); - var worldEndDirectory = new DirectoryInfo(_path + @"\world_the_end"); - - try - { - if (worldDirectory.Exists) - worldDirectory.Delete(true); - - if (worldEndDirectory.Exists) - worldEndDirectory.Delete(true); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message + "\n" + ex.StackTrace); - } - - var commonDirectory = new DirectoryInfo(Directory.GetParent(Assembly.GetExecutingAssembly().Location) + @"\Common"); - - var files = commonDirectory.GetFiles(); - - // Copy the files and overwrite destination files if they already exist. - foreach (var file in files) - { - file.CopyTo(_path + @"\" + file.Name, true); - } - } - - public void Start() - { - _serverProcess.Start(); - _serverProcess.WaitForExit(); - } - - public void Stop() - { - _watcherThread.Abort(); - } - - public void Watch() - { - while (true) - { - if (_shouldBeRunning) - { - PrepFiles(); - Start(); - } - - Thread.Sleep(2000); - } - } - } -} diff --git a/Webserver/ServerHandler/ServerHandler/ServerHandler.csproj b/Webserver/ServerHandler/ServerHandler/ServerHandler.csproj deleted file mode 100644 index e55df82b5..000000000 --- a/Webserver/ServerHandler/ServerHandler/ServerHandler.csproj +++ /dev/null @@ -1,92 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {7674049F-5C67-4CD0-AD1F-8F23C718E37B} - WinExe - Properties - ServerHandler - ServerHandler - v4.0 - Client - 512 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - app.manifest - - - - - - - - - - - - - - - - Form - - - Form1.cs - - - - - - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - \ No newline at end of file diff --git a/Webserver/ServerHandler/ServerHandler/app.manifest b/Webserver/ServerHandler/ServerHandler/app.manifest deleted file mode 100644 index 423791a64..000000000 --- a/Webserver/ServerHandler/ServerHandler/app.manifest +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 738ecd2f8..25a161edc 100644 Binary files a/Website/LOCWebsite.suo and b/Website/LOCWebsite.suo differ