Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Does not work?

Comments in 'Plugin Development' started by Legoboy0215, Jun 21, 2015.

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

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Why does not this work?
    PHP:
            public function onEntityDamage(EntityDamageEvent $event){
            if (
    $event->getEntity()->getLevel->getName()=="blockrun"){
            
    $event->setCancelled();
            }
        }
  2. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    Maybe try getLevelByName()?
  3. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    I forgot the () after the getLevel....
  4. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    I cant use getLevelByName()... Why?
  5. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    Hm idk. Just heard that it sometimes fixes problems.
  6. jojoe77777
    Offline

    jojoe77777 Notable Member Plugin Developer

    Joined:
    May 28, 2015
    Posts:
    653
    Plugins:
    1
    Minecraft User:
    jojoe77777
    Maybe you have to "use" something else?
    Legoboy0215 likes this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    If you don't know, don't reply. You are giving IRRELEVANT AND WRONG solutions. There are a lot of ways that a plugin doesn't work. If you don't know what you're saying, don't reply. You're messing things up.
    jojoe77777 likes this.
  8. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    It still does not work.
Thread Status:
Not open for further replies.

Share This Page

Advertisement