fix: fixed bug with shield and backpack
All checks were successful
Gitea Actions Demo / Build-Gradle (push) Successful in 2m44s
All checks were successful
Gitea Actions Demo / Build-Gradle (push) Successful in 2m44s
This commit is contained in:
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
#Wed Jul 02 13:29:37 CEST 2025
|
||||
#Wed Jul 02 13:32:02 CEST 2025
|
||||
gradle.version=8.14.2
|
||||
|
||||
Binary file not shown.
@@ -1,2 +1,2 @@
|
||||
Command: /opt/homebrew/Cellar/openjdk/23.0.2/libexec/openjdk.jdk/Contents/Home/bin/java -Xmx1G -classpath /Users/janik/.gradle/caches/modules-2/files-2.1/net.fabricmc/tiny-remapper/0.11.1/6c1f29838864ba8f495855edfc8ef17706fedb5d/tiny-remapper-0.11.1-fat.jar net.fabricmc.tinyremapper.Main /Users/janik/Desktop/MCPlugins/environmentex-1.0-SNAPSHOT.jar /Users/janik/Desktop/MCPlugins/environmentex/build/libs/environmentex-1.0-SNAPSHOT-reobf.jar /Users/janik/Desktop/MCPlugins/environmentex/.gradle/caches/paperweight/taskCache/reobfMappings.tiny mojang spigot /Users/janik/Desktop/MCPlugins/environmentex/.gradle/caches/paperweight/taskCache/mappedServerJar.jar --threads=1
|
||||
[INFO] Finished after 3356,66 ms.
|
||||
[INFO] Finished after 944,74 ms.
|
||||
|
||||
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.
@@ -650,7 +650,7 @@ code + .copy-button {
|
||||
<script type="text/javascript">
|
||||
function configurationCacheProblems() { return (
|
||||
// begin-report-data
|
||||
{"diagnostics":[{"locations":[{}],"problem":[{"text":"The org.gradle.api.plugins.Convention type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 9.0."}],"contextualLabel":"The org.gradle.api.plugins.Convention type has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-org-gradle-api-plugins-convention-type-has-been-deprecated","displayName":"The org.gradle.api.plugins.Convention type has been deprecated."}]},{"locations":[{}],"problem":[{"text":"The org.gradle.api.plugins.Convention type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 9.0."}],"contextualLabel":"The org.gradle.api.plugins.Convention type has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-org-gradle-api-plugins-convention-type-has-been-deprecated","displayName":"The org.gradle.api.plugins.Convention type has been deprecated."}]},{"locations":[{}],"problem":[{"text":"The org.gradle.api.plugins.Convention type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 9.0."}],"contextualLabel":"The org.gradle.api.plugins.Convention type has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-org-gradle-api-plugins-convention-type-has-been-deprecated","displayName":"The org.gradle.api.plugins.Convention type has been deprecated."}]}],"problemsReport":{"totalProblemCount":3,"buildName":"environmentex","requestedTasks":"","documentationLink":"https://docs.gradle.org/8.14.2/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
{"diagnostics":[{"locations":[{"path":"/Users/janik/Desktop/MCPlugins/environmentex/src/main/java/de/hessj/environmentex/App.java"},{"taskPath":":compileJava"}],"problem":[{"text":"/Users/janik/Desktop/MCPlugins/environmentex/src/main/java/de/hessj/environmentex/App.java verwendet oder überschreibt eine veraltete API."}],"severity":"ADVICE","problemDetails":[{"text":"Hinweis: /Users/janik/Desktop/MCPlugins/environmentex/src/main/java/de/hessj/environmentex/App.java verwendet oder überschreibt eine veraltete API."}],"contextualLabel":"/Users/janik/Desktop/MCPlugins/environmentex/src/main/java/de/hessj/environmentex/App.java verwendet oder überschreibt eine veraltete API.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.deprecated.filename","displayName":"/Users/janik/Desktop/MCPlugins/environmentex/src/main/java/de/hessj/environmentex/App.java verwendet oder überschreibt eine veraltete API."}]},{"locations":[{"path":"/Users/janik/Desktop/MCPlugins/environmentex/src/main/java/de/hessj/environmentex/App.java"},{"taskPath":":compileJava"}],"problem":[{"text":"Wiederholen Sie die Kompilierung mit -Xlint:deprecation, um Details zu erhalten."}],"severity":"ADVICE","problemDetails":[{"text":"Hinweis: Wiederholen Sie die Kompilierung mit -Xlint:deprecation, um Details zu erhalten."}],"contextualLabel":"Wiederholen Sie die Kompilierung mit -Xlint:deprecation, um Details zu erhalten.","problemId":[{"name":"java","displayName":"Java compilation"},{"name":"compilation","displayName":"Compilation"},{"name":"compiler.note.deprecated.recompile","displayName":"Wiederholen Sie die Kompilierung mit -Xlint:deprecation, um Details zu erhalten."}]}],"problemsReport":{"totalProblemCount":2,"buildName":"environmentex","requestedTasks":"build","documentationLink":"https://docs.gradle.org/8.14.2/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||
// end-report-data
|
||||
);}
|
||||
</script>
|
||||
|
||||
Binary file not shown.
@@ -36,6 +36,12 @@ public class EnvironmentExCommands implements CommandExecutor, Listener {
|
||||
public static HashMap<UUID, BossBar> bossBars = new HashMap<>();
|
||||
int taskId;
|
||||
|
||||
|
||||
public boolean isPlayerOnlineByName(String name) {
|
||||
Player player = Bukkit.getPlayer(name);
|
||||
return player != null && player.isOnline();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (sender instanceof Player) {
|
||||
@@ -94,7 +100,7 @@ Player p = (Player) sender;
|
||||
|
||||
if (args.length < 1) {
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR,
|
||||
"Benutzung: /pin <set | list | remove | follow | unfollow> [name | id] | send [id | onlineplayer]"));
|
||||
"Benutzung: /pin <set | list | remove | follow | unfollow> [name | id] | share [id | onlineplayer]"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,11 +108,92 @@ Player p = (Player) sender;
|
||||
Map<String, Location> pins = playerPins.get(playerId);
|
||||
|
||||
switch (subCommand) {
|
||||
case "send":
|
||||
case "share":
|
||||
if (args.length < 3) {
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR, "Benutzung: /pin send <id> <onlineplayer>"));
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR, "Benutzung: /pin share <id> <onlineplayer>"));
|
||||
return true;
|
||||
}
|
||||
if(isPlayerOnlineByName(args[2].toString()) == false) {
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR, "Dieser Spieler ist nicht online!"));
|
||||
return true;
|
||||
}
|
||||
if(Bukkit.getPlayer(args[2].toString()).getUniqueId().equals(p.getUniqueId())){
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR, "Du kannst deine Pins nicht an dich selbst teilen!"));
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int pinId1 = Integer.parseInt(args[1]);
|
||||
String pinName1 = PinFeature.pinConfig.getString(playerId + "." + pinId1 + ".name");
|
||||
String locationString1 = PinFeature.pinConfig.getString(playerId + "." + pinId1 + ".loc");
|
||||
|
||||
if (pinName1 == null || locationString1 == null) {
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR, "Kein Pin mit dieser ID gefunden."));
|
||||
return true;
|
||||
}
|
||||
App.main.log("PinName: " + pinName1);
|
||||
App.main.log("LocationString: " + locationString1);
|
||||
// Standort aus der YML auslesen
|
||||
String[] locParts = locationString1.split(", ");
|
||||
App.main.log("World: " + locParts[0]);
|
||||
|
||||
|
||||
/*
|
||||
ALSO CHECK IF PIN WITH NAME + LOC EXISTS
|
||||
// **Nimmt den gesamten Text nach "/pin set" als Namen**
|
||||
String pinName = String.join(" ", Arrays.copyOfRange(args, 1, args.length));
|
||||
Location playerLocation = p.getLocation();
|
||||
|
||||
// **Kleinste verfügbare ID suchen**
|
||||
int nextId = 1;
|
||||
ConfigurationSection playerSection = PinFeature.pinConfig
|
||||
.getConfigurationSection(playerId.toString());
|
||||
if (playerSection != null) {
|
||||
Set<Integer> existingIds = playerSection.getKeys(false).stream()
|
||||
.map(Integer::parseInt)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
while (existingIds.contains(nextId)) {
|
||||
nextId++;
|
||||
}
|
||||
}
|
||||
|
||||
pins.put(pinName, playerLocation);
|
||||
String locationString = playerLocation.getWorld().getName() + ", " +
|
||||
playerLocation.getBlockX() + ", " +
|
||||
playerLocation.getBlockY() + ", " +
|
||||
playerLocation.getBlockZ();
|
||||
|
||||
PinFeature.pinConfig.set(playerId + "." + nextId + ".name", pinName);
|
||||
PinFeature.pinConfig.set(playerId + "." + nextId + ".loc", locationString);
|
||||
savePins();
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Bukkit.getPlayer(args[2].toString()).sendMessage(helper.R3SMessage(Type.SUCCESS, "Du hast den Pin '" + pinName1 + "' von " + p.getName() + " erhalten!"));
|
||||
p.sendMessage(helper.R3SMessage(Type.SUCCESS, "Du hast den Pin '" + pinName1 + "' an " + args[2].toString() + " geteilt!"));
|
||||
} catch (NumberFormatException e) {
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR, "Ungültige Pin-ID."));
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case "set":
|
||||
|
||||
@@ -179,7 +179,7 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
|
||||
p.sendMessage(helper.R3SMessage(Type.OK, "Das Gewitter wird durchgeschlafen. ("
|
||||
+ voteForYes + "x Ja, " + voteForNo + "x Nein, "
|
||||
+ (voteablePlayers - voteForNo - voteForYes) + "x enthalten)"));
|
||||
+ (voteablePlayers+1 - voteForNo - voteForYes) + "x enthalten)"));
|
||||
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
|
||||
p.sendMessage(helper.R3SMessage(Type.OK, "Die Nacht wird durchgeschlafen. ("
|
||||
+ voteForYes + "x Ja, " + voteForNo + "x Nein, "
|
||||
+ (voteablePlayers - voteForNo - voteForYes) + "x enthalten)"));
|
||||
+ (voteablePlayers+1 - voteForNo - voteForYes) + "x enthalten)"));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -209,14 +209,14 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR,
|
||||
"Das Gewitter wird nicht durchgeschlafen. (" + voteForYes + "x Ja, "
|
||||
+ voteForNo
|
||||
+ "x Nein, " + (voteablePlayers - voteForNo - voteForYes)
|
||||
+ "x Nein, " + (voteablePlayers+1 - voteForNo - voteForYes)
|
||||
+ "x enthalten)"));
|
||||
|
||||
} else {
|
||||
p.sendMessage(helper.R3SMessage(Type.ERROR,
|
||||
"Die Nacht wird nicht durchgeschlafen. (" + voteForYes + "x Ja, "
|
||||
+ voteForNo
|
||||
+ "x Nein, " + (voteablePlayers - voteForNo - voteForYes)
|
||||
+ "x Nein, " + (voteablePlayers+1 - voteForNo - voteForYes)
|
||||
+ "x enthalten)"));
|
||||
}
|
||||
if (p.isSleeping()) {
|
||||
@@ -744,16 +744,16 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
// e.getPlayer().openInventory(inv);
|
||||
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.AIR));
|
||||
|
||||
e.getPlayer().openInventory(hm.get(e.getPlayer()));
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
/*Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
e.getPlayer().getInventory().setItemInOffHand(is);
|
||||
App.main.log(is.toString());
|
||||
//e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.ACACIA_BOAT));
|
||||
}
|
||||
}, 3L);
|
||||
}, 10L);*/
|
||||
|
||||
}
|
||||
} else if (e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer()
|
||||
@@ -772,14 +772,14 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
hm2.put(e.getPlayer(), Bukkit.createInventory(null, 18, Component.translatable("Rucksack")));
|
||||
// e.getPlayer().openInventory(inv2);
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.AIR));
|
||||
e.getPlayer().openInventory(hm2.get(e.getPlayer()));
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
/*Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
e.getPlayer().getInventory().setItemInOffHand(is);
|
||||
App.main.log(is.toString());
|
||||
//e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.ACACIA_BOAT));
|
||||
}
|
||||
}, 3L);
|
||||
}, 10L);*/
|
||||
}
|
||||
} else if (e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer()
|
||||
.has(App.main.nsk3, PersistentDataType.STRING)
|
||||
@@ -798,14 +798,14 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
hm3.put(e.getPlayer(), Bukkit.createInventory(null, 27, Component.translatable("Großer Rucksack")));
|
||||
// e.getPlayer().openInventory(inv3);
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.AIR));
|
||||
e.getPlayer().openInventory(hm3.get(e.getPlayer()));
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
/*Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
e.getPlayer().getInventory().setItemInOffHand(is);
|
||||
App.main.log(is.toString());
|
||||
//e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.ACACIA_BOAT));
|
||||
}
|
||||
}, 3L);
|
||||
}, 10L);*/
|
||||
}
|
||||
} else if (e.getPlayer().getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer()
|
||||
.has(App.main.nsk4, PersistentDataType.STRING)
|
||||
@@ -824,15 +824,15 @@ if(LoginListener.customConfig.getBoolean("players." + p.getUniqueId() + ".ignore
|
||||
hm4.put(e.getPlayer(),
|
||||
Bukkit.createInventory(null, 36, Component.translatable("Riesiger Rucksack")));
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.AIR));
|
||||
e.getPlayer().openInventory(hm4.get(e.getPlayer()));
|
||||
// e.getPlayer().openInventory(inv4);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
/*Bukkit.getScheduler().scheduleSyncDelayedTask(App.main, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
e.getPlayer().getInventory().setItemInOffHand(is);
|
||||
App.main.log(is.toString());
|
||||
//e.getPlayer().getInventory().setItemInOffHand(new ItemStack(Material.ACACIA_BOAT));
|
||||
}
|
||||
}, 3L);
|
||||
}, 10L);*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public List<String> onTabComplete(CommandSender sender, Command cmd, String labe
|
||||
UUID playerId = player.getUniqueId();
|
||||
|
||||
if (args.length == 1) {
|
||||
return Arrays.asList("set", "list", "remove", "follow", "unfollow", "send");
|
||||
return Arrays.asList("set", "list", "remove", "follow", "unfollow", "share");
|
||||
}
|
||||
|
||||
if (args.length == 2) {
|
||||
@@ -46,7 +46,7 @@ public List<String> onTabComplete(CommandSender sender, Command cmd, String labe
|
||||
return Collections.emptyList(); // Keine Argumente notwendig
|
||||
}
|
||||
|
||||
if (subCommand.equals("remove") || subCommand.equals("follow") || subCommand.equals("send") ) {
|
||||
if (subCommand.equals("remove") || subCommand.equals("follow") || subCommand.equals("share") ) {
|
||||
ConfigurationSection playerSection = PinFeature.pinConfig.getConfigurationSection(playerId.toString());
|
||||
if (playerSection != null) {
|
||||
return playerSection.getKeys(false).stream()
|
||||
|
||||
@@ -40,7 +40,10 @@ public class VillagerListener implements Listener {
|
||||
|
||||
for (Entity ent : en) {
|
||||
if (ent instanceof Player) {
|
||||
|
||||
Player enti = (Player) ent;
|
||||
if(!enti.getPlayer().displayName().toString().contains("R3STEAS")){
|
||||
return;
|
||||
}
|
||||
if (mr.getResult().getItemMeta() instanceof EnchantmentStorageMeta) {
|
||||
EnchantmentStorageMeta meta = (EnchantmentStorageMeta) mr.getResult()
|
||||
.getItemMeta();
|
||||
|
||||
Reference in New Issue
Block a user