Skip to content

Commit

Permalink
Merge pull request #34 from murl-digital/development
Browse files Browse the repository at this point in the history
1.1.4
  • Loading branch information
murl-digital authored Mar 24, 2021
2 parents d75870f + 7b702b2 commit 770d17d
Show file tree
Hide file tree
Showing 248 changed files with 1,055 additions and 1,104 deletions.
12 changes: 12 additions & 0 deletions .idea/aurora.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 1 addition & 18 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions .idea/libraries-with-intellij-classes.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ repositories {
}

dependencies {
compileOnly 'org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot-api:1.16.4-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT'
compileOnly 'com.comphenix.protocol:ProtocolLib:4.5.0'
compileOnly 'io.netty:netty-all:4.1.29.Final'
compileOnly 'org.jetbrains:annotations:19.0.0'
Expand All @@ -27,8 +27,6 @@ dependencies {
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'org.reflections:reflections:0.9.12'
implementation 'com.google.guava:guava:29.0-jre'

implementation 'com.squareup.okhttp3:okhttp:4.7.2'
}

import org.apache.tools.ant.filters.ReplaceTokens
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pluginGroup=fyi.sorenneedscoffee
pluginVersion=1.1.3
pluginGroup=digital.murl
pluginVersion=1.1.4
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
package fyi.sorenneedscoffee.aurora;
package digital.murl.aurora;

import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.*;
import com.sun.net.httpserver.HttpServer;
import fyi.sorenneedscoffee.aurora.annotations.StaticAction;
import fyi.sorenneedscoffee.aurora.annotations.StaticEffect;
import fyi.sorenneedscoffee.aurora.annotations.StaticModel;
import fyi.sorenneedscoffee.aurora.commands.EffectCmd;
import fyi.sorenneedscoffee.aurora.commands.PointCmd;
import fyi.sorenneedscoffee.aurora.http.Endpoint;
import fyi.sorenneedscoffee.aurora.http.RestHandler;
import fyi.sorenneedscoffee.aurora.managers.EffectManager;
import fyi.sorenneedscoffee.aurora.points.DataContext;
import fyi.sorenneedscoffee.aurora.points.PointUtil;
import digital.murl.aurora.annotations.StaticAction;
import digital.murl.aurora.annotations.StaticEffect;
import digital.murl.aurora.annotations.StaticModel;
import digital.murl.aurora.commands.EffectCmd;
import digital.murl.aurora.commands.PointCmd;
import digital.murl.aurora.http.Endpoint;
import digital.murl.aurora.http.RestHandler;
import digital.murl.aurora.managers.EffectManager;
import digital.murl.aurora.points.DataContext;
import digital.murl.aurora.points.PointUtil;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import org.reflections.Reflections;
import org.reflections.scanners.MethodAnnotationsScanner;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.scanners.TypeAnnotationsScanner;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
Expand All @@ -33,23 +37,9 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Logger;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.java.JavaPlugin;
import org.reflections.Reflections;
import org.reflections.scanners.MethodAnnotationsScanner;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.scanners.TypeAnnotationsScanner;

public final class Aurora extends JavaPlugin {

private static final OkHttpClient client = new OkHttpClient();

public static Aurora plugin;
public static Logger logger;
public static FileConfiguration config;
Expand Down Expand Up @@ -81,7 +71,7 @@ public void onEnable() {
dataContext = new DataContext(plugin);
pointUtil = new PointUtil().load();

Reflections reflections = new Reflections("fyi.sorenneedscoffee.aurora.http",
Reflections reflections = new Reflections("digital.murl.aurora.http",
new TypeAnnotationsScanner(),
new MethodAnnotationsScanner(),
new SubTypesScanner()
Expand Down Expand Up @@ -116,25 +106,6 @@ public void onEnable() {
httpExecutor = Executors.newCachedThreadPool();
httpServer.setExecutor(httpExecutor);
httpServer.start();

if (config.getBoolean("remote.solarflare.enabled")) {
logger.info("Registering with SolarFlare...");
String host =
Objects.equals(config.getString("remote.solarflare.providedHostname"), "auto") ? base
.getHost()
: config.getString("remote.solarflare.providedHostname") + ":" + base.getPort();

JsonObject object = new JsonObject();
object.addProperty("privateAddress", host);

RequestBody body = RequestBody
.create(object.getAsString(), MediaType.parse(object.getAsString()));
Request request = new Request.Builder()
.url(Objects.requireNonNull(config.getString("remote.solarflare.url")))
.post(body)
.build();
client.newCall(request).execute();
}
} catch (Exception e) {
logger.severe(ExceptionUtils.getMessage(e));
logger.severe(ExceptionUtils.getStackTrace(e));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fyi.sorenneedscoffee.aurora.annotations;
package digital.murl.aurora.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fyi.sorenneedscoffee.aurora.annotations;
package digital.murl.aurora.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fyi.sorenneedscoffee.aurora.annotations;
package digital.murl.aurora.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fyi.sorenneedscoffee.aurora.commands;
package digital.murl.aurora.commands;

import fyi.sorenneedscoffee.aurora.managers.EffectManager;
import digital.murl.aurora.managers.EffectManager;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package fyi.sorenneedscoffee.aurora.commands;
package digital.murl.aurora.commands;

import fyi.sorenneedscoffee.aurora.Aurora;
import fyi.sorenneedscoffee.aurora.points.Point;
import java.util.Arrays;
import digital.murl.aurora.Aurora;
import digital.murl.aurora.points.Point;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.Command;
Expand All @@ -11,6 +10,8 @@
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

import java.util.Arrays;

public class PointCmd implements CommandExecutor {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fyi.sorenneedscoffee.aurora.effects;
package digital.murl.aurora.effects;

public enum CacheBehavior {
DEFAULT, PERSIST, DISABLED
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fyi.sorenneedscoffee.aurora.effects;
package digital.murl.aurora.effects;

import fyi.sorenneedscoffee.aurora.Aurora;
import digital.murl.aurora.Aurora;
import org.bukkit.Bukkit;
import org.bukkit.plugin.IllegalPluginAccessException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fyi.sorenneedscoffee.aurora.effects;
package digital.murl.aurora.effects;

public enum EffectAction {
START, STOP, RESTART, TRIGGER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package fyi.sorenneedscoffee.aurora.effects;
package digital.murl.aurora.effects;

import com.google.common.base.Objects;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
package fyi.sorenneedscoffee.aurora.effects.bossbar;

import static org.bukkit.Bukkit.getServer;
package digital.murl.aurora.effects.bossbar;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.WrappedChatComponent;
import fyi.sorenneedscoffee.aurora.Aurora;
import fyi.sorenneedscoffee.aurora.effects.Effect;
import fyi.sorenneedscoffee.aurora.effects.EffectAction;
import fyi.sorenneedscoffee.aurora.wrapper.WrapperPlayServerBoss;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import digital.murl.aurora.Aurora;
import digital.murl.aurora.effects.Effect;
import digital.murl.aurora.effects.EffectAction;
import digital.murl.aurora.wrapper.WrapperPlayServerBoss;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.bukkit.Bukkit;
import org.bukkit.boss.BarColor;
Expand All @@ -24,6 +18,13 @@
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.Plugin;

import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

import static org.bukkit.Bukkit.getServer;

public class BossBarEffect extends Effect {

private final BossBarListener bossBarListener = new BossBarListener(Aurora.plugin, this);
Expand Down
Loading

0 comments on commit 770d17d

Please sign in to comment.