Browse Source

1.5.1

tags/1.5.1
Nazar Kalinowski 1 year ago
parent
commit
3b307ed290
20 changed files with 47 additions and 41 deletions
  1. +5
    -0
      CHANGELOG
  2. +2
    -2
      pom.xml
  3. +8
    -7
      src/main/java/dev/gwm/spongeplugin/cosmetics/Cosmetics.java
  4. +3
    -3
      src/main/java/dev/gwm/spongeplugin/cosmetics/command/HelpCommand.java
  5. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/command/ReloadCommand.java
  6. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/command/SaveCommand.java
  7. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/BlockHighlightCosmeticEffect.java
  8. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/CircleCosmeticEffect.java
  9. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/Figlet2dCosmeticEffect.java
  10. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/GlobeCosmeticEffect.java
  11. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/HelixCosmeticEffect.java
  12. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/Image2dCosmeticEffect.java
  13. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/Symbols2dCosmeticEffects.java
  14. +3
    -3
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/base/AbstractCosmeticEffect.java
  15. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/base/BaseCosmeticEffect.java
  16. +3
    -3
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/base/CosmeticEffect.java
  17. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/util/CosmeticsCommandUtils.java
  18. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/util/CosmeticsSuperObjectCategories.java
  19. +4
    -4
      src/main/java/dev/gwm/spongeplugin/cosmetics/util/CosmeticsUtils.java
  20. +1
    -1
      src/main/java/dev/gwm/spongeplugin/cosmetics/util/LocationLocatable.java

+ 5
- 0
CHANGELOG View File

@@ -1,3 +1,8 @@
VERSION 1.5.1
* Update to GWMLibrary 2.5.2
* Rename `utils` package to `util`
* Change default value for 'VERTICAL_PARTICLE_DISTANCE' from 0.4 to 0.2 in 'FIGLET2D', 'SYMBOLS2D' and 'IMAGE2D' Cosmetic Effects

VERSION 1.5
* Make final all classes of the Cosmetic Effects
* Rename 'FIGLET' Cosmetic Effect to 'FIGLET2D'


+ 2
- 2
pom.xml View File

@@ -6,7 +6,7 @@

<groupId>dev.gwm.spongeplugin</groupId>
<artifactId>cosmetics</artifactId>
<version>1.5</version>
<version>1.5.1</version>
<name>Cosmetics</name>
<packaging>jar</packaging>

@@ -33,7 +33,7 @@
<dependency>
<groupId>dev.gwm.spongeplugin</groupId>
<artifactId>library</artifactId>
<version>2.5.1</version>
<version>2.5.2</version>
<scope>provided</scope>
</dependency>
<dependency>


+ 8
- 7
src/main/java/dev/gwm/spongeplugin/cosmetics/Cosmetics.java View File

