nah, you need to use .equals() or .equalsIgnoreCase()

This commit is contained in:
alisolarflare 2017-08-14 16:35:48 -04:00
parent 428c17123d
commit 3ea8bb6539

View file

@ -10,7 +10,7 @@ public class Bedsplode implements Listener {
public void onSleep(PlayerBedEnterEvent event){
Player player = event.getPlayer();
player.sendMessage("[ButtonPresents] Nighty night " + player.getName().toLowerCase());
if (player.getName().toLowerCase() != "alisolarflare") return;
if (!player.getName().toLowerCase().equalsIgnoreCase("alisolarflare")) return;
player.getWorld().createExplosion(
player.getLocation().getBlockX(),