Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
BGHDDevelopment committed Dec 18, 2021
1 parent 74d1b9c commit 1d1b435
Show file tree
Hide file tree
Showing 32 changed files with 1,148 additions and 1,072 deletions.
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Released under MIT License

Copyright (c) 2021 BGHDDevelopment LLC ([email protected]).
Copyright (c) 2021 Contributors.
Copyright (c) 2022 BGHDDevelopment LLC ([email protected]).
Copyright (c) 2022 Contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ When using LuckPerms4 just drag and drop the resource into the plugins folder. I

If you are a developer, you can fork this project to make a custom version for your server!


## Contributing
Pull requests are welcome. For major changes, please open an issue or contact us on [Discord](https://bghddevelopment.com/discord) first to discuss what you would like to change.

Please make sure to test changes as appropriate.

To view user's suggestions check out our [Feedback](https://feedback.bghddevelopment.com) website!

## License
License information can be found in the [LICENSE.md](LICENSE.md) file.


Any questions regarding this license can be asked on [Discord](https://bghddevelopment.com/discord) or messaged directly to [[email protected]](mailto:[email protected]).
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.15.0</version>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,55 @@
* If you have any questions please email ceo@bghddevelopment or reach us on Discord
*/

package me.AsVaidas.LuckPemsGUI;
package com.bghddevelopment.LuckPemsGUI;

import java.io.File;
import java.io.IOException;
import me.AsVaidas.LuckPemsGUI.commands.LPGUICommand;
import me.AsVaidas.LuckPemsGUI.events.Events;
import me.AsVaidas.LuckPemsGUI.util.Metrics;
import me.AsVaidas.LuckPemsGUI.util.updatechecker.JoinEvents;
import me.AsVaidas.LuckPemsGUI.util.updatechecker.UpdateChecker;
import me.AsVaidas.LuckPemsGUI.util.Logger;
import me.AsVaidas.LuckPemsGUI.util.Settings;

import com.bghddevelopment.LuckPemsGUI.events.Events;
import com.bghddevelopment.LuckPemsGUI.util.updatechecker.UpdateChecker;
import lombok.Getter;
import com.bghddevelopment.LuckPemsGUI.commands.LPGUICommand;
import com.bghddevelopment.LuckPemsGUI.util.Metrics;
import com.bghddevelopment.LuckPemsGUI.util.updatechecker.JoinEvents;
import com.bghddevelopment.LuckPemsGUI.util.Logger;
import org.bukkit.Bukkit;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import me.AsVaidas.LuckPemsGUI.groups.EditGroup;
import me.AsVaidas.LuckPemsGUI.groups.GroupsGUI;
import me.AsVaidas.LuckPemsGUI.groups.Parents;
import me.AsVaidas.LuckPemsGUI.groups.Permissions;
import me.AsVaidas.LuckPemsGUI.groups.Prefix;
import me.AsVaidas.LuckPemsGUI.groups.Suffix;
import me.AsVaidas.LuckPemsGUI.tracks.EditTrack;
import me.AsVaidas.LuckPemsGUI.tracks.TracksGUI;
import me.AsVaidas.LuckPemsGUI.users.EditUser;
import me.AsVaidas.LuckPemsGUI.users.UsersGUI;
import me.AsVaidas.LuckPemsGUI.users.Wipe;
import com.bghddevelopment.LuckPemsGUI.groups.EditGroup;
import com.bghddevelopment.LuckPemsGUI.groups.GroupsGUI;
import com.bghddevelopment.LuckPemsGUI.groups.Parents;
import com.bghddevelopment.LuckPemsGUI.groups.Permissions;
import com.bghddevelopment.LuckPemsGUI.groups.Prefix;
import com.bghddevelopment.LuckPemsGUI.groups.Suffix;
import com.bghddevelopment.LuckPemsGUI.tracks.EditTrack;
import com.bghddevelopment.LuckPemsGUI.tracks.TracksGUI;
import com.bghddevelopment.LuckPemsGUI.users.EditUser;
import com.bghddevelopment.LuckPemsGUI.users.UsersGUI;
import com.bghddevelopment.LuckPemsGUI.users.Wipe;

public class Main extends JavaPlugin {
@Getter
public class LuckPermsGUI extends JavaPlugin {

@Getter
private static Plugin instance;
private UpdateChecker checker;
public static Main plugin;
public static LuckPermsGUI plugin;

@Override
public void onEnable() {
this.createFiles();
createFiles();
if (getConfig().getBoolean("SilentStart.Enabled")) {
instance = this;
plugin = this;
Metrics metrics = new Metrics(this, 5970);
new Metrics(this, 5970);
registerEvents();
registerCommands();
this.setEnabled(true);
Logger.log(Logger.LogLevel.SUCCESS, "LuckPermsGUI Version: " + Settings.VERSION + " Loaded.");
setEnabled(true);
Logger.log(Logger.LogLevel.SUCCESS, "LuckPermsGUI Version: " + getDescription().getVersion() + " Loaded.");
if (getConfig().getBoolean("CheckForUpdates.Enabled")) {
new UpdateChecker(this, 53460).getLatestVersion(version -> {
if (this.getDescription().getVersion().equalsIgnoreCase(version)) {
Expand All @@ -58,8 +61,8 @@ public void onEnable() {
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
Logger.log(Logger.LogLevel.WARNING, ("LuckPermsGUI is outdated!"));
Logger.log(Logger.LogLevel.WARNING, ("Newest version: " + version));
Logger.log(Logger.LogLevel.WARNING, ("Your version: " + Settings.VERSION));
Logger.log(Logger.LogLevel.WARNING, ("Please Update Here: " + Settings.PLUGIN_URL));
Logger.log(Logger.LogLevel.WARNING, ("Your version: " + getDescription().getVersion()));
Logger.log(Logger.LogLevel.WARNING, ("Please Update Here: https://spigotmc.org/resources/53460"));
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
}
});
Expand All @@ -68,13 +71,11 @@ public void onEnable() {
} else {
instance = this;
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
Logger.log(Logger.LogLevel.INFO, "Initializing LuckPermsGUI Version: " + Settings.VERSION);
Logger.log(Logger.LogLevel.INFO, "Created by: " + Settings.DEVELOPER_NAME);
Logger.log(Logger.LogLevel.INFO, "Website: " + Settings.DEVELOPER_URL);
Logger.log(Logger.LogLevel.INFO, "Spigot: " + Settings.PLUGIN_URL);
Logger.log(Logger.LogLevel.INFO, "Support: " + Settings.SUPPORT_DISCORD_URL);
Logger.log(Logger.LogLevel.INFO, "Suggestions/Feedback: " + Settings.FEEDBACK);
Logger.log(Logger.LogLevel.INFO, "Wiki: " + Settings.WIKI);
Logger.log(Logger.LogLevel.INFO, "Initializing LuckPermsGUI Version: " + getDescription().getVersion());
Logger.log(Logger.LogLevel.INFO, "Created by: BGHDDevelopment LLC");
Logger.log(Logger.LogLevel.INFO, "Spigot: https://spigotmc.org/resources/53460");
Logger.log(Logger.LogLevel.INFO, "Support: https://bghddevelopment.com/discord");
Logger.log(Logger.LogLevel.INFO, "Wiki: https://luckpermsgui.bghddevelopment.com");
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
Logger.log(Logger.LogLevel.INFO, "Plugin Loading...");
Logger.log(Logger.LogLevel.INFO, "Registering Managers...");
Expand All @@ -90,7 +91,7 @@ public void onEnable() {
Logger.log(Logger.LogLevel.INFO, "Registering Config...");
this.createFiles();
Logger.log(Logger.LogLevel.INFO, "Config Registered!");
Logger.log(Logger.LogLevel.SUCCESS, "LuckPermsGUI Version: " + Settings.VERSION + " Loaded.");
Logger.log(Logger.LogLevel.SUCCESS, "LuckPermsGUI Version: " + getDescription().getVersion() + " Loaded.");
this.setEnabled(true);
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
Logger.log(Logger.LogLevel.INFO, "Checking for updates...");
Expand All @@ -101,8 +102,8 @@ public void onEnable() {
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
Logger.log(Logger.LogLevel.WARNING, ("LuckPermsGUI is outdated!"));
Logger.log(Logger.LogLevel.WARNING, ("Newest version: " + version));
Logger.log(Logger.LogLevel.WARNING, ("Your version: " + Settings.VERSION));
Logger.log(Logger.LogLevel.WARNING, ("Please Update Here: " + Settings.PLUGIN_URL));
Logger.log(Logger.LogLevel.WARNING, ("Your version: " + getDescription().getVersion()));
Logger.log(Logger.LogLevel.WARNING, ("Please Update Here: https://spigotmc.org/resources/53460"));
Logger.log(Logger.LogLevel.OUTLINE, "*********************************************************************");
}
});
Expand All @@ -119,20 +120,20 @@ public void registerEvents() {
Bukkit.getServer().getPluginManager().registerEvents(new Suffix(), this);
Bukkit.getServer().getPluginManager().registerEvents(new UsersGUI(), this);
Bukkit.getServer().getPluginManager().registerEvents(new EditUser(), this);
Bukkit.getServer().getPluginManager().registerEvents(new me.AsVaidas.LuckPemsGUI.users.Permissions(), this);
Bukkit.getServer().getPluginManager().registerEvents(new me.AsVaidas.LuckPemsGUI.users.Parents(), this);
Bukkit.getServer().getPluginManager().registerEvents(new me.AsVaidas.LuckPemsGUI.users.Prefix(), this);
Bukkit.getServer().getPluginManager().registerEvents(new me.AsVaidas.LuckPemsGUI.users.Suffix(), this);
Bukkit.getServer().getPluginManager().registerEvents(new com.bghddevelopment.LuckPemsGUI.users.Permissions(), this);
Bukkit.getServer().getPluginManager().registerEvents(new com.bghddevelopment.LuckPemsGUI.users.Parents(), this);
Bukkit.getServer().getPluginManager().registerEvents(new com.bghddevelopment.LuckPemsGUI.users.Prefix(), this);
Bukkit.getServer().getPluginManager().registerEvents(new com.bghddevelopment.LuckPemsGUI.users.Suffix(), this);
Bukkit.getServer().getPluginManager().registerEvents(new Wipe(), this);
Bukkit.getServer().getPluginManager().registerEvents(new TracksGUI(), this);
Bukkit.getServer().getPluginManager().registerEvents(new EditTrack(), this);
Bukkit.getServer().getPluginManager().registerEvents(new Events(), this);
Bukkit.getServer().getPluginManager().registerEvents(new LPGUICommand(), this);

}

public void registerCommands() {
this.getCommand("lpgui").setExecutor(new LPGUICommand());

}

private File configf;
Expand All @@ -155,11 +156,4 @@ private void createFiles() {
e.printStackTrace();
}
}
public static Main getPlugin() {
return plugin;
}

public static Plugin getInstance() {
return instance;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* If you have any questions please email ceo@bghddevelopment or reach us on Discord
*/

package me.AsVaidas.LuckPemsGUI.commands;
package com.bghddevelopment.LuckPemsGUI.commands;

import me.AsVaidas.LuckPemsGUI.groups.EditGroup;
import me.AsVaidas.LuckPemsGUI.tracks.EditTrack;
import me.AsVaidas.LuckPemsGUI.users.EditUser;
import me.AsVaidas.LuckPemsGUI.util.OpenGUI;
import com.bghddevelopment.LuckPemsGUI.groups.EditGroup;
import com.bghddevelopment.LuckPemsGUI.tracks.EditTrack;
import com.bghddevelopment.LuckPemsGUI.users.EditUser;
import com.bghddevelopment.LuckPemsGUI.util.OpenGUI;
import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import net.luckperms.api.model.user.User;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* If you have any questions please email ceo@bghddevelopment or reach us on Discord
*/

package me.AsVaidas.LuckPemsGUI.events;
package com.bghddevelopment.LuckPemsGUI.events;

import me.AsVaidas.LuckPemsGUI.groups.GroupsGUI;
import me.AsVaidas.LuckPemsGUI.tracks.TracksGUI;
import me.AsVaidas.LuckPemsGUI.users.UsersGUI;
import com.bghddevelopment.LuckPemsGUI.groups.GroupsGUI;
import com.bghddevelopment.LuckPemsGUI.tracks.TracksGUI;
import com.bghddevelopment.LuckPemsGUI.users.UsersGUI;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* If you have any questions please email ceo@bghddevelopment or reach us on Discord
*/

package me.AsVaidas.LuckPemsGUI.groups;
package com.bghddevelopment.LuckPemsGUI.groups;

import java.util.Arrays;
import java.util.HashMap;
Expand All @@ -24,8 +24,8 @@
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;

import me.AsVaidas.LuckPemsGUI.Main;
import me.AsVaidas.LuckPemsGUI.Tools;
import com.bghddevelopment.LuckPemsGUI.LuckPermsGUI;
import com.bghddevelopment.LuckPemsGUI.util.Tools;

public class EditGroup implements Listener {

Expand All @@ -43,7 +43,7 @@ public void onsetWeight(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp group "+g.getName()+" setweight "+message);
setWeight.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
open(e.getPlayer(), g);
}, 5);
e.setCancelled(true);
Expand All @@ -57,7 +57,7 @@ public void onsetName(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp group "+g.getName()+" setdisplayname "+message);
setName.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
open(e.getPlayer(), g);
}, 5);
e.setCancelled(true);
Expand All @@ -71,7 +71,7 @@ public void onrename(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp group "+g.getName()+" rename "+message);
rename.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
open(e.getPlayer(), g);
}, 5);
e.setCancelled(true);
Expand All @@ -85,7 +85,7 @@ public void onclone(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp group "+g.getName()+" clone "+message);
clone.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
open(e.getPlayer(), l.getGroupManager().getGroup(message));
}, 5);
e.setCancelled(true);
Expand Down Expand Up @@ -366,7 +366,7 @@ else if (name.equals("Set weight")) {
p.closeInventory();
} else if (name.equals("Remove group")) {
Tools.sendCommand(p, "lp deletegroup "+g.getName());
Bukkit.getScheduler().runTaskLater(Main.getInstance(), () -> {
Bukkit.getScheduler().runTaskLater(LuckPermsGUI.getInstance(), () -> {
GroupsGUI.open(p);
}, 5);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* If you have any questions please email ceo@bghddevelopment or reach us on Discord
*/

package me.AsVaidas.LuckPemsGUI.groups;
package com.bghddevelopment.LuckPemsGUI.groups;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import me.AsVaidas.LuckPemsGUI.util.OpenGUI;
import com.bghddevelopment.LuckPemsGUI.util.OpenGUI;
import net.luckperms.api.LuckPerms;
import net.luckperms.api.LuckPermsProvider;
import net.luckperms.api.model.group.Group;
Expand All @@ -23,8 +23,8 @@
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import me.AsVaidas.LuckPemsGUI.Main;
import me.AsVaidas.LuckPemsGUI.Tools;
import com.bghddevelopment.LuckPemsGUI.LuckPermsGUI;
import com.bghddevelopment.LuckPemsGUI.util.Tools;

public class GroupsGUI implements Listener {

Expand All @@ -37,7 +37,7 @@ public void onGroupAdd(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp creategroup "+message);
newGroup.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
open(e.getPlayer());
}, 5);
e.setCancelled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* If you have any questions please email ceo@bghddevelopment or reach us on Discord
*/

package me.AsVaidas.LuckPemsGUI.groups;
package com.bghddevelopment.LuckPemsGUI.groups;

import java.util.Arrays;
import java.util.HashMap;
Expand All @@ -27,8 +27,8 @@
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import me.AsVaidas.LuckPemsGUI.Main;
import me.AsVaidas.LuckPemsGUI.Tools;
import com.bghddevelopment.LuckPemsGUI.LuckPermsGUI;
import com.bghddevelopment.LuckPemsGUI.util.Tools;

public class Parents implements Listener {

Expand All @@ -43,7 +43,7 @@ public void onaddParent(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp group "+g.getName()+" parent add "+message);
addParent.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
EditGroup.open(e.getPlayer(), g);
}, 5);
e.setCancelled(true);
Expand All @@ -57,7 +57,7 @@ public void onaddTempParent(AsyncPlayerChatEvent e) {

Tools.sendCommand(e.getPlayer(), "lp group "+g.getName()+" parent addtemp "+message);
addTempParent.remove(e.getPlayer());
Bukkit.getScheduler().scheduleSyncDelayedTask(Main.getInstance(), () -> {
Bukkit.getScheduler().scheduleSyncDelayedTask(LuckPermsGUI.getInstance(), () -> {
EditGroup.open(e.getPlayer(), g);
}, 5);
e.setCancelled(true);
Expand Down Expand Up @@ -177,7 +177,7 @@ public void onInventoryClickEvent(InventoryClickEvent e) {
current = Integer.parseInt(ChatColor.stripColor(inv.getItem(53).getItemMeta().getLore().get(1).split(" ")[1]));

int page = current;
Bukkit.getScheduler().runTaskLater(Main.getInstance(), () -> {
Bukkit.getScheduler().runTaskLater(LuckPermsGUI.getInstance(), () -> {
open(p, g, page);
}, 5);
}
Expand Down
Loading

0 comments on commit 1d1b435

Please sign in to comment.