Author SHA1 Message Date
Denis Istratov a0e7c89eea Update README.md 2023-07-25 18:06:14 +03:00
Denis Istratov 2c7e69ff2d Update README.md 2023-07-25 17:54:24 +03:00
Denis Istratov f536d84aaa Update README.md 2023-07-25 15:36:50 +03:00
Denis Istratov f26f91274e Update README.md 2023-07-25 14:44:06 +03:00
Denis Istratov 75648fa4c0 Update README.md 2023-07-25 14:43:42 +03:00
Denis Istratov ce4167a05a Update README.md 2023-07-25 03:18:25 +03:00
Denis Istratov cb4801046a Update README.md 2023-07-25 03:17:41 +03:00
Denis Istratov fbdab42d7e Update README.md 2023-07-25 03:17:28 +03:00
Denis Istratov be24255e88 Update README.md 2023-07-25 03:16:57 +03:00
redtea 4877ff0003 Merge branch 'main' of https://github.com/iRedTea/NoDropX 2023-07-25 03:09:19 +03:00
redtea 30726108a4 1.0.1 SNAPSHOT
Update checker
2023-07-25 03:07:21 +03:00
Denis Istratov b09aa71a73 Update README.md 2023-07-25 02:26:47 +03:00
Denis Istratov 82c585350c Update README.md 2023-07-25 02:26:32 +03:00
Denis Istratov 9352296d65 Update README.md 2023-07-25 02:25:27 +03:00
Denis Istratov 674cc3bff7 Update README.md 2023-07-25 02:02:37 +03:00
Denis Istratov e298b20f40 Update README.md 2023-07-25 01:57:55 +03:00
Denis Istratov a21ac871db Update README.md 2023-07-25 01:57:25 +03:00
Denis Istratov 61188df8f7 Update README.md 2023-07-25 01:56:49 +03:00
Denis Istratov 12d150ad13 Update README.md 2023-07-25 01:56:21 +03:00
7 changed files with 65 additions and 20 deletions

No files matched your search

+13 -7
View File
@@ -1,15 +1,21 @@
<img src="https://i.imgur.com/AxYMos8.png)https://i.imgur.com/AxYMos8.png"></img>
# NoDropX
Give no drop items!
**Give no drop items!**
The plugin will allow you to create items that will not drop out of your inventory at death!
Give an no drop item: /nodrop give [player] [item] (count)
Give an no drop item: `/nodrop give [player] [item] (count)` <br>
Check all plugin commands: https://github.com/iRedTea/NoDropX/wiki/Commands <br>
Plugin wiki: https://github.com/iRedTea/NoDropX/wiki
features:
- Support HEX Colors (MiniMessages and MD5 ChatColor)
- Support all versions from 1.12.2 to 1.20.1
- No drop items storage: /nodrop gui
**Features**
- Supports HEX Colors (MiniMessages and MD5 ChatColor)
- Supports all versions from 1.12.2 to 1.20.1 (Spigot/Paper)
- No drop items storage: `/nodrop gui`
- Fully customization
- Items that protect other slots from death
- Developer API
- Mods support (tested on Arclight 1.16.5)
- ItemsAdder support
<img src="https://i.imgur.com/s2BwNH5.png"></img>
<img src="https://i.imgur.com/7DdnANr.png"></img>
+1 -2
View File
@@ -5,7 +5,7 @@ plugins {
}
group = 'me.redtea'
version = '1.0.0-SNAPSHOT'
version = '1.0.1-SNAPSHOT'
repositories {
mavenCentral()
@@ -37,7 +37,6 @@ dependencies {
implementation "net.kyori:adventure-api:4.14.0"
implementation "net.kyori:adventure-platform-bukkit:4.3.0"
implementation files("libs/MiniMessages.jar")
compileOnly files("libs/nodropxforgebridge-1.1.jar")
implementation "dev.triumphteam:triumph-gui:3.1.2"
}
+15 -8
View File
@@ -34,8 +34,7 @@ import me.redtea.nodropx.service.respawn.RespawnService;
import me.redtea.nodropx.service.respawn.impl.RespawnServiceImpl;
import me.redtea.nodropx.service.storage.StorageService;
import me.redtea.nodropx.service.storage.impl.StorageServiceImpl;
import me.redtea.nodropxforgebridge.ApiProvider;
import me.redtea.nodropxforgebridge.Nodropxforgebridge;
import me.redtea.nodropx.util.UpdateChecker;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
@@ -46,7 +45,6 @@ import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
@@ -132,13 +130,22 @@ public final class NoDropX extends JavaPlugin {
commandManager.register(new NoDropCommand(messages, noDropAPI, guiFacade, this));
bStatsInit();
printCredits();
mod();
checkUpdates();
}
//todo remove
private void mod() {
Nodropxforgebridge.noDropAPI = s -> getAPI().getCapacitySlots(s);
private void checkUpdates() {
if(!(getConfig().contains("checkForUpdates") && getConfig().getBoolean("checkForUpdates"))) {
return;
}
new UpdateChecker(this, 111485).getVersion(version -> {
if (this.getDescription().getVersion().equals(version)) {
getLogger().info("There is not a new update available.");
} else {
getLogger().info("There is a new update available: " + version);
getLogger().info(". Download it from https://www.spigotmc.org/resources/nodropx.111485/");
}
});
}
@@ -31,7 +31,7 @@ public class NoDropCommand extends CommandBase {
}
@SubCommand("give")
@Permission("nodropx.give")
@Permission("R")
@Completion({"#players", "#materials", "#range:1-64"})
public void onGive(final CommandSender sender,
final Player player,
@@ -0,0 +1,32 @@
package me.redtea.nodropx.util;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Scanner;
import java.util.function.Consumer;
public class UpdateChecker {
private final JavaPlugin plugin;
private final int resourceId;
public UpdateChecker(JavaPlugin plugin, int resourceId) {
this.plugin = plugin;
this.resourceId = resourceId;
}
public void getVersion(final Consumer<String> consumer) {
Bukkit.getScheduler().runTaskAsynchronously(this.plugin, () -> {
try (InputStream is = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.resourceId).openStream(); Scanner scann = new Scanner(is)) {
if (scann.hasNext()) {
consumer.accept(scann.next());
}
} catch (IOException e) {
plugin.getLogger().info("Unable to check for updates: " + e.getMessage());
}
});
}
}
+2 -1
View File
@@ -1,2 +1,3 @@
forceUseLegacy: false
forceUseMD5Colors: false
forceUseMD5Colors: false
checkForUpdates: true
+1 -1
View File
@@ -14,7 +14,7 @@ noExists: "<dark_red><bold>[!] <red>This player doesnt exists!"
gui:
title: "<bold>Personal storage"
frame:
name: "&7"
name: "<gray>"
material: GLASS_PANE
prev:
name: "<red>Previous"