1.5r2 p1
This commit is contained in:
parent
620a949b9b
commit
5856a07c63
15 changed files with 8 additions and 3 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -3,7 +3,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = 'org.gsdistance'
|
||||
version = '1.5r1'
|
||||
version = '1.5r2'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
|
|
|||
BIN
build/libs/GrimmsServer-1.5r2.jar
Normal file
BIN
build/libs/GrimmsServer-1.5r2.jar
Normal file
Binary file not shown.
|
|
@ -4,7 +4,7 @@ description: A spigot plugin made by Grimm and tyuXX, it adds player leveling, a
|
|||
website: www.gsdistance.org
|
||||
prefix: Grimm's
|
||||
main: org.gsdistance.grimmsServer.GrimmsServer
|
||||
version: 1.5r1
|
||||
version: 1.5r2
|
||||
api-version: 1.20
|
||||
load: STARTUP
|
||||
commands:
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -36,7 +36,11 @@ public class BuyEnchantment {
|
|||
return false;
|
||||
} else {
|
||||
PlayerStats playerStats = PlayerStats.getPlayerStats((Player) sender);
|
||||
double cost = EnchantBaseValues.enchantBaseValues.get(enchantment) * (double) (itemToApply.getEnchantmentLevel(enchantment) + 1);
|
||||
int currentLevel = itemToApply.getEnchantmentLevel(enchantment);
|
||||
int vanillaMax = enchantment.getMaxLevel();
|
||||
int levelsAboveVanilla = Math.max(0, currentLevel - vanillaMax);
|
||||
double multiplier = Math.pow(2, levelsAboveVanilla);
|
||||
double cost = EnchantBaseValues.enchantBaseValues.get(enchantment) * (double) (currentLevel + 1) * multiplier;
|
||||
if (playerStats.getStat("money", Double.class) < cost) {
|
||||
sender.sendMessage("Not enough money.");
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public class EntitySpawnEvent {
|
|||
double maxHealth = livingEntity.getAttribute(Attribute.MAX_HEALTH).getValue();
|
||||
String healthBar = generateHealthBar(livingEntity.getHealth(), maxHealth);
|
||||
|
||||
livingEntity.setCustomName(null);
|
||||
metadata.originalName = livingEntity.getName();
|
||||
String displayName = levelColor + "[" + finalLevel + "] " + ChatColor.WHITE + metadata.originalName + " " + healthBar;
|
||||
livingEntity.setCustomName(displayName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue