Skip to content

Commit

Permalink
Add better descriptions to PC options
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo56958 committed Dec 24, 2024
1 parent 7f3c636 commit 67c2d0c
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ private void planOffCooldownAlert(@NotNull final Player player, @NotNull final I

protected final PlayerConfigurationOption OFF_COOLDOWN_ALERT =
new PlayerConfigurationOption(this, "off-cooldown-alert", PlayerConfigurationOption.Type.BOOLEAN,
"off-cooldown-alert", false);
LanguageManager.getString("Modifier.Cooldown.PCO_off_cooldown_alert"), false);

protected final PlayerConfigurationOption OFF_COOLDOWN_NOTE =
new PlayerConfigurationOption(this, "off-cooldown-note", PlayerConfigurationOption.Type.INTEGER,
"off-cooldown-note", 0);
LanguageManager.getString("Modifier.Cooldown.PCO_off_cooldown_note"), 0);

protected final PlayerConfigurationOption OFF_COOLDOWN_INSTRUMENT =
new PlayerConfigurationOption(this, "off-cooldown-instrument", PlayerConfigurationOption.Type.INTEGER,
"off-cooldown-instrument", Instrument.CHIME.ordinal());
LanguageManager.getString("Modifier.Cooldown.PCO_off_cooldown_instrument"), Instrument.CHIME.ordinal());

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,11 @@ public String toString() {

private final PlayerConfigurationOption PARTICLES =
new PlayerConfigurationOption(this,"particles", PlayerConfigurationOption.Type.BOOLEAN,
"particles", true);
LanguageManager.getString("Modifier.Propelling.PCO_particle"), true);

private final PlayerConfigurationOption SOUND =
new PlayerConfigurationOption(this,"sound", PlayerConfigurationOption.Type.BOOLEAN,
"sound", true);
LanguageManager.getString("Modifier.Propelling.PCO_sound"), true);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.flo56958.minetinker.data.ToolType;
import de.flo56958.minetinker.modifiers.PlayerConfigurableModifier;
import de.flo56958.minetinker.utils.ConfigurationManager;
import de.flo56958.minetinker.utils.LanguageManager;
import de.flo56958.minetinker.utils.data.DataHandler;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationManager;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationOption;
Expand Down Expand Up @@ -156,11 +157,11 @@ public void onPlace(@NotNull final MTPlayerInteractEvent event) {

private final PlayerConfigurationOption ENABLED =
new PlayerConfigurationOption(this, "enabled", PlayerConfigurationOption.Type.BOOLEAN,
"enabled", true);
LanguageManager.getString("Modifier.Homing.PCO_enabled"), true);

private final PlayerConfigurationOption SOLVE_PLAYER_OVERLAP =
new PlayerConfigurationOption(this, "solve-player-overlap", PlayerConfigurationOption.Type.BOOLEAN,
"solve-player-overlap", true);
LanguageManager.getString("Modifier.Building.PCO_solve_player_overlap"), true);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import de.flo56958.minetinker.modifiers.PlayerConfigurableModifier;
import de.flo56958.minetinker.utils.ChatWriter;
import de.flo56958.minetinker.utils.ConfigurationManager;
import de.flo56958.minetinker.utils.LanguageManager;
import de.flo56958.minetinker.utils.data.DataHandler;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationManager;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationOption;
Expand Down Expand Up @@ -124,7 +125,7 @@ public void reload() {
blacklist.addAll(blacklistConfig.stream().map(Material::getMaterial).toList());

CLAMP_LEVEL = new PlayerConfigurationOption(this, "clamp-to-level", PlayerConfigurationOption.Type.INTEGER,
"clamp-to-level", this.getMaxLvl());
LanguageManager.getString("Modifier.Power.PCO_clamp_level"), this.getMaxLvl());
}

@SuppressWarnings("BooleanMethodIsAlwaysInverted")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ private void spawnParticles(Player player, Location oldLoc) {

private final PlayerConfigurationOption REQUIRE_SNEAKING =
new PlayerConfigurationOption(this, "require-sneaking", PlayerConfigurationOption.Type.BOOLEAN,
"require-sneaking", true);
LanguageManager.getString("Modifier.Ender.PCO_require_sneaking"), true);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.flo56958.minetinker.data.ToolType;
import de.flo56958.minetinker.modifiers.PlayerConfigurableModifier;
import de.flo56958.minetinker.utils.ConfigurationManager;
import de.flo56958.minetinker.utils.LanguageManager;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationManager;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationOption;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -155,7 +156,8 @@ public void run() {
Bukkit.getServer().getScheduler().runTaskLater(this.getSource(), runnable, 3);
}

