Object getter returns Null?

Discussion in 'Plugin Development' started by TheDarkLord197, Jun 22, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TheDarkLord197

    Okay. So here's what's happening. I have an Object, called Channel. In ChannelManager, I create a new Channel, With the name "Global". I check before I create the channel that the name I'm putting in isn't null. Afterwards, I attempt to get the name of the Channel, And it's null. I have no idea why this is happening (It's probably some stupid java mistake caused by me working in areas I'm not familiar with, Either that or I'm just an idiot), So I came here.
    Channel Object: http://pastebin.com/5XJ4QvhH
    ChannelManager Class: http://pastebin.com/AjDmUFKW
    Thanks in advance, Thedarklord197.

    EDIT: Look at the loadChannels() class and createChannel() class in ChannelManager.
     
  2. Offline

    mazentheamazin

  3. Offline

    TheDarkLord197

    mazentheamazin
    That method isn't involved in the issue is it? I'll change it to that anyway.

    EDIT: Look at my DEBUG notes, Those are the ones involved.

    Nevermind guys. Fixed the issue. Did "name = this.name" instead of "this.name = name". Fixed.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page