Android Open Source - Spidermine Console Panel






From Project

Back to project page Spidermine.

License

The source code is released under:

Copyright ? 2014 PEMapModder This software is open-source and everyone is welcome to share redistributions or modifications, as long as it is clearly specified that this project's original source is ...

If you think the Android project Spidermine listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package pemapmodder.spidermine.android;
/*w w  w  .ja  v  a  2 s  .c  o  m*/
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import pemapmodder.spidermine.Console;
import pemapmodder.spidermine.SpiderServer;
import pemapmodder.spidermine.managers.ServerManager;
import pemapmodder.utils.php.functions.P;
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.text.format.DateFormat;
import android.util.Log;
import android.view.Menu;
import android.widget.Toast;

public class ConsolePanel extends Activity{
  private SpiderServer server;
  private Console console;
  @Override protected void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_console_panel);
    try{
      server=ServerManager.get(new InetSocketAddress(
          InetAddress.getByName(getIntent().getStringExtra(ServerMainControlPanel.INTENT_SERVER_IP)),
          getIntent().getIntExtra(ServerMainControlPanel.INTENT_SERVER_PORT, 19132)));
    }catch(UnknownHostException e){
      if(e instanceof UnknownHostException){
        String path=Environment.getExternalStorageDirectory().getAbsolutePath()+"SpiderMine/error-dump-at-"
            +Long.toString(System.currentTimeMillis())+".txt";
        Toast.makeText(this, "An error occurred: Tried to use the following:\n"
            +getIntent().getStringExtra(ServerMainControlPanel.INTENT_SERVER_IP)
            +"\n as an IP address.\nFull error dump at "+path+"\nClosing activity.", Toast.LENGTH_LONG).show();
        Log.e(getClass().getName(), "Internal coding error: Tried to use invalid string as IP: "
            +getIntent().getStringExtra(ServerMainControlPanel.INTENT_SERVER_IP), e);
        try{
          P.file_put_contents(path, "Error dump as at "
              +DateFormat.format("dd-mm-yy hh:mm:ss", System.currentTimeMillis())
              +"\nException class: "+e.getClass().getName()+"\nException message: "+e.getLocalizedMessage());
        }catch(IOException e1){
          Toast.makeText(this, "Unable to write error dump to file "+path, Toast.LENGTH_LONG).show();
        }
        finish();
      }
    }
    console=server.console;
  }
  @Override public boolean onCreateOptionsMenu(Menu menu){
    getMenuInflater().inflate(R.menu.console_panel, menu);
    return true;
  }
}




Java Source Code List

pemapmodder.StdObj.java
pemapmodder.easymod.EasyMod.java
pemapmodder.easymod.xml.Attribute.java
pemapmodder.easymod.xml.Element.java
pemapmodder.easymod.xml.XmlLangException.java
pemapmodder.easymod.xml.Xml.java
pemapmodder.old_spidermine.ConsoleChangeListener.java
pemapmodder.old_spidermine.ConsoleInputListener.java
pemapmodder.old_spidermine.ServerRunner.java
pemapmodder.old_spidermine.SpiderServer.java
pemapmodder.old_spidermine.managers.CmdManager.java
pemapmodder.old_spidermine.managers.EntityManager.java
pemapmodder.old_spidermine.managers.Manager.java
pemapmodder.old_spidermine.managers.ServerManager.java
pemapmodder.old_spidermine.managers.TileManager.java
pemapmodder.old_spidermine.managers.UserManager.java
pemapmodder.old_spidermine.managers.WorldManager.java
pemapmodder.old_spidermine.network.Networker.java
pemapmodder.old_spidermine.objects.ChestTile.java
pemapmodder.old_spidermine.objects.Command.java
pemapmodder.old_spidermine.objects.Entity.java
pemapmodder.old_spidermine.objects.SignTile.java
pemapmodder.old_spidermine.objects.Tile.java
pemapmodder.old_spidermine.objects.User.java
pemapmodder.old_spidermine.utils.io.IOUtils.java
pemapmodder.old_spidermine.utils.io.MyReader.java
pemapmodder.old_spidermine.utils.math.Location.java
pemapmodder.old_spidermine.utils.math.MathUtils.java
pemapmodder.old_spidermine.utils.math.PCoord.java
pemapmodder.old_spidermine.utils.math.Position.java
pemapmodder.old_spidermine.world.Block.java
pemapmodder.old_spidermine.world.Chunk.java
pemapmodder.old_spidermine.world.World.java
pemapmodder.old_spidermine.world.populator.WorldPopulator.java
pemapmodder.spidermine.Console.java
pemapmodder.spidermine.SpiderServer.java
pemapmodder.spidermine.Utils.java
pemapmodder.spidermine.android.ConsolePanel.java
pemapmodder.spidermine.android.CreateNewServerActivity.java
pemapmodder.spidermine.android.LauncherActivity.java
pemapmodder.spidermine.android.ServerMainControlPanel.java
pemapmodder.spidermine.client.Client.java
pemapmodder.spidermine.events.EventHandler.java
pemapmodder.spidermine.events.EventResult.java
pemapmodder.spidermine.events.Event.java
pemapmodder.spidermine.events.server.ServerStopEvent.java
pemapmodder.spidermine.exceptions.SocketAddressUsedException.java
pemapmodder.spidermine.managers.ClientManager.java
pemapmodder.spidermine.managers.CommandHandler.java
pemapmodder.spidermine.managers.EventManager.java
pemapmodder.spidermine.managers.Manager.java
pemapmodder.spidermine.managers.ServerManager.java
pemapmodder.spidermine.network.NetworkHandler.java
pemapmodder.spidermine.network.packet.PacketParser.java
pemapmodder.spidermine.network.packet.Packet.java
pemapmodder.spidermine.network.packet.ProtocolInfo.java
pemapmodder.spidermine.objects.CommandIssuer.java
pemapmodder.spidermine.objects.Command.java
pemapmodder.spidermine.objects.Interfaces.java
pemapmodder.spidermine.world.World.java
pemapmodder.utils.io.Saveable.java
pemapmodder.utils.php.functions.P.java