private final PlayerConfigurationOption ENABLED = new PlayerConfigurationOption(this, "enabled", PlayerConfigurationOption.Type.BOOLEAN, "enabled", true);
private final PlayerConfigurationOption ENABLED = new PlayerConfigurationOption(this, "enabled", PlayerConfigurationOption.Type.BOOLEAN,
LanguageManager.getString("Modifier.Homing.PCO_enabled"), true);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void reload() {

private PlayerConfigurationOption NOTIFY_WHEN_ACTIVE =
new PlayerConfigurationOption(this, "notify-when-active", PlayerConfigurationOption.Type.BOOLEAN,
"notify-when-active", false);
LanguageManager.getString("Modifier.Photosynthesis.PCO_notify_when_active"), false);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import de.flo56958.minetinker.modifiers.PlayerConfigurableModifier;
import de.flo56958.minetinker.utils.ChatWriter;
import de.flo56958.minetinker.utils.ConfigurationManager;
import de.flo56958.minetinker.utils.LanguageManager;
import de.flo56958.minetinker.utils.PlayerInfo;
import de.flo56958.minetinker.utils.data.DataHandler;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationManager;
Expand Down Expand Up @@ -117,7 +118,7 @@ public void reload() {
blacklist.addAll(blacklistConfig.stream().map(Material::getMaterial).toList());

CLAMP_LEVEL = new PlayerConfigurationOption(this, "clamp-to-level", PlayerConfigurationOption.Type.INTEGER,
"clamp-to-level", this.getMaxLvl());
LanguageManager.getString("Modifier.Power.PCO_clamp_level"), this.getMaxLvl());
}

@SuppressWarnings("BooleanMethodIsAlwaysInverted")
Expand Down Expand Up @@ -384,7 +385,7 @@ private void powerBlockBreak(@Nullable final Block block, final float centralBlo

private PlayerConfigurationOption LEVEL_1_VERTICAL =
new PlayerConfigurationOption(this, "level-1-vertical", PlayerConfigurationOption.Type.BOOLEAN,
"level-1-vertical", false);
LanguageManager.getString("Modifier.Power.PCO_level_1_vertical"), false);

private PlayerConfigurationOption CLAMP_LEVEL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.flo56958.minetinker.modifiers.CooldownModifier;
import de.flo56958.minetinker.utils.ChatWriter;
import de.flo56958.minetinker.utils.ConfigurationManager;
import de.flo56958.minetinker.utils.LanguageManager;
import de.flo56958.minetinker.utils.data.DataHandler;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationManager;
import de.flo56958.minetinker.utils.playerconfig.PlayerConfigurationOption;
Expand Down Expand Up @@ -153,11 +154,11 @@ public void onElytraSneak(final PlayerToggleSneakEvent event) {

private final PlayerConfigurationOption PARTICLES =
new PlayerConfigurationOption(this,"particles", PlayerConfigurationOption.Type.BOOLEAN,
"particles", true);
LanguageManager.getString("Modifier.Propelling.PCO_particle"), true);

private final PlayerConfigurationOption SOUND =
new PlayerConfigurationOption(this,"sound", PlayerConfigurationOption.Type.BOOLEAN,
"sound", true);
LanguageManager.getString("Modifier.Propelling.PCO_sound"), true);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public List<String> getStatistics(ItemStack item) {

private final PlayerConfigurationOption PLANT_SAMPLINGS =
new PlayerConfigurationOption(this, "plant-samplings", PlayerConfigurationOption.Type.BOOLEAN,
"plant-saplings", true);
LanguageManager.getString("Modifier.Timber.PCO_plant_sapling"), true);

@Override
public List<PlayerConfigurationOption> getPCIOptions() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package de.flo56958.minetinker.utils.playerconfig;

import de.flo56958.minetinker.utils.LanguageManager;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;

Expand All @@ -13,10 +14,10 @@ public class GeneralPCOptions implements PlayerConfigurationInterface {

public final PlayerConfigurationOption ACTIONBAR_MESSAGES =
new PlayerConfigurationOption(this, "actionbar-messages", PlayerConfigurationOption.Type.BOOLEAN,
"Actionbar Messages", true);
LanguageManager.getString("PCO_ActionBar_Messages"), true);
public final PlayerConfigurationOption ACTIONBAR_ON_EXP_GAIN =
new PlayerConfigurationOption(this, "actionbar-on-exp-gain", PlayerConfigurationOption.Type.BOOLEAN,
"Actionbar on EXP Gain", false);
LanguageManager.getString("PCO_ActionBar_ExpGain"), false);

