Thanks, that worked.
public synchronized void openConnection() { try{ String host = this.getConfig().getString("mysql.host"); Integer...
Nope.
@EventHandler public void onPlayerJoin(PlayerLoginEvent event) { Player p = event.getPlayer(); openConnection(); try {...
Please someone must know this, and test the code before give me. No one these have worked yet.
public final HashMap<Player, Integer> exp = new HashMap<Player, Integer>(); @EventHandler public void onDamage(EntityDamageEvent...
Have you even tested this yourself? I keep all my xp instead of just 75% of it.
I need to use hashmap because "PlayerDeathEvent" is called after the player is already dead(and lost hes xp) so he has zero xp. Thats why I use...
What? Before the player dies, @EventHandler public void onDamage(EntityDamageEvent event) { Entity p = event.getEntity();...
Line 59 is: int exp75 = exp.get(exp) / 100 * 75; EDIT: no errors on the ondeath that's working fine i know it
@EventHandler public void onRespawn(PlayerRespawnEvent event) { Player p = event.getPlayer(); int exp75 = exp.get(exp) / 100 * 75; if...
How?
Didn't get it. @EventHandler public void onRespawn(PlayerRespawnEvent event) { Player p = event.getPlayer(); double...
Already made this, now have to load it from hashmap on respawn. public final HashMap<Player, Integer> exp = new HashMap<Player, Integer>();...
But how can I get how much xp did the player have BEFORE he died? That's what I want to know.
There's no such event as PlayerDamageEvent
What I'm trying to do is that when you die, you will keep part of xp that you had. @EventHandler public void onDeath(PlayerDeathEvent event) {...
yeah i know, thanks :P
Thanks! Got it working with this!
Hey! I was wondering how I can target command to all players online on the server. Example: I want to set everyone whos online to fire, so hows...
Separate names with a comma.