Coder Social home page Coder Social logo

legendcraft's People

Contributors

cthulhusec avatar dingusbungus avatar j-wass avatar unknownshadow200 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

legendcraft's Issues

[Bug] Plugin name set

A plugin can set the name and version of every plugin loaded on the server. While this may be harmless, some plugins (such as the default "Troll" plugin), uses this set property incorrectly which causes a StackOverflowException to be thrown.

Example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using fCraft;
using System.Threading;


namespace Lolwut
{
    public class Init : Plugin
    {
        public void Initialize()
        {
            new Thread(new ThreadStart(delegate {
                Thread.Sleep(30000);

                List<Plugin> plugins = PluginManager.GetInstance().Plugins;
                foreach (Plugin p in plugins) {
                    p.Name = "lolwut";
                    p.Version = "0.0";
                }
            })).Start();
        }

        private string _name;
        public string Name
        {
            get
            {
                return "CrashingServerPlugin";
            }
            set
            {
                _name = value; //Be sure our plugin doesn't crash
            }
        }

        private string _version;
        public string Version
        {
            get
            {
                return "1.0";
            }
            set
            {
                _version = value; //Be sure our plugin doesn't cause the crash
            }
        }
    }
}

In the Troll plugin, the Version property set's itself, which causes set to be called again, which set's itself..and so on..

        //your plugin name
        public string Name
        {
            get
            {
                return "TrollPlugin";
            }
            set
            {
                Name = value;
            }
        }

        //your plugin version
        public string Version
        {
            get
            {
                return "1.0";
            }
            set
            {
                Version = value;
            }
        }

This causes Version to repeatedly set itself, thus causing a crash (if the exception goes unhandled), which in this case it does.

Fix DisplayedName changes on /Impersonate

Issue: The updates for the DisplayedName work some times and not other times, or don't change back when /impersonate is done again to reset to normal. Also upon leaving server (or server restart) the DisplayedName doesn't change back from the one given by Impersonate

Proposed Solution: Create a different var for DisplayedNames made by /Impersonate, if there is an impersonate name, use that name in chat instead of DisplayedName. Null the var once the player leaves a server or resets their impersonation

Properly implement CPE negotiation

You must NOT assume that any CPE-capable client supports any extension unless they send an appropriate ExtEntry at negotiation time. You cannot assume CPE support based on client name or heartbeat origin either.

Please check the CPE specification for details.

Check NegotiateProtocolExtension() in FemtoCraft for an example of correct implementation.

If this is not addressed, expect future ClassiCube-Client updates to break support for LegendCraft.

Error creating map 1024^3

Running the command "/gen grass flat 1024 1024 1024 WORLDNAME" creates the following error on console:

ERROR: Map failed to save: System.OverflowException: Arithmetic operation resulted in an overflow.
at System.IO.BufferedStream.Write(Byte[] array, Int32 offset, Int32 count)
at fCraft.MapConversion.MapFCMv3.Save(Map mapToSave, String fileName)
at fCraft.MapConversion.MapUtility.TrySave(Map mapToSave, String fileName, MapFormat format)

Ports

I need to know what port to use for my server it keeps shutting down when I turn it on.

AutoRank Unhandled Exception

When you open the Autorank.exe with no Autorank.xml, the application throws an unhandled exception. The app can continue and work to create one, but this is not intended behavior.

Changing player's rank causes that player to disappear.

Here's the fix, you need to send the older AddEntity in Player.Networking.cs method ReAddEntity

        void ReAddEntity([NotNull] VisibleEntity entity, [NotNull] Player player, Position newPos)
        {
            if (entity == null) throw new ArgumentNullException("entity");
            if (player == null) throw new ArgumentNullException("player");
            SendNow(PacketWriter.MakeRemoveEntity(entity.Id));
            if (usesCPE && Heartbeat.ClassiCube())
                SendNow(PacketWriter.MakeExtRemovePlayerName((short)entity.Id));

            SendNow(PacketWriter.MakeAddEntity(entity.Id, player.ListName, newPos));
            entity.LastKnownPosition = newPos;
        }

I am not entirely sure why, but using ExtAddEntity and MakeTeleport causes issues with names not showing up in list. Probably because the server never sends ExtAddPlayerName.
(thanks to Venom983 for originally finding this bug)

PHP Server list

I'm at the stage of my University project where my 3D work is taking hours to render a set of frames. I might write a PHP server list, just for me and you if you're interested. I trust you have some sort of web host?

Servers are unable to stay connected to global chat

Whenever a server is connected to the global chat, it disconnects shortly with one of the following two messages: "read error: Connection reset by peer" or "Ping timeout" This indicates a bug with global chat.

Spec when traveling between worlds causes sectating to stop

When a player is /spec-ed, and said player joins another world, anyone speccing is removed from spec.

Sequence of events

Player1: /spec Player2
Player2: /j anotherWorld
Player 1 stops specing player 2 after joining the world.

Does that make any sense...??

Default heartbeat location

When you initiate the ConfigGUI without a config.xml, and it generates one, after it generates one and you click "Ok" or "Apply", without selecting a default heartbeat, it'll throw an exception.

I'd set the default heartbeat to Classicube.net

AutoRank Fix/Full Implementation

We need to finish autorank and have it working well and fully implemented with an option in the config to use it or not then maybe a standalone config for the autorank system. If not doable, just close the issue.

World List Glitch

An error occured in the world list
System.ArgumentException: DataGridViewComboBoxCell value is not valid.

This error is what I keep on experiencing when doing anything that involves showing the world list.

Add CPE Env support

I will try and figure this out at some point - maybe later this week. I'll have to review the Env stuff hardcore...

CC.net Connection Issue

I downloaded the most recent update for legendcraft (v2.2.1). However, for some reason it is not taking the update and is not allowing me to connect to classicube. It is a rather odd predicament because I tested everything I know and nothing seems to work. I tried restarting my server, re-porting, new ports, checking for computer updates, checking my firewall settings, and double-checking the option set to classicube.net or minecraft.net. The weirdest thing is that I am able to connect to minecraft.net, but not classicube.net. I like your software and want to continue to use it, however I was wondering if I could get some assistance so I can continue using your software.
Thanks for any help,
~Defisnet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.