@@ -3,13 +3,14 @@ package dev.gwm.spongeplugin.cosmetics;
import com.google.inject.Inject;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.*;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.CosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsCommandUtils;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsSuperObjectCategories;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsCommandUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsSuperObjectCategories;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsUtils;
import dev.gwm.spongeplugin.library.event.SuperObjectCategoriesRegistrationEvent;
import dev.gwm.spongeplugin.library.event.SuperObjectIdentifiersRegistrationEvent;
import dev.gwm.spongeplugin.library.event.SuperObjectsRegistrationEvent;
import dev.gwm.spongeplugin.library.utils.*;
import dev.gwm.spongeplugin.library.util.*;
import dev.gwm.spongeplugin.library.util.service.SuperObjectService;
import ninja.leaping.configurate.ConfigurationNode;
import org.slf4j.Logger;
import org.spongepowered.api.Sponge;
@@ -32,7 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@Plugin(id = "cosmetics",
name = "Cosmetics",
version = "1.5",
version = "1.5.1",
description = "Fancy cosmetic effects",
authors = {"GWM"/* My contacts:
* E-Mail(nazark@tutanota.com),
@@ -43,7 +44,7 @@ import java.util.concurrent.atomic.AtomicInteger;
})
public class Cosmetics extends SpongePlugin {
public static final Version VERSION = new Version(null, 1, 5);
public static final Version VERSION = new Version(1, 5, 1);
private static Cosmetics instance = null;
@@ -207,7 +208,7 @@ public class Cosmetics extends SpongePlugin {
}
private void unloadCosmeticEffects() {
Sponge.getServiceManager().provide(SuperObjectsService.class).get().
Sponge.getServiceManager().provide(SuperObjectService.class).get().
shutdownCreatedSuperObjects(superObject -> superObject instanceof CosmeticEffect);
}


+ 3
- 3
src/main/java/dev/gwm/spongeplugin/cosmetics/command/HelpCommand.java View File

@@ -1,8 +1,8 @@
package dev.gwm.spongeplugin.cosmetics.command;

import dev.gwm.spongeplugin.cosmetics.Cosmetics;
import dev.gwm.spongeplugin.library.utils.Language;
import dev.gwm.spongeplugin.library.utils.Pair;
import dev.gwm.spongeplugin.library.util.Language;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
@@ -19,7 +19,7 @@ public class HelpCommand implements CommandExecutor {
@Override
public CommandResult execute(CommandSource source, CommandContext args) {
source.sendMessages(language.getTranslation("HELP_MESSAGE",
new Pair<>("VERSION", Cosmetics.VERSION.toString()),
new ImmutablePair<>("VERSION", Cosmetics.VERSION.toString()),
source));
return CommandResult.success();
}


+ 1
- 1
src/main/java/dev/gwm/spongeplugin/cosmetics/command/ReloadCommand.java View File

@@ -1,7 +1,7 @@
package dev.gwm.spongeplugin.cosmetics.command;

import dev.gwm.spongeplugin.cosmetics.Cosmetics;
import dev.gwm.spongeplugin.library.utils.Language;
import dev.gwm.spongeplugin.library.util.Language;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;


+ 1
- 1
src/main/java/dev/gwm/spongeplugin/cosmetics/command/SaveCommand.java View File

@@ -1,7 +1,7 @@
package dev.gwm.spongeplugin.cosmetics.command;

import dev.gwm.spongeplugin.cosmetics.Cosmetics;
import dev.gwm.spongeplugin.library.utils.Language;
import dev.gwm.spongeplugin.library.util.Language;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;


+ 1
- 1
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/BlockHighlightCosmeticEffect.java View File

@@ -2,7 +2,7 @@ package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.BaseCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;


+ 1
- 1
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/CircleCosmeticEffect.java View File

@@ -2,7 +2,7 @@ package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.BaseCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsUtils;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;


+ 2
- 2
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/Figlet2dCosmeticEffect.java View File

@@ -4,7 +4,7 @@ import com.flowpowered.math.vector.Vector3d;
import com.google.common.reflect.TypeToken;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.Abstract2dCosmeticEffect;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import dev.gwm.spongeplugin.library.util.GWMLibraryUtils;
import io.leego.banana.BananaUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.particle.ParticleEffect;
@@ -55,7 +55,7 @@ public final class Figlet2dCosmeticEffect extends Abstract2dCosmeticEffect {
if (horizontalParticleDistance < 0 || horizontalParticleDistance >= 360) {
throw new IllegalArgumentException("Horizontal Particle Distance is either equal to or greater than 360 or less than 0!");
}
verticalParticleDistance = verticalParticleDistanceNode.getDouble(0.4);
verticalParticleDistance = verticalParticleDistanceNode.getDouble(0.2);
if (verticalParticleDistance < 0 || verticalParticleDistance >= 360) {
throw new IllegalArgumentException("Vertical Particle Distance is either equal to or greater than 360 or less than 0!");
}


+ 1
- 1
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/GlobeCosmeticEffect.java View File

@@ -2,7 +2,7 @@ package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.BaseCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;


+ 1
- 1
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/HelixCosmeticEffect.java View File

@@ -2,7 +2,7 @@ package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.BaseCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;


+ 2
- 2
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/Image2dCosmeticEffect.java View File

@@ -3,7 +3,7 @@ package dev.gwm.spongeplugin.cosmetics.superobject.effect;
import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.Abstract2dCosmeticEffect;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import dev.gwm.spongeplugin.library.util.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOptions;
@@ -47,7 +47,7 @@ public final class Image2dCosmeticEffect extends Abstract2dCosmeticEffect {
if (horizontalParticleDistance < 0 || horizontalParticleDistance >= 360) {
throw new IllegalArgumentException("Horizontal Particle Distance is either equal to or greater than 360 or less than 0!");
}
verticalParticleDistance = verticalParticleDistanceNode.getDouble(0.4);
verticalParticleDistance = verticalParticleDistanceNode.getDouble(0.2);
if (verticalParticleDistance < 0 || verticalParticleDistance >= 360) {
throw new IllegalArgumentException("Vertical Particle Distance is either equal to or greater than 360 or less than 0!");
}


+ 2
- 2
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/Symbols2dCosmeticEffects.java View File

@@ -4,7 +4,7 @@ import com.flowpowered.math.vector.Vector3d;
import com.google.common.reflect.TypeToken;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.Abstract2dCosmeticEffect;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import dev.gwm.spongeplugin.library.util.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.particle.ParticleEffect;

@@ -51,7 +51,7 @@ public final class Symbols2dCosmeticEffects extends Abstract2dCosmeticEffect {
if (horizontalParticleDistance < 0 || horizontalParticleDistance >= 360) {
throw new IllegalArgumentException("Horizontal Particle Distance is either equal to or greater than 360 or less than 0!");
}
verticalParticleDistance = verticalParticleDistanceNode.getDouble(0.4);
verticalParticleDistance = verticalParticleDistanceNode.getDouble(0.2);
if (verticalParticleDistance < 0 || verticalParticleDistance >= 360) {
throw new IllegalArgumentException("Vertical Particle Distance is either equal to or greater than 360 or less than 0!");
}


+ 3
- 3
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/base/AbstractCosmeticEffect.java View File

@@ -1,11 +1,11 @@
package dev.gwm.spongeplugin.cosmetics.superobject.effect.base;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsSuperObjectCategories;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsSuperObjectCategories;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.superobject.AbstractSuperObject;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import dev.gwm.spongeplugin.library.utils.SuperObjectCategory;
import dev.gwm.spongeplugin.library.util.GWMLibraryUtils;
import dev.gwm.spongeplugin.library.util.SuperObjectCategory;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.world.Locatable;


+ 2
- 2
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/base/BaseCosmeticEffect.java View File

@@ -1,9 +1,9 @@
package dev.gwm.spongeplugin.cosmetics.superobject.effect.base;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsUtils;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import dev.gwm.spongeplugin.library.util.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOptions;


+ 3
- 3
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/base/CosmeticEffect.java View File

@@ -2,10 +2,10 @@ package dev.gwm.spongeplugin.cosmetics.superobject.effect.base;

import com.flowpowered.math.vector.Vector3d;
import dev.gwm.spongeplugin.cosmetics.Cosmetics;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsSuperObjectCategories;
import dev.gwm.spongeplugin.cosmetics.utils.LocationLocatable;
import dev.gwm.spongeplugin.cosmetics.util.CosmeticsSuperObjectCategories;
import dev.gwm.spongeplugin.cosmetics.util.LocationLocatable;
import dev.gwm.spongeplugin.library.superobject.SuperObject;
import dev.gwm.spongeplugin.library.utils.SuperObjectCategory;
import dev.gwm.spongeplugin.library.util.SuperObjectCategory;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.scheduler.Task;


src/main/java/dev/gwm/spongeplugin/cosmetics/utils/CosmeticsCommandUtils.java → src/main/java/dev/gwm/spongeplugin/cosmetics/util/CosmeticsCommandUtils.java View File

@@ -1,10 +1,10 @@
package dev.gwm.spongeplugin.cosmetics.utils;
package dev.gwm.spongeplugin.cosmetics.util;

import dev.gwm.spongeplugin.cosmetics.Cosmetics;
import dev.gwm.spongeplugin.cosmetics.command.HelpCommand;
import dev.gwm.spongeplugin.cosmetics.command.ReloadCommand;
import dev.gwm.spongeplugin.cosmetics.command.SaveCommand;
import dev.gwm.spongeplugin.library.utils.Language;
import dev.gwm.spongeplugin.library.util.Language;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.spec.CommandSpec;
import org.spongepowered.api.text.Text;

src/main/java/dev/gwm/spongeplugin/cosmetics/utils/CosmeticsSuperObjectCategories.java → src/main/java/dev/gwm/spongeplugin/cosmetics/util/CosmeticsSuperObjectCategories.java View File

@@ -1,7 +1,7 @@
package dev.gwm.spongeplugin.cosmetics.utils;
package dev.gwm.spongeplugin.cosmetics.util;

import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.CosmeticEffect;
import dev.gwm.spongeplugin.library.utils.SuperObjectCategory;
import dev.gwm.spongeplugin.library.util.SuperObjectCategory;

public final class CosmeticsSuperObjectCategories {


src/main/java/dev/gwm/spongeplugin/cosmetics/utils/CosmeticsUtils.java → src/main/java/dev/gwm/spongeplugin/cosmetics/util/CosmeticsUtils.java View File

@@ -1,9 +1,9 @@
package dev.gwm.spongeplugin.cosmetics.utils;
package dev.gwm.spongeplugin.cosmetics.util;

import dev.gwm.spongeplugin.cosmetics.Cosmetics;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.CosmeticEffect;
import dev.gwm.spongeplugin.library.utils.Config;
import dev.gwm.spongeplugin.library.utils.SuperObjectsService;
import dev.gwm.spongeplugin.library.util.Config;
import dev.gwm.spongeplugin.library.util.service.SuperObjectService;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.effect.particle.ParticleEffect;
@@ -25,7 +25,7 @@ public class CosmeticsUtils {
Config cosmeticEffectConfig = new Config(Cosmetics.getInstance(), file);
ConfigurationNode loadNode = cosmeticEffectConfig.getNode("LOAD");
if (force || loadNode.getBoolean(true)) {
CosmeticEffect cosmeticEffect = Sponge.getServiceManager().provide(SuperObjectsService.class).get().
CosmeticEffect cosmeticEffect = Sponge.getServiceManager().provide(SuperObjectService.class).get().
create(CosmeticsSuperObjectCategories.COSMETIC_EFFECT, cosmeticEffectConfig.getNode());
if (Cosmetics.getInstance().isLogLoadedEffects()) {
Cosmetics.getInstance().getLogger().

src/main/java/dev/gwm/spongeplugin/cosmetics/utils/LocationLocatable.java → src/main/java/dev/gwm/spongeplugin/cosmetics/util/LocationLocatable.java View File

@@ -1,4 +1,4 @@
package dev.gwm.spongeplugin.cosmetics.utils;
package dev.gwm.spongeplugin.cosmetics.util;

import org.spongepowered.api.world.Locatable;
import org.spongepowered.api.world.Location;

Loading…
Cancel
Save