mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fancy formatting for power levels titles
This commit is contained in:
parent
20febbc3bc
commit
378de09ccd
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.listeners;
|
package com.gmail.nossr50.listeners;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
|
import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent;
|
||||||
@ -28,15 +29,18 @@ public class mcSpoutListener implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onSpoutCraftEnable(SpoutCraftEnableEvent event) {
|
public void onSpoutCraftEnable(SpoutCraftEnableEvent event) {
|
||||||
SpoutPlayer sPlayer = event.getPlayer();
|
SpoutPlayer sPlayer = event.getPlayer();
|
||||||
|
PlayerProfile PPs = Users.getProfile(sPlayer);
|
||||||
|
|
||||||
|
//TODO: Add custom titles based on skills
|
||||||
|
if (LoadProperties.showPowerLevel) {
|
||||||
|
sPlayer.setTitle(sPlayer.getTitle() + "\n" + ChatColor.YELLOW + "P" + ChatColor.GOLD + "lvl"
|
||||||
|
+ ChatColor.WHITE+"." + ChatColor.GREEN + String.valueOf(PPs.getPowerLevel()));
|
||||||
|
}
|
||||||
|
|
||||||
if (sPlayer.isSpoutCraftEnabled()) {
|
if (sPlayer.isSpoutCraftEnabled()) {
|
||||||
SpoutStuff.playerHUDs.put(sPlayer, new HUDmmo(sPlayer)); //Setup Party HUD stuff
|
SpoutStuff.playerHUDs.put(sPlayer, new HUDmmo(sPlayer)); //Setup Party HUD stuff
|
||||||
PlayerProfile PPs = Users.getProfile(sPlayer);
|
|
||||||
PPs.toggleSpoutEnabled();
|
|
||||||
|
|
||||||
if (LoadProperties.showPowerLevel) {
|
PPs.toggleSpoutEnabled();
|
||||||
sPlayer.setTitle(sPlayer.getName() + "- Power: " + String.valueOf(PPs.getPowerLevel()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user