Skip to content

Commit

Permalink
Finished version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NeagDolph committed Jul 6, 2023
1 parent 9ada161 commit b6ecbf0
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 4 deletions.
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Eclipse
.classpath
.project
.settings/

# Intellij
.idea/
*.iml
*.iws

# Mac
.DS_Store

# Maven
log/
target/

# Inclusions
!lib/**

# Compiled Files
*.class
bin/
build/
/bin1/
java/build/**

# Server files
/server/
buildtools/*
/bundler/
CraftBukkit/
/gradle/
/logs/
/out/
/.gradle/
/.idea/
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# GifCreator

A Spigot 1.19.4 GIF creation plugin utilizing the GIPHY API.

## What is GifCreator

GifCreator is a plugin you can use to create GIFs on maps in Minecraft. The plugin uses the [Giphy API](https://developers.giphy.com/) to retrieve GIFs using searches performed by users.

## Commands

* `/gif [search]` - Gets a GIF from GIPHY using the search term

## Permissions

* `gifcreator.gif` - Allows a user to run the `/gif` command

## Setup

> You will need a GIPHY API key. You can sign up for GIPHY and get one [here](https://developers.giphy.com/)
1. Download the JAR file.
2. Install the JAR file in the `plugins` folder of your server
3. Reload/Restart your server
4. Open the `config.yml` file in the `plugins/GifCreator` folder and put your GIPHY API key in the `giphyApiKey` field
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'SuperPlugin'
rootProject.name = 'GifCreator'
2 changes: 1 addition & 1 deletion src/main/java/dev/lemontree/gifcreator/util/Giphy.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public List<Gif> getGifSearch(String gifName) throws IOException {

String response = Network.getJson(urlString);

SearchJson jsonResponse = gson.fromJson(response.toString(), SearchJson.class);
SearchJson jsonResponse = gson.fromJson(response, SearchJson.class);

return List.of(jsonResponse.data());
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ main: dev.lemontree.gifcreator.GifCreator
api-version: '1.19'
commands:
gif:
description: Gives you a gif image map
usage: /gif <search>
description: Searches a GIF on GIPHY using a search term
usage: /gif [search]
permission: gifcreator.gif

0 comments on commit b6ecbf0

Please sign in to comment.