-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.13.1 #53
base: master
Are you sure you want to change the base?
v1.13.1 #53
Conversation
pom.xml
Outdated
@@ -6,7 +6,7 @@ | |||
|
|||
<groupId>me.justeli.coins</groupId> | |||
<artifactId>Coins</artifactId> | |||
<version>1.13</version> | |||
<version>1.14</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not quite yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to 1.13.1
@@ -30,6 +30,8 @@ | |||
@ConfigEntry ("drop-with-any-death") public static Boolean DROP_WITH_ANY_DEATH = false; | |||
@ConfigEntry ("enchanted-coin") public static Boolean ENCHANTED_COIN = false; | |||
@ConfigEntry ("disable-mythic-mob-handling") public static Boolean DISABLE_MYTHIC_MOB_HANDLING = false; | |||
|
|||
@ConfigEntry("levelledmobs-level-multiplier") public static Double LEVELLEDMOBS_LEVEL_MULTIPLIER = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets place it at all the other Doubles in the class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I can move this double since it is a config value.
import org.bukkit.plugin.Plugin; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class LevelledMobsHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would appreciate using the project's code style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I think.
@@ -38,16 +39,20 @@ | |||
private final Coins coins; | |||
private final NamespacedKey playerDamage; | |||
|
|||
private final LevelledMobsHandler levelledMobsHandler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would prefer if the hook was initialized in the main class, just like with mythicmobs, and then you can move getLevelledMobsMultipliedAmount()
to LevelledMobsHandler as well, and use the created main.lmHook()
for getLevelledMobsMultipliedAmount()
.
for deadMob
, idrk what's going on there, but i guess you could add an @EventHandler
in the hook as well and register the hook (if lm is installed)
i just prefer to keep classes to their main usage, so if things like deadMob
and getLevelledMobsMultipliedAmount()
are from another plugin, i'd rather keep it in a separate class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
private final HashMap<Location, Integer> locationAmountCache = new HashMap<>(); | ||
private final HashMap<Location, Long> locationLastTimeCache = new HashMap<>(); | ||
|
||
private static final SplittableRandom RANDOM = new SplittableRandom(); | ||
private LivingEntity deadMob; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see other comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -283,6 +297,18 @@ private void drop (int amount, @Nullable Player player, @NotNull Location locati | |||
} | |||
} | |||
|
|||
private double getLevelledMobsMultipliedAmount(double increment){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add a LivingEntity
parameter instead of getting it through this.deadMob
(when applying the requested in other comment)
(and yeah as said before i'd rather have this function moved to the hook)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it
ill add a .editorconfig soon |
@stumper66 Please finish this, we need it ♥ |
Sorry guys I totally forgot about this PR. I'll see what I can do in the next few days. |
Added support for LevelledMobs. Added a new config value for it.