Async Bug fix

Fixed an async bug.
See #2
This commit is contained in:
Ryandw11 2019-07-07 16:55:49 -07:00
parent ee4968b309
commit 23261db702
8 changed files with 11 additions and 8 deletions

View File

@ -10,6 +10,6 @@
<classpathentry kind="lib" path="D:/Spigot Development Dependencies/Spigot 1.10/PlaceholderAPI (1).jar"/>
<classpathentry kind="lib" path="D:/Spigot Development Dependencies/1.12/AdvancedBan-2.1.4-RELEASE.jar"/>
<classpathentry kind="lib" path="D:/Spigot Development Dependencies/1.12/EssentialsX-2.0.1.jar"/>
<classpathentry kind="lib" path="D:/Spigot Development Dependencies/Spigot 1.14.0-Pre5/spigot-1.14-pre5.jar"/>
<classpathentry kind="lib" path="D:/Spigot Development Dependencies/Spigot 1.13.2/spigot-1.13.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,5 +1,5 @@
name: UltraChat
version: 2.3.1-Pre1
version: 2.3.2
main: me.ryandw11.ultrachat.UltraChat
author: Ryandw11
description: A chat formatting plugin.

View File

@ -46,7 +46,7 @@ import org.bukkit.plugin.java.JavaPlugin;
/**
* Main Class
* @author Ryandw11
* @version 2.3.1-Pre1
* @version 2.3.1
* Updated for 1.14.
* (Very few API methods here)
*/

View File

@ -16,7 +16,7 @@ public class GlobalChatEvent extends Event {
private boolean cancelled;
public GlobalChatEvent(Player p, String chat) {
super(true);
super(false);
player = p;
this.chat = chat;
}

View File

@ -6,9 +6,9 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Event class
* Event class -
* Async Event
* @author Ryandw11
*
*/
public class JsonChatEvent extends Event {
private static final HandlerList handlers = new HandlerList();

View File

@ -6,7 +6,8 @@ import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
/**
* Event class
* Event class -
* Async Event
* @author Ryandw11
*
*/

View File

@ -1,5 +1,6 @@
package me.ryandw11.ultrachat.formatting;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import me.clip.placeholderapi.PlaceholderAPI;
@ -25,6 +26,7 @@ public class PlayerFormatting {
world = PlaceholderAPI.setPlaceholders(p, ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("World.format")));
local = PlaceholderAPI.setPlaceholders(p, ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("Local.format")));
}
private String prefix;
private String suffix;
public String color;

View File

@ -171,7 +171,7 @@ public class ColorGUI_1_13_R2 implements CommandExecutor, Listener, ColorGUI{
@EventHandler
public void onInventoryClickEvent(InventoryClickEvent e){
if(!e.getInventory().getName().equalsIgnoreCase(Lang.COLOR_GUI.toString())) return;
if(!e.getInventory().getTitle().equalsIgnoreCase(Lang.COLOR_GUI.toString())) return;
Player p = (Player) e.getWhoClicked();
e.setCancelled(true);