@Override
public String getPCIKey() {
Expand Down
15 changes: 15 additions & 0 deletions src/main/resources/lang/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ ModifierFailCause.ToolLevelToLow: "Tool not enough leveled!"
GrindStone.PossibleSlotsAfterGrind: "Possible free Slots after grind: %amount"

ActionBar.ExpGain: "%amount exp gained!"
PCO_ActionBar_Messages: "Allow actionbar messages from the plugin"
PCO_ActionBar_ExpGain: "Show experience gain of items in the actionbar"

LanguageManager.LoadedLanguage: "LanguageManager loaded %lang successfully!"

Expand Down Expand Up @@ -171,12 +173,17 @@ Modifier:
Description: "Right-clicking a block places the same block next to it if you have it in your inventory!"
ModifierItemName: "Builder's Block"
DescriptionModifierItem: "Modifier-Item for the Building-Modifier"
PCO_solve_player_overlap: "Solve for player overlap when placing blocks"
Channeling:
Name: "Channeling"
Description: "Summon lightning with a chance of %amount per level!"
Description_OnlyStorms: "This only works during thunderstorms!"
ModifierItemName: "Lightning Infused Shard"
DescriptionModifierItem: "Modifier-Item for the Channeling-Modifier"
Cooldown:
PCO_off_cooldown_alert: "Send a sound alert when the modifier is off cooldown"
PCO_off_cooldown_note: "The note to play when the modifier is off cooldown (from 0 to 24)"
PCO_off_cooldown_instrument: "The instrument to play when the modifier is off cooldown (from 0 to 24)"
Dense:
Name: "Dense"
Description: "Increases damage dealt per block fallen before the melee attack!"
Expand Down Expand Up @@ -207,6 +214,7 @@ Modifier:
Statistic_Used: "Endermen impersonated: %amount"
Statistic_Distance: "Total Distance skipped: %amount Blocks"
Statistic_Swapped: "Amount of Entities swapped: %amount"
PCO_require_sneaking: "Require sneaking to teleport"
Evasive:
Name: "Evasive"
Description: "Chance to dodge incoming attacks (%chance per Level) - %sneakX when sneaking, %sprintX when sprinting, %pvpX when in PvP"
Expand Down Expand Up @@ -263,6 +271,7 @@ Modifier:
Description: "Arrows home to targets in a %radius Block Radius! Higher Levels increase accuracy."
ModifierItemName: "Ballistics Processor"
DescriptionModifierItem: "Modifier-Item for the Homing-Modifier"
PCO_enabled: "Enabled"
Infinity:
Name: "Infinity"
Description: "You only need one arrow to shoot a bow and the trident comes back to you!"
Expand Down Expand Up @@ -335,6 +344,7 @@ Modifier:
DescriptionModifierItem: "Modifier-Item for the Photosynthesis-Modifier"
NotifyWhenActive: "Photosynthesis active..."
Statistic_Healed: "Total Durability Restored: %amount"
PCO_notify_when_active: "Notify when the modifier is active in the actionbar"
Piercing:
Name: "Piercing"
Description: "Arrows pass through multiple enemies and melee hit penetrate armor!"
Expand All @@ -350,11 +360,15 @@ Modifier:
Description: "Destroy more blocks per swing with your tool!"
ModifierItemName: "Enchanted Emerald"
DescriptionModifierItem: "Modifier-Item for the Power-Modifier"
PCO_level_1_vertical: "Apply the effect vertically on level 1"
PCO_clamp_level: "Clamp the modifier to a certain level"
Propelling:
Name: "Propelling"
Description: "Propel yourself through the air with sneaking while gliding with the elytra, standing in water with the trident or attacking from above while falling with a melee weapon!"
ModifierItemName: "Enchanted Fireworkstar"
DescriptionModifierItem: "Modifier-Item for the Propelling-Modifier"
PCO_particle: "Show particles when using the modifier"
PCO_sound: "Play a sound when using the modifier"
Protecting:
Name: "Protecting"
Description: "Your armor protects you better against damage!"
Expand Down Expand Up @@ -459,6 +473,7 @@ Modifier:
ModifierItemName: "Wooden Emerald"
DescriptionModifierItem: "Modifier-Item for the Timber-Modifier"
Statistic_Used: "Trees chopped: %amount"
PCO_plant_sapling: "Plant a sapling after chopping a tree"
Mutating:
Name: "Mutating"
Description: "Increases the chance by %chance% per level to get %amount random modifier on an item level up!"
Expand Down

0 comments on commit 67c2d0c

Please sign in to comment.