String works only on the same block, help pls

Discussion in 'Plugin Development' started by oran10majar, Dec 3, 2013.

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

    oran10majar

    String works only on the same block, How do I creat string to all the class?

    Sorry, Im not good in english, Im from Israel...
     
  2. You are defining your string in a method. Define the String variable at the top of the page, after you declare your class. exe.

    package me.dev.dev
    public TestClass extends javaPlugin{

    String IAmTheSTringYouWantedToDefine = "wargarble"
    public onEnable{
    String ThisIsWhereYouWerePuttingTheStringBefore = "Not what you wanted in this instance"
    }
    }
     
Thread Status:
Not open for further replies.

Share This Page