v1.13.1 - Attempting to fix Gang saving/removal issues. Created new Async methods in GangService. Tapped into those in GangManager. Setup new create/disband events etc. See how this goes xD
This commit is contained in:
parent
8bffa11c12
commit
270bd381c5
56
pom.xml
56
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>dev.drawethree.xprison</groupId>
|
<groupId>dev.drawethree.xprison</groupId>
|
||||||
<artifactId>X-Prison</artifactId>
|
<artifactId>X-Prison</artifactId>
|
||||||
<version>1.12.16</version>
|
<version>1.13.1</version>
|
||||||
|
|
||||||
<name>XPrison Reloaded</name>
|
<name>XPrison Reloaded</name>
|
||||||
|
|
||||||
|
@ -27,6 +27,30 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>3.2.4</version> <!-- Make sure to use the latest version -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<relocations>
|
||||||
|
<relocation>
|
||||||
|
<pattern>org.codemc.worldguardwrapper</pattern>
|
||||||
|
<shadedPattern>dev.drawethree.xprison.utils.org.codemc.worldguardwrapper</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
<!-- Add other relocations here -->
|
||||||
|
</relocations>
|
||||||
|
<minimizeJar>true</minimizeJar>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
@ -85,14 +109,22 @@
|
||||||
<artifactId>mrl</artifactId>
|
<artifactId>mrl</artifactId>
|
||||||
<version>LATEST</version>
|
<version>LATEST</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/libs/plugins/MineResetLite.jar</systemPath>
|
<systemPath>${project.basedir}/src/main/libs/plugins/MineResetLite.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>internal</groupId>-->
|
||||||
|
<!-- <artifactId>mrl</artifactId>-->
|
||||||
|
<!-- <version>LATEST</version>-->
|
||||||
|
<!-- <scope>system</scope>-->
|
||||||
|
<!-- <systemPath>src\main\libs\plugins\MineResetLite.jar</systemPath>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>be.maximvdw</groupId>
|
<groupId>be.maximvdw</groupId>
|
||||||
<artifactId>MVdWPlaceholderAPI</artifactId>
|
<artifactId>MVdWPlaceholderAPI</artifactId>
|
||||||
<version>3.1.1-SNAPSHOT</version>
|
<version>3.1.1-SNAPSHOT</version>
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/libs/plugins/MVdWPlaceholderAPI.jar</systemPath>
|
<systemPath>${project.basedir}/src/main/libs/plugins/MVdWPlaceholderAPI.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.saicone.rtag</groupId>
|
<groupId>com.saicone.rtag</groupId>
|
||||||
|
@ -159,12 +191,30 @@
|
||||||
<artifactId>jfiglet</artifactId>
|
<artifactId>jfiglet</artifactId>
|
||||||
<version>0.0.9</version>
|
<version>0.0.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- JUnit Jupiter API for JUnit 5 tests -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>5.9.2</version>
|
<version>5.9.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JUnit Jupiter Engine -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-engine</artifactId>
|
||||||
|
<version>5.9.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JUnit Vintage Engine for running JUnit 3 and 4 tests -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.vintage</groupId>
|
||||||
|
<artifactId>junit-vintage-engine</artifactId>
|
||||||
|
<version>5.9.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public final class XPrisonEnchants implements XPrisonModule {
|
public final class XPrisonEnchants implements XPrisonModule {
|
||||||
|
|
||||||
|
|
||||||
public static final String MODULE_NAME = "Enchants";
|
public static final String MODULE_NAME = "Enchants";
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
package dev.drawethree.xprison.gangs.commands.impl;
|
||||||
|
|
||||||
|
import dev.drawethree.xprison.gangs.commands.GangCommand;
|
||||||
|
import dev.drawethree.xprison.gangs.commands.GangSubCommand;
|
||||||
|
import dev.drawethree.xprison.gangs.model.Gang;
|
||||||
|
import me.lucko.helper.utils.Players;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public final class GangSaveSubCommand extends GangSubCommand {
|
||||||
|
|
||||||
|
public GangSaveSubCommand(GangCommand command) {
|
||||||
|
super(command, "save", "savegang");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUsage() {
|
||||||
|
return ChatColor.RED + "/gang save";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean execute(CommandSender sender, List<String> args) {
|
||||||
|
if (sender instanceof Player) {
|
||||||
|
Player p = (Player) sender;
|
||||||
|
if (args.size() == 0) {
|
||||||
|
p.sendMessage(ChatColor.GREEN + "All Gangs Saved!");
|
||||||
|
return this.command.getPlugin().getGangsManager().saveGangs();
|
||||||
|
} else {
|
||||||
|
p.sendMessage(ChatColor.RED + "Invalid Usage! " + this.getUsage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canExecute(CommandSender sender) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getTabComplete() {
|
||||||
|
List<String> tabComplete = new ArrayList<>();
|
||||||
|
tabComplete.addAll(Players.all().stream().map(Player::getName).collect(Collectors.toList()));
|
||||||
|
tabComplete.addAll(this.command.getPlugin().getGangsManager().getAllGangs().stream().map(Gang::getName).collect(Collectors.toList()));
|
||||||
|
return tabComplete;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import org.bukkit.ChatColor;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
@ -64,6 +65,11 @@ public class GangsManager {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean saveGangs() {
|
||||||
|
saveDataOnDisable();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void saveDataOnDisable() {
|
private void saveDataOnDisable() {
|
||||||
for (Gang g : this.gangs.values()) {
|
for (Gang g : this.gangs.values()) {
|
||||||
this.plugin.getGangsService().updateGang(g);
|
this.plugin.getGangsService().updateGang(g);
|
||||||
|
@ -93,40 +99,69 @@ public class GangsManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public GangCreateResult createGang(String name, Player creator) {
|
public GangCreateResult createGang(String name, Player creator) {
|
||||||
|
|
||||||
if (this.getPlayerGang(creator).isPresent()) {
|
if (this.getPlayerGang(creator).isPresent()) {
|
||||||
PlayerUtils.sendMessage(creator, this.plugin.getConfig().getMessage("gang-cant-create"));
|
PlayerUtils.sendMessage(creator, this.plugin.getConfig().getMessage("gang-cant-create"));
|
||||||
return GangCreateResult.PLAYER_HAS_GANG;
|
return GangCreateResult.PLAYER_HAS_GANG;
|
||||||
}
|
}
|
||||||
|
|
||||||
GangNameCheckResult nameCheckResult = this.performNameCheck(name, creator);
|
GangNameCheckResult nameCheckResult = this.performNameCheck(name, creator);
|
||||||
|
|
||||||
if (nameCheckResult != GangNameCheckResult.SUCCESS) {
|
if (nameCheckResult != GangNameCheckResult.SUCCESS) {
|
||||||
return GangCreateResult.valueOf(nameCheckResult.name());
|
return GangCreateResult.valueOf(nameCheckResult.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
Gang g = new Gang(name, creator.getUniqueId());
|
Gang g = new Gang(name, creator.getUniqueId());
|
||||||
|
|
||||||
GangCreateEvent gangCreateEvent = new GangCreateEvent(creator, g);
|
GangCreateEvent gangCreateEvent = new GangCreateEvent(creator, g);
|
||||||
|
|
||||||
this.plugin.getCore().debug("Calling GangCreateEvent for gang " + g.getName() + ".", this.plugin);
|
|
||||||
|
|
||||||
Events.call(gangCreateEvent);
|
Events.call(gangCreateEvent);
|
||||||
|
|
||||||
if (gangCreateEvent.isCancelled()) {
|
if (gangCreateEvent.isCancelled()) {
|
||||||
this.plugin.getCore().debug("GangCreateEvent for gang " + g.getName() + " was cancelled.", this.plugin);
|
|
||||||
return GangCreateResult.EVENT_CANCELLED;
|
return GangCreateResult.EVENT_CANCELLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.gangs.put(g.getUuid(), g);
|
// Use the async version to create a gang
|
||||||
|
this.plugin.getGangsService().createGangAsync(g);
|
||||||
|
|
||||||
PlayerUtils.sendMessage(creator, this.plugin.getConfig().getMessage("gang-created").replace("%name%", TextUtils.applyColor(name)));
|
PlayerUtils.sendMessage(creator, this.plugin.getConfig().getMessage("gang-created").replace("%name%", TextUtils.applyColor(name)));
|
||||||
|
Players.all().forEach(player -> PlayerUtils.sendMessage(player, this.plugin.getConfig().getMessage("gang-create-broadcast").replace("%gang%", TextUtils.applyColor(g.getName())).replace("%player%", creator.getName())));
|
||||||
this.plugin.getGangsService().createGang(g);
|
|
||||||
Players.all().forEach(player1 -> PlayerUtils.sendMessage(player1, this.plugin.getConfig().getMessage("gang-create-broadcast").replace("%gang%", TextUtils.applyColor(g.getName())).replace("%player%", creator.getName())));
|
|
||||||
return GangCreateResult.SUCCESS;
|
return GangCreateResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// public GangCreateResult createGang(String name, Player creator) {
|
||||||
|
//
|
||||||
|
// if (this.getPlayerGang(creator).isPresent()) {
|
||||||
|
// PlayerUtils.sendMessage(creator, this.plugin.getConfig().getMessage("gang-cant-create"));
|
||||||
|
// return GangCreateResult.PLAYER_HAS_GANG;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// GangNameCheckResult nameCheckResult = this.performNameCheck(name, creator);
|
||||||
|
//
|
||||||
|
// if (nameCheckResult != GangNameCheckResult.SUCCESS) {
|
||||||
|
// return GangCreateResult.valueOf(nameCheckResult.name());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Gang g = new Gang(name, creator.getUniqueId());
|
||||||
|
//
|
||||||
|
// GangCreateEvent gangCreateEvent = new GangCreateEvent(creator, g);
|
||||||
|
//
|
||||||
|
// this.plugin.getCore().debug("Calling GangCreateEvent for gang " + g.getName() + ".", this.plugin);
|
||||||
|
//
|
||||||
|
// Events.call(gangCreateEvent);
|
||||||
|
//
|
||||||
|
// if (gangCreateEvent.isCancelled()) {
|
||||||
|
// this.plugin.getCore().debug("GangCreateEvent for gang " + g.getName() + " was cancelled.", this.plugin);
|
||||||
|
// return GangCreateResult.EVENT_CANCELLED;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// this.gangs.put(g.getUuid(), g);
|
||||||
|
//
|
||||||
|
// PlayerUtils.sendMessage(creator, this.plugin.getConfig().getMessage("gang-created").replace("%name%", TextUtils.applyColor(name)));
|
||||||
|
//
|
||||||
|
// this.plugin.getGangsService().createGang(g);
|
||||||
|
// Players.all().forEach(player1 -> PlayerUtils.sendMessage(player1, this.plugin.getConfig().getMessage("gang-create-broadcast").replace("%gang%", TextUtils.applyColor(g.getName())).replace("%player%", creator.getName())));
|
||||||
|
// return GangCreateResult.SUCCESS;
|
||||||
|
// }
|
||||||
|
|
||||||
private GangNameCheckResult performNameCheck(String name, CommandSender sender) {
|
private GangNameCheckResult performNameCheck(String name, CommandSender sender) {
|
||||||
GangNameCheckResult nameCheck = checkGangName(name);
|
GangNameCheckResult nameCheck = checkGangName(name);
|
||||||
|
|
||||||
|
@ -321,31 +356,54 @@ public class GangsManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disbandGang(Player player, Gang gang, boolean force) {
|
public void disbandGang(Player player, Gang gang, boolean force) {
|
||||||
|
|
||||||
if (!gang.isOwner(player) && !force) {
|
if (!gang.isOwner(player) && !force) {
|
||||||
PlayerUtils.sendMessage(player, this.plugin.getConfig().getMessage("gang-not-owner"));
|
PlayerUtils.sendMessage(player, this.plugin.getConfig().getMessage("gang-not-owner"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GangDisbandEvent gangDisbandEvent = new GangDisbandEvent(gang);
|
GangDisbandEvent gangDisbandEvent = new GangDisbandEvent(gang);
|
||||||
|
|
||||||
this.plugin.getCore().debug("Calling GangDisbandEvent for gang " + gang.getName() + ".", this.plugin);
|
|
||||||
|
|
||||||
Events.call(gangDisbandEvent);
|
Events.call(gangDisbandEvent);
|
||||||
|
|
||||||
if (gangDisbandEvent.isCancelled()) {
|
if (gangDisbandEvent.isCancelled()) {
|
||||||
this.plugin.getCore().debug("GangDisbandEvent for gang " + gang.getName() + " was cancelled.", this.plugin);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gang.disband();
|
gang.disband();
|
||||||
|
// Use the async version to delete a gang
|
||||||
|
this.plugin.getGangsService().deleteGangAsync(gang);
|
||||||
|
|
||||||
this.gangs.remove(gang.getUuid());
|
this.gangs.remove(gang.getUuid());
|
||||||
this.plugin.getGangsService().deleteGang(gang);
|
|
||||||
|
|
||||||
Players.all().forEach(player1 -> PlayerUtils.sendMessage(player1, this.plugin.getConfig().getMessage("gang-disband-broadcast").replace("%gang%", gang.getName()).replace("%player%", player.getName())));
|
Players.all().forEach(player1 -> PlayerUtils.sendMessage(player1, this.plugin.getConfig().getMessage("gang-disband-broadcast").replace("%gang%", gang.getName()).replace("%player%", player.getName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// public void disbandGang(Player player, Gang gang, boolean force) {
|
||||||
|
//
|
||||||
|
// if (!gang.isOwner(player) && !force) {
|
||||||
|
// PlayerUtils.sendMessage(player, this.plugin.getConfig().getMessage("gang-not-owner"));
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// GangDisbandEvent gangDisbandEvent = new GangDisbandEvent(gang);
|
||||||
|
//
|
||||||
|
// this.plugin.getCore().debug("Calling GangDisbandEvent for gang " + gang.getName() + ".", this.plugin);
|
||||||
|
//
|
||||||
|
// Events.call(gangDisbandEvent);
|
||||||
|
//
|
||||||
|
// if (gangDisbandEvent.isCancelled()) {
|
||||||
|
// this.plugin.getCore().debug("GangDisbandEvent for gang " + gang.getName() + " was cancelled.", this.plugin);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// gang.disband();
|
||||||
|
//
|
||||||
|
// this.gangs.remove(gang.getUuid());
|
||||||
|
// this.plugin.getGangsService().deleteGang(gang);
|
||||||
|
//
|
||||||
|
// Players.all().forEach(player1 -> PlayerUtils.sendMessage(player1, this.plugin.getConfig().getMessage("gang-disband-broadcast").replace("%gang%", gang.getName()).replace("%player%", player.getName())));
|
||||||
|
// }
|
||||||
|
|
||||||
public boolean acceptInvite(Player player, Gang gang) {
|
public boolean acceptInvite(Player player, Gang gang) {
|
||||||
|
|
||||||
if (!gang.hasPendingInvite(player)) {
|
if (!gang.hasPendingInvite(player)) {
|
||||||
|
|
|
@ -20,4 +20,7 @@ public interface GangsService {
|
||||||
void createGangInvitation(GangInvitation gangInvitation);
|
void createGangInvitation(GangInvitation gangInvitation);
|
||||||
|
|
||||||
void deleteGangInvitation(GangInvitation gangInvitation);
|
void deleteGangInvitation(GangInvitation gangInvitation);
|
||||||
|
|
||||||
|
void createGangAsync(Gang g);
|
||||||
|
void deleteGangAsync(Gang g);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package dev.drawethree.xprison.gangs.service.impl;
|
package dev.drawethree.xprison.gangs.service.impl;
|
||||||
|
|
||||||
|
import dev.drawethree.xprison.XPrison;
|
||||||
import dev.drawethree.xprison.gangs.model.Gang;
|
import dev.drawethree.xprison.gangs.model.Gang;
|
||||||
import dev.drawethree.xprison.gangs.model.GangInvitation;
|
import dev.drawethree.xprison.gangs.model.GangInvitation;
|
||||||
import dev.drawethree.xprison.gangs.repo.GangsRepository;
|
import dev.drawethree.xprison.gangs.repo.GangsRepository;
|
||||||
import dev.drawethree.xprison.gangs.service.GangsService;
|
import dev.drawethree.xprison.gangs.service.GangsService;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -30,6 +32,26 @@ public class GangsServiceImpl implements GangsService {
|
||||||
repository.createGang(g);
|
repository.createGang(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createGangAsync(Gang g) {
|
||||||
|
Bukkit.getScheduler().runTaskAsynchronously(XPrison.getInstance(), () -> {
|
||||||
|
try {
|
||||||
|
createGang(g); // Call the synchronous createGang method
|
||||||
|
} catch (Exception e) {
|
||||||
|
XPrison.getInstance().getLogger().warning("Failed to create gang: " + e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteGangAsync(Gang g) {
|
||||||
|
Bukkit.getScheduler().runTaskAsynchronously(XPrison.getInstance(), () -> {
|
||||||
|
try {
|
||||||
|
deleteGang(g); // Call the synchronous deleteGang method
|
||||||
|
} catch (Exception e) {
|
||||||
|
XPrison.getInstance().getLogger().warning("Failed to delete gang: " + e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Gang> getAllGangs() {
|
public List<Gang> getAllGangs() {
|
||||||
return repository.getAllGangs();
|
return repository.getAllGangs();
|
||||||
|
@ -50,3 +72,60 @@ public class GangsServiceImpl implements GangsService {
|
||||||
repository.deleteGangInvitation(gangInvitation);
|
repository.deleteGangInvitation(gangInvitation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//package dev.drawethree.xprison.gangs.service.impl;
|
||||||
|
//
|
||||||
|
//import dev.drawethree.xprison.gangs.model.Gang;
|
||||||
|
//import dev.drawethree.xprison.gangs.model.GangInvitation;
|
||||||
|
//import dev.drawethree.xprison.gangs.repo.GangsRepository;
|
||||||
|
//import dev.drawethree.xprison.gangs.service.GangsService;
|
||||||
|
//
|
||||||
|
//import java.util.List;
|
||||||
|
//
|
||||||
|
//public class GangsServiceImpl implements GangsService {
|
||||||
|
//
|
||||||
|
// private final GangsRepository repository;
|
||||||
|
//
|
||||||
|
// public GangsServiceImpl(GangsRepository repository) {
|
||||||
|
// this.repository = repository;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void updateGang(Gang g) {
|
||||||
|
// repository.updateGang(g);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void deleteGang(Gang g) {
|
||||||
|
// repository.deleteGang(g);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void createGang(Gang g) {
|
||||||
|
// repository.createGang(g);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public List<Gang> getAllGangs() {
|
||||||
|
// return repository.getAllGangs();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public List<GangInvitation> getGangInvitations(Gang gang) {
|
||||||
|
// return repository.getGangInvitations(gang);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void createGangInvitation(GangInvitation gangInvitation) {
|
||||||
|
// repository.createGangInvitation(gangInvitation);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public void deleteGangInvitation(GangInvitation gangInvitation) {
|
||||||
|
// repository.deleteGangInvitation(gangInvitation);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
package dev.drawethree.xprison.gems.commands;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import dev.drawethree.xprison.gems.managers.CommandManager;
|
||||||
|
import dev.drawethree.xprison.utils.player.PlayerUtils;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class GemsSaveCommand extends GemsCommand {
|
||||||
|
|
||||||
|
private static final String COMMAND_NAME = "savegems";
|
||||||
|
private static final String[] COMMAND_ALIASES = {"save"};
|
||||||
|
|
||||||
|
public GemsSaveCommand(CommandManager manager) {
|
||||||
|
super(manager, COMMAND_NAME, COMMAND_ALIASES);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean execute(CommandSender sender, ImmutableList<String> args) {
|
||||||
|
if (!sender.hasPermission("xprison.gems.save")) {
|
||||||
|
PlayerUtils.sendMessage(sender, "&cYou do not have permission to execute this command.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// If no arguments provided, save all player data
|
||||||
|
if (args.isEmpty()) {
|
||||||
|
this.commandManager.getPlugin().getGemsManager().saveAllPlayerData(true); // Assuming async saving is desired
|
||||||
|
PlayerUtils.sendMessage(sender, "&aGem data for all players has been successfully saved.");
|
||||||
|
} else {
|
||||||
|
// Save data for a specific player
|
||||||
|
String playerName = args.get(0);
|
||||||
|
Player targetPlayer = Bukkit.getPlayerExact(playerName);
|
||||||
|
|
||||||
|
if (targetPlayer == null) {
|
||||||
|
PlayerUtils.sendMessage(sender, "&cThe player '" + playerName + "' could not be found.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.commandManager.getPlugin().getGemsManager().saveData(targetPlayer);
|
||||||
|
PlayerUtils.sendMessage(sender, "&aGem data for " + playerName + " has been successfully saved.");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
PlayerUtils.sendMessage(sender, "&cError saving gem data. Please check the console for details.");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canExecute(CommandSender sender) {
|
||||||
|
// Implement logic to determine if the command can be executed by the sender, e.g., based on permissions
|
||||||
|
return sender.hasPermission("xprison.gems.save");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUsage() {
|
||||||
|
return "/gems savegems - Saves all player gem data.";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getTabComplete(List<String> args) {
|
||||||
|
// You can provide tab completion options here if relevant, otherwise return an empty list
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package dev.drawethree.xprison.gems.managers;
|
||||||
import dev.drawethree.xprison.gems.XPrisonGems;
|
import dev.drawethree.xprison.gems.XPrisonGems;
|
||||||
import dev.drawethree.xprison.gems.commands.*;
|
import dev.drawethree.xprison.gems.commands.*;
|
||||||
import dev.drawethree.xprison.utils.player.PlayerUtils;
|
import dev.drawethree.xprison.utils.player.PlayerUtils;
|
||||||
|
import dev.drawethree.xprison.gems.managers.GemsManager;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import me.lucko.helper.Commands;
|
import me.lucko.helper.Commands;
|
||||||
import me.lucko.helper.command.context.CommandContext;
|
import me.lucko.helper.command.context.CommandContext;
|
||||||
|
@ -33,6 +34,8 @@ public class CommandManager {
|
||||||
private String[] gemsTopCommandAliases;
|
private String[] gemsTopCommandAliases;
|
||||||
private String[] gemsMessageCommandAliases;
|
private String[] gemsMessageCommandAliases;
|
||||||
|
|
||||||
|
private GemsManager gemsManager;
|
||||||
|
|
||||||
public CommandManager(XPrisonGems plugin) {
|
public CommandManager(XPrisonGems plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.commands = new HashSet<>();
|
this.commands = new HashSet<>();
|
||||||
|
@ -57,6 +60,7 @@ public class CommandManager {
|
||||||
this.registerCommand(new GemsGiveCommand(this));
|
this.registerCommand(new GemsGiveCommand(this));
|
||||||
this.registerCommand(new GemsPayCommand(this));
|
this.registerCommand(new GemsPayCommand(this));
|
||||||
this.registerCommand(new GemsRemoveCommand(this));
|
this.registerCommand(new GemsRemoveCommand(this));
|
||||||
|
this.registerCommand(new GemsSaveCommand(this));
|
||||||
this.registerCommand(new GemsSetCommand(this));
|
this.registerCommand(new GemsSetCommand(this));
|
||||||
this.registerCommand(new GemsWithdrawCommand(this));
|
this.registerCommand(new GemsWithdrawCommand(this));
|
||||||
this.registerCommand(new GemsHelpCommand(this));
|
this.registerCommand(new GemsHelpCommand(this));
|
||||||
|
|
|
@ -99,6 +99,18 @@ public class GemsManager {
|
||||||
}, 1, TimeUnit.MINUTES, 1, TimeUnit.HOURS);
|
}, 1, TimeUnit.MINUTES, 1, TimeUnit.HOURS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void saveData(Player player) {
|
||||||
|
savePlayerData(player, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveAllPlayerData(boolean async) {
|
||||||
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
|
savePlayerData(player, false, async);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void savePlayerData(Player player, boolean removeFromCache, boolean async) {
|
private void savePlayerData(Player player, boolean removeFromCache, boolean async) {
|
||||||
if (async) {
|
if (async) {
|
||||||
Schedulers.async().run(() -> {
|
Schedulers.async().run(() -> {
|
||||||
|
@ -181,6 +193,7 @@ public class GemsManager {
|
||||||
|
|
||||||
if (!p.isOnline()) {
|
if (!p.isOnline()) {
|
||||||
Schedulers.async().run(() -> this.plugin.getGemsService().setGems(p, newAmount));
|
Schedulers.async().run(() -> this.plugin.getGemsService().setGems(p, newAmount));
|
||||||
|
saveData(p.getPlayer());
|
||||||
} else {
|
} else {
|
||||||
gemsCache.put(p.getUniqueId(), newAmount);
|
gemsCache.put(p.getUniqueId(), newAmount);
|
||||||
if (executor instanceof ConsoleCommandSender && !this.hasOffGemsMessages(p.getPlayer())) {
|
if (executor instanceof ConsoleCommandSender && !this.hasOffGemsMessages(p.getPlayer())) {
|
||||||
|
@ -194,6 +207,8 @@ public class GemsManager {
|
||||||
|
|
||||||
if (executor != null && !(executor instanceof ConsoleCommandSender)) {
|
if (executor != null && !(executor instanceof ConsoleCommandSender)) {
|
||||||
PlayerUtils.sendMessage(executor, plugin.getMessage("admin_give_gems").replace("%player%", p.getName()).replace("%gems%", String.format("%,d", finalAmount)));
|
PlayerUtils.sendMessage(executor, plugin.getMessage("admin_give_gems").replace("%player%", p.getName()).replace("%gems%", String.format("%,d", finalAmount)));
|
||||||
|
|
||||||
|
Players.all().forEach(e -> saveData(e));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,25 @@ public class XPrisonMVdWPlaceholder {
|
||||||
return optionalGang.map(gang -> this.plugin.getGangs().getConfig().getPlaceholder("gang-in-gang").replace("%gang%", gang.getName())).orElseGet(() -> this.plugin.getGangs().getConfig().getPlaceholder("gang-without"));
|
return optionalGang.map(gang -> this.plugin.getGangs().getConfig().getPlaceholder("gang-in-gang").replace("%gang%", gang.getName())).orElseGet(() -> this.plugin.getGangs().getConfig().getPlaceholder("gang-without"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
PlaceholderAPI.registerPlaceholder(plugin, "nvus_gang", event -> {
|
||||||
|
Optional<Gang> optionalGang = this.plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
||||||
|
return optionalGang.map(gang -> this.plugin.getGangs().getConfig().getPlaceholder("gang-in-gang").replace("%gang%", gang.getName())).orElseGet(() -> this.plugin.getGangs().getConfig().getPlaceholder("gang-without"));
|
||||||
|
});
|
||||||
|
|
||||||
|
PlaceholderAPI.registerPlaceholder(plugin, "nvus_gang_amt", event -> {
|
||||||
|
Optional<Gang> optionalGang = plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
||||||
|
// +1 because of leader
|
||||||
|
return optionalGang.map(gang -> String.valueOf(gang.getMembersOffline().size() + 1)).orElse("");
|
||||||
|
});
|
||||||
|
|
||||||
|
PlaceholderAPI.registerPlaceholder(plugin, "nvus_gang_leader", event -> {
|
||||||
|
Optional<Gang> optionalGang = plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
||||||
|
if (optionalGang.isPresent()) {
|
||||||
|
return optionalGang.get().getOwnerOffline().getName();
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
});
|
||||||
|
|
||||||
PlaceholderAPI.registerPlaceholder(plugin, "xprison_gang", event -> {
|
PlaceholderAPI.registerPlaceholder(plugin, "xprison_gang", event -> {
|
||||||
Optional<Gang> optionalGang = this.plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
Optional<Gang> optionalGang = this.plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
||||||
return optionalGang.map(gang -> this.plugin.getGangs().getConfig().getPlaceholder("gang-in-gang").replace("%gang%", gang.getName())).orElseGet(() -> this.plugin.getGangs().getConfig().getPlaceholder("gang-without"));
|
return optionalGang.map(gang -> this.plugin.getGangs().getConfig().getPlaceholder("gang-in-gang").replace("%gang%", gang.getName())).orElseGet(() -> this.plugin.getGangs().getConfig().getPlaceholder("gang-without"));
|
||||||
|
@ -131,6 +150,7 @@ public class XPrisonMVdWPlaceholder {
|
||||||
// +1 because of leader
|
// +1 because of leader
|
||||||
return optionalGang.map(gang -> String.valueOf(gang.getMembersOffline().size() + 1)).orElse("");
|
return optionalGang.map(gang -> String.valueOf(gang.getMembersOffline().size() + 1)).orElse("");
|
||||||
});
|
});
|
||||||
|
|
||||||
PlaceholderAPI.registerPlaceholder(plugin, "xprison_gang_members_online", event -> {
|
PlaceholderAPI.registerPlaceholder(plugin, "xprison_gang_members_online", event -> {
|
||||||
Optional<Gang> optionalGang = plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
Optional<Gang> optionalGang = plugin.getGangs().getGangsManager().getPlayerGang(event.getPlayer());
|
||||||
return optionalGang.map(gang -> String.valueOf(gang.getOnlinePlayers().size())).orElse("");
|
return optionalGang.map(gang -> String.valueOf(gang.getOnlinePlayers().size())).orElse("");
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
|
#===============================================================================
|
||||||
|
# TEAM NVus #
|
||||||
|
# www.FNGnation.com/discord #
|
||||||
|
# www.FNGnation.com #
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
# Should plugin show debug messages?
|
# Should plugin show debug messages?
|
||||||
debug-mode: false
|
debug-mode: false
|
||||||
|
#===============================================================================
|
||||||
|
# DATABASE CONFIGURATION #
|
||||||
|
# ==============================================================================
|
||||||
# Database type (SQLite, MySQL)
|
# Database type (SQLite, MySQL)
|
||||||
database_type: SQLite
|
database_type: SQLite
|
||||||
# MySQL connection details
|
# MySQL connection details
|
||||||
|
@ -21,7 +30,10 @@ connection_properties:
|
||||||
leak_detection_threshold: 0
|
leak_detection_threshold: 0
|
||||||
connection_test_query: "SELECT 1"
|
connection_test_query: "SELECT 1"
|
||||||
character_encoding: "utf8"
|
character_encoding: "utf8"
|
||||||
# Enabling / Disabling of specific modules
|
#===============================================================================
|
||||||
|
# MODULES CONFIGURATION #
|
||||||
|
# ==============================================================================
|
||||||
|
# Enabling / Disabling of specific modules
|
||||||
modules:
|
modules:
|
||||||
tokens: true
|
tokens: true
|
||||||
gems: true
|
gems: true
|
||||||
|
@ -41,16 +53,23 @@ item-migrator:
|
||||||
bind:
|
bind:
|
||||||
join: true
|
join: true
|
||||||
inventory: false
|
inventory: false
|
||||||
# List of supported pickaxes by UPC Enchants
|
#===============================================================================
|
||||||
|
# SUPPORTED PICKAXES FOR UPC ENCHANTS #
|
||||||
|
# ==============================================================================
|
||||||
|
# List of supported pickaxes by UPC Enchants
|
||||||
supported-pickaxes:
|
supported-pickaxes:
|
||||||
- DIAMOND_PICKAXE
|
- DIAMOND_PICKAXE
|
||||||
# Aliases for main command
|
#===============================================================================
|
||||||
|
# COMMAND CONFIGURATION #
|
||||||
|
# ==============================================================================
|
||||||
main-command-aliases:
|
main-command-aliases:
|
||||||
- xprison
|
- xprison
|
||||||
- prison
|
- prison
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
# MIT License
|
# ORIGINAL LICENSE #
|
||||||
|
# ==============================================================================
|
||||||
|
# MIT License
|
||||||
|
|
||||||
# Copyright (c) 2023 Bc. Ján Kluka
|
# Copyright (c) 2023 Bc. Ján Kluka
|
||||||
|
|
||||||
|
@ -70,4 +89,6 @@ main-command-aliases:
|
||||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
|
ConfigVersion: 1.0; # DO NOT CHANGE THIS VALUE! IT WILL BREAK THE PLUGIN!
|
|
@ -13,7 +13,7 @@ auto-miner-regions:
|
||||||
# Amount of blocks broken added to player every cycle
|
# Amount of blocks broken added to player every cycle
|
||||||
blocks-broken: 5
|
blocks-broken: 5
|
||||||
messages:
|
messages:
|
||||||
not_enough_tokens: "&e&lAUTOMINER &8» &cYou do not have enough tokens! (Needed: %tokens%)"
|
not_enough_tokens: "&e&lAUTOMINER &8» &cYou do not have enough tokens! (Needed: %tokens%)"
|
||||||
not_a_number: "&c%input% is not a number!"
|
not_a_number: "&c%input% is not a number!"
|
||||||
player_not_online: "&cPlayer &e%player% &cis not online!"
|
player_not_online: "&cPlayer &e%player% &cis not online!"
|
||||||
autominer_disabled: "&e&l(!) &7You've &c&lDISABLED &7AutoMiner."
|
autominer_disabled: "&e&l(!) &7You've &c&lDISABLED &7AutoMiner."
|
||||||
|
@ -21,6 +21,6 @@ messages:
|
||||||
auto_miner_enabled: "&aYou are now in &a&lAUTO-MINER &amode."
|
auto_miner_enabled: "&aYou are now in &a&lAUTO-MINER &amode."
|
||||||
auto_miner_disabled: "&cYou don't have &c&lAUTO-MINER &ctime."
|
auto_miner_disabled: "&cYou don't have &c&lAUTO-MINER &ctime."
|
||||||
auto_miner_no_pickaxe: "&cYou do not have any pickaxe equipped!"
|
auto_miner_no_pickaxe: "&cYou do not have any pickaxe equipped!"
|
||||||
auto_miner_time: "&e&lAUTOMINER &8» &7You have &f%time% of Auto-Miner time."
|
auto_miner_time: "&e&lAUTOMINER &8» &7You have &f%time% of Auto-Miner time."
|
||||||
auto_miner_time_add: "&e&lAUTOMINER &8» &7You added &f%time% %timeunit% &7to &f%player%&7."
|
auto_miner_time_add: "&e&lAUTOMINER &8» &7You added &f%time% %timeunit% &7to &f%player%&7."
|
||||||
auto_miner_time_remove: "&e&lAUTOMINER &8» &7You have removed &f%time% %timeunit% &7from &f%player%&7."
|
auto_miner_time_remove: "&e&lAUTOMINER &8» &7You have removed &f%time% %timeunit% &7from &f%player%&7."
|
|
@ -17,9 +17,9 @@ auto_sell_broadcast:
|
||||||
time: 60
|
time: 60
|
||||||
message:
|
message:
|
||||||
- "&e&m-------&f&m-------&e&m--------&f&m--------&e&m--------&f&m-------&e&m-------"
|
- "&e&m-------&f&m-------&e&m--------&f&m--------&e&m--------&f&m-------&e&m-------"
|
||||||
- " &8&l» &6&lAUTOSELL:"
|
- " &8&l» &6&lAUTOSELL:"
|
||||||
- " &8&l? &e&lMONEY MADE: &2$&a%money%"
|
- " &8&l➥ &e&lMONEY MADE: &2$&a%money%"
|
||||||
- " &8&l? &e&lITEMS SOLD: &f%items%"
|
- " &8&l➥ &e&lITEMS SOLD: &f%items%"
|
||||||
- "&e&m-------&f&m-------&e&m--------&f&m--------&e&m--------&f&m-------&e&m-------"
|
- "&e&m-------&f&m-------&e&m--------&f&m--------&e&m--------&f&m-------&e&m-------"
|
||||||
# Sellprices for each regions
|
# Sellprices for each regions
|
||||||
regions: { }
|
regions: { }
|
||||||
|
|
|
@ -3,7 +3,7 @@ block-rewards:
|
||||||
# Amount of blocks required
|
# Amount of blocks required
|
||||||
100:
|
100:
|
||||||
# Message to be sent
|
# Message to be sent
|
||||||
message: '&e&lBLOCKS &8» &7You have mined &f100&7 blocks.'
|
message: '&e&lBLOCKS &8» &7You have mined &f100&7 blocks.'
|
||||||
# Commands to give rewards
|
# Commands to give rewards
|
||||||
commands:
|
commands:
|
||||||
- tokens give %player% 1000
|
- tokens give %player% 1000
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
|
#===============================================================================
|
||||||
|
# TEAM NVus #
|
||||||
|
# www.FNGnation.com/discord #
|
||||||
|
# www.FNGnation.com #
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
# Should plugin show debug messages?
|
# Should plugin show debug messages?
|
||||||
debug-mode: false
|
debug-mode: false
|
||||||
|
#===============================================================================
|
||||||
|
# DATABASE CONFIGURATION #
|
||||||
|
# ==============================================================================
|
||||||
# Database type (SQLite, MySQL)
|
# Database type (SQLite, MySQL)
|
||||||
database_type: SQLite
|
database_type: SQLite
|
||||||
# MySQL connection details
|
# MySQL connection details
|
||||||
|
@ -21,7 +30,10 @@ connection_properties:
|
||||||
leak_detection_threshold: 0
|
leak_detection_threshold: 0
|
||||||
connection_test_query: "SELECT 1"
|
connection_test_query: "SELECT 1"
|
||||||
character_encoding: "utf8"
|
character_encoding: "utf8"
|
||||||
# Enabling / Disabling of specific modules
|
#===============================================================================
|
||||||
|
# MODULES CONFIGURATION #
|
||||||
|
# ==============================================================================
|
||||||
|
# Enabling / Disabling of specific modules
|
||||||
modules:
|
modules:
|
||||||
tokens: true
|
tokens: true
|
||||||
gems: true
|
gems: true
|
||||||
|
@ -41,10 +53,42 @@ item-migrator:
|
||||||
bind:
|
bind:
|
||||||
join: true
|
join: true
|
||||||
inventory: false
|
inventory: false
|
||||||
# List of supported pickaxes by UPC Enchants
|
#===============================================================================
|
||||||
|
# SUPPORTED PICKAXES FOR UPC ENCHANTS #
|
||||||
|
# ==============================================================================
|
||||||
|
# List of supported pickaxes by UPC Enchants
|
||||||
supported-pickaxes:
|
supported-pickaxes:
|
||||||
- DIAMOND_PICKAXE
|
- DIAMOND_PICKAXE
|
||||||
# Aliases for main command
|
#===============================================================================
|
||||||
|
# COMMAND CONFIGURATION #
|
||||||
|
# ==============================================================================
|
||||||
main-command-aliases:
|
main-command-aliases:
|
||||||
- xprison
|
- xprison
|
||||||
- prison
|
- prison
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
# ORIGINAL LICENSE #
|
||||||
|
# ==============================================================================
|
||||||
|
# MIT License
|
||||||
|
|
||||||
|
# Copyright (c) 2023 Bc. Ján Kluka
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
|
||||||
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
|
# copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
ConfigVersion: 1.0; # DO NOT CHANGE THIS VALUE! IT WILL BREAK THE PLUGIN!
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue