Bendercraft / spigot-bending

Minecraft plugin that allows players to bend elements as in the series
Other
14 stars 7 forks source link

Lavabending : obsidian non bendable #79

Closed kikipunk closed 8 years ago

kikipunk commented 8 years ago

bonjour, L'obsidian devrait être bendable pour le raiseearth et le lavatrain comme codé:

        if (EntityTools.isSpecialized(player, BendingAffinity.LAVA) 
                && (block.getType() == Material.OBSIDIAN) 
                && ((ability.equals(EarthWall.NAME)) || (ability.equals(LavaTrain.NAME)))) {
            return true;
        }

mais cela ne fonctionne pas. Pour le lavatrain cela déclanche quand même le cooldown.

Merci

kikipunk commented 8 years ago

Edit: (ability.equals(EarthWall.NAME)) ne renvois a rien, je m'explique

Si l'on retire l'ability.equals tous fonctionne, l'obsidian est bendable par les lava.

Si l'on mes System.out.print(ability.getAbility()); dans le if, le serveur renvoie bien

[11:25:28 INFO]: class net.avatar.realms.spigot.bending.abilities.earth.EarthWall

Le problème viens de la le ability.equals(LavaTrain.NAME) ne s'execute jamais

j'espère avoir été clair.

Merci

ghost commented 8 years ago

Salut ! :) Le problème c'est pas qu'il faut utiliser ability.getName().equals() au lieu de ability.equals() ? :)

kikipunk commented 8 years ago

C'est for possible mais j'ai fait un pull request avec des petite modifications dans le gameplay (donc pour l'instant j'essaye pas) Mais grand merci pour cette probable bonne solution.

Koudja commented 8 years ago

Fix: 2beac0a