From 196efad66568933436b9c18a6ff12eebd4deed16 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sat, 24 Jun 2017 13:34:15 -0400 Subject: [PATCH] unanonymous'd --- .../java/buttondevteam/presents/StaticMain.java | 17 ++++++----------- .../presents/hello/commands/HelloJSON.java | 12 ++++++------ .../presents/hello/pages/HelloJSONPage.java | 16 ++++++---------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/main/java/buttondevteam/presents/StaticMain.java b/src/main/java/buttondevteam/presents/StaticMain.java index 2209c18..2b8d7b3 100644 --- a/src/main/java/buttondevteam/presents/StaticMain.java +++ b/src/main/java/buttondevteam/presents/StaticMain.java @@ -5,20 +5,15 @@ import com.google.gson.GsonBuilder; public class StaticMain { public static void main(String[] args){ - - - - - @SuppressWarnings("unused") - class output{ - String ali = "pls"; - String iie = "whaddap"; - String norbipeti = "¯\\_(ツ)_/¯"; - } - GsonBuilder builder = new GsonBuilder(); Gson gson = builder.create(); System.out.println(gson.toJson(new output())); } + static class output{ + public String ali = "pls"; + public String iie = "whaddap"; + public String norbipeti = "¯\\_(ツ)_/¯"; + } + } diff --git a/src/main/java/buttondevteam/presents/hello/commands/HelloJSON.java b/src/main/java/buttondevteam/presents/hello/commands/HelloJSON.java index e4cc8f1..502c0ba 100644 --- a/src/main/java/buttondevteam/presents/hello/commands/HelloJSON.java +++ b/src/main/java/buttondevteam/presents/hello/commands/HelloJSON.java @@ -15,12 +15,7 @@ public class HelloJSON extends ModCommand{ @Override public boolean OnCommand(Player player, String alias, String[] args) { - @SuppressWarnings("unused") - class output{ - String ali = "pls"; - String iie = "whaddap"; - String norbipeti = "¯\\_(ツ)_/¯"; - } + GsonBuilder builder = new GsonBuilder(); Gson gson = builder.create(); @@ -28,5 +23,10 @@ public class HelloJSON extends ModCommand{ player.sendMessage(gson.toJson(new output())); return true; } + class output{ + String ali = "pls"; + String iie = "whaddap"; + String norbipeti = "¯\\_(ツ)_/¯"; + } } diff --git a/src/main/java/buttondevteam/presents/hello/pages/HelloJSONPage.java b/src/main/java/buttondevteam/presents/hello/pages/HelloJSONPage.java index 9f7532c..9e845cd 100644 --- a/src/main/java/buttondevteam/presents/hello/pages/HelloJSONPage.java +++ b/src/main/java/buttondevteam/presents/hello/pages/HelloJSONPage.java @@ -18,20 +18,16 @@ public class HelloJSONPage extends Page { public Response handlePage(HttpExchange exchange) { return new Response(200, getResponseString(), exchange); } - + class output{ + String ali = "pls"; + String iie = "whaddap"; + String norbipeti = "¯\\_(ツ)_/¯"; + } private String getResponseString() { - - @SuppressWarnings("unused") - class output{ - String ali = "pls"; - String iie = "whaddap"; - String norbipeti = "¯\\_(ツ)_/¯"; - } - GsonBuilder builder = new GsonBuilder(); Gson gson = builder.create(); - return gson.toJson(new output()); } + }