Merge branches 'develop' and 'feature/report' of github.com:Mineplex-LLC/Minecraft-PC into feature/report
This commit is contained in:
commit
7c80c3826b
@ -10,6 +10,7 @@ import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -340,24 +341,34 @@ public class EloManager extends MiniDbClientPlugin<EloClientData>
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for fetching the Itemstack that represents a player's division and their progress in it
|
||||
* Method for fetching the ItemStack that represents a player's division and their progress in it
|
||||
*/
|
||||
public ItemStack getVisual(int elo)
|
||||
{
|
||||
ItemBuilder build = new ItemBuilder(_visual);
|
||||
build.setTitle(C.cGreen + _disp);
|
||||
int percentage = (elo * 100) / _maxElo;
|
||||
int percentage;
|
||||
|
||||
if (_maxElo == -1)
|
||||
{
|
||||
percentage = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
percentage = ((elo - Math.max(0, _minElo)) * 100) / (_maxElo - Math.max(0, _minElo));
|
||||
}
|
||||
|
||||
String color = C.cYellow;
|
||||
if (percentage <= 35)
|
||||
{
|
||||
color = C.cRed;
|
||||
} else if (percentage >= 65)
|
||||
}
|
||||
else if (percentage >= 65)
|
||||
{
|
||||
color = C.cGreen;
|
||||
}
|
||||
|
||||
build.addLore(C.cGold + "Your Progress:", color + percentage + "% complete with this Division");
|
||||
|
||||
build.addLore(C.cGold + "Progress:", color + percentage + "% complete with this Division");
|
||||
return build.build();
|
||||
}
|
||||
}
|
||||
|
@ -195,13 +195,15 @@ public class BrandingPost
|
||||
}
|
||||
}
|
||||
|
||||
Material type = Material.STEP;
|
||||
byte data = (byte)5;
|
||||
if (set.getBlockY() == corner4.getBlockY())
|
||||
{
|
||||
data = (byte)13;
|
||||
type = Material.SMOOTH_BRICK;
|
||||
data = (byte)0;
|
||||
}
|
||||
|
||||
set.getBlock().setType(Material.STEP);
|
||||
set.getBlock().setType(type);
|
||||
set.getBlock().setData(data);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class BillboardManager extends MiniPlugin
|
||||
|
||||
private void generateBoards()
|
||||
{
|
||||
_branding.createPost(new Location(Bukkit.getWorld("world"), -5, 79, -35), BlockFace.SOUTH, "logitech.jpg");
|
||||
_branding.createPost(new Location(Bukkit.getWorld("world"), -6, 77, -35), BlockFace.SOUTH, "logitech.jpg");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user