also updated EnvironmentEx
This commit is contained in:
Binary file not shown.
BIN
environmentex/.DS_Store
vendored
BIN
environmentex/.DS_Store
vendored
Binary file not shown.
4
environmentex/.vscode/settings.json
vendored
Normal file
4
environmentex/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"java.compile.nullAnalysis.mode": "automatic",
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
||||
BIN
environmentex/bin/.DS_Store
vendored
BIN
environmentex/bin/.DS_Store
vendored
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
id("io.papermc.paperweight.userdev") version "1.5.5"
|
||||
id("xyz.jpenilla.run-paper") version "2.1.0" // Adds runServer and runMojangMappedServer tasks for testing
|
||||
id("io.papermc.paperweight.userdev") version "1.7.2"
|
||||
id("xyz.jpenilla.run-paper") version "2.3.1" // Adds runServer and runMojangMappedServer tasks for testing
|
||||
}
|
||||
group = "de.hessj.environmentex"
|
||||
version = "1.0-SNAPSHOT"
|
||||
@@ -9,9 +9,9 @@ description = "environmentex"
|
||||
|
||||
|
||||
dependencies {
|
||||
implementation(files("/Volumes/Janik/DOKUMENTE/Programmierung/MCServer/MCPlugins/CraftBukkit.jar"))
|
||||
implementation(files("/Volumes/Janik/DOKUMENTE/Programmierung/MCServer/MCPlugins/helper/target/helper-1.0-SNAPSHOT.jar"))
|
||||
paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
|
||||
implementation(files("/Users/janik/Documents/MCPlugins/craftbukkit-1.21.1.jar"))
|
||||
implementation(files("/Users/janik/Desktop/helper-1.0-SNAPSHOT.jar"))
|
||||
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
|
||||
// paperweight.foliaDevBundle("1.20.1-R0.1-SNAPSHOT")
|
||||
// paperweight.devBundle("com.example.paperfork", "1.20.1-R0.1-SNAPSHOT")
|
||||
}
|
||||
@@ -27,7 +27,7 @@ tasks {
|
||||
|
||||
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
|
||||
// See https://openjdk.java.net/jeps/247 for more information.
|
||||
options.release.set(17)
|
||||
options.release.set(22)
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
|
||||
@@ -38,7 +38,7 @@ tasks {
|
||||
"name" to project.name,
|
||||
"version" to project.version,
|
||||
"description" to project.description,
|
||||
"apiVersion" to "1.20"
|
||||
"apiVersion" to "1.21"
|
||||
)
|
||||
inputs.properties(props)
|
||||
filesMatching("plugin.yml") {
|
||||
|
||||
BIN
environmentex/environmentex.jar
Executable file → Normal file
BIN
environmentex/environmentex.jar
Executable file → Normal file
Binary file not shown.
@@ -465,7 +465,7 @@ public class App extends JavaPlugin {
|
||||
}
|
||||
|
||||
public void registerGlow() {
|
||||
try {
|
||||
/* try {
|
||||
Field f = Enchantment.class.getDeclaredField("acceptingNew");
|
||||
f.setAccessible(true);
|
||||
f.set(null, true);
|
||||
@@ -478,7 +478,7 @@ public class App extends JavaPlugin {
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public static Boolean isDay() {
|
||||
|
||||
@@ -70,7 +70,7 @@ public class EnvironmentExCommands implements CommandExecutor, Listener {
|
||||
Player p = (Player) sender;
|
||||
ItemStack testEnchant = new ItemStack (Material.BOW, 1);
|
||||
ItemMeta testEnchantMeta = testEnchant.getItemMeta();
|
||||
testEnchantMeta.addEnchant(Enchantment.ARROW_INFINITE,1,false);
|
||||
testEnchantMeta.addEnchant(Enchantment.INFINITY,1,false);
|
||||
testEnchant.setItemMeta(testEnchantMeta);
|
||||
p.getWorld().dropItemNaturally(p.getLocation(), testEnchant);
|
||||
} catch (Exception ex) {
|
||||
|
||||
@@ -488,7 +488,7 @@ public class EnvironmentExListeners implements Listener {
|
||||
return false;
|
||||
} else {
|
||||
if (this.spawnParticles) {
|
||||
block.getWorld().spawnParticle(Particle.BLOCK_DUST, block.getLocation().add(0.5D, 0.5D, 0.5D),
|
||||
block.getWorld().spawnParticle(Particle.DUST, block.getLocation().add(0.5D, 0.5D, 0.5D),
|
||||
8, 0.2D, 0.2D, 0.2D, 0.0D, block.getType().createBlockData());
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_20_R1.entity.CraftItem;
|
||||
import org.bukkit.craftbukkit.v1_21_R1.entity.CraftItem;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
@@ -5,17 +5,22 @@ import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.enchantments.EnchantmentTarget;
|
||||
import org.bukkit.entity.EntityCategory;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.EquipmentSlotGroup;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.ItemType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import io.papermc.paper.enchantments.EnchantmentRarity;
|
||||
import io.papermc.paper.registry.set.RegistryKeySet;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
public class Glow extends Enchantment {
|
||||
|
||||
public Glow(@NotNull NamespacedKey key) {
|
||||
super(key); }
|
||||
super(); }
|
||||
|
||||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
@@ -91,5 +96,77 @@ public class Glow extends Enchantment {
|
||||
public boolean isTreasure() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull NamespacedKey getKey() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getKey'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getTranslationKey() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getTranslationKey'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinModifiedCost(int level) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getMinModifiedCost'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxModifiedCost(int level) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getMaxModifiedCost'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAnvilCost() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getAnvilCost'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDamageIncrease(int level, @NotNull EntityType entityType) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getDamageIncrease'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Set<EquipmentSlotGroup> getActiveSlotGroups() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getActiveSlotGroups'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Component description() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'description'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull RegistryKeySet<ItemType> getSupportedItems() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getSupportedItems'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable RegistryKeySet<ItemType> getPrimaryItems() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getPrimaryItems'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWeight() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getWeight'");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull RegistryKeySet<Enchantment> getExclusiveWith() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getExclusiveWith'");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,7 +43,7 @@ public class InfinityWaterBucket implements Listener{
|
||||
EnchantmentStorageMeta enchMeta = (EnchantmentStorageMeta) slot2.getItemMeta();
|
||||
|
||||
Map<Enchantment,Integer> enchs = enchMeta.getStoredEnchants();
|
||||
if(enchs.containsKey(Enchantment.ARROW_INFINITE) && enchs.get(Enchantment.ARROW_INFINITE)>0){
|
||||
if(enchs.containsKey(Enchantment.INFINITY) && enchs.get(Enchantment.INFINITY)>0){
|
||||
ItemStack result = slot1.clone();
|
||||
ItemMeta meta = result.getItemMeta();
|
||||
meta.displayName(Component.text(inv.getRenameText()));
|
||||
@@ -57,7 +57,7 @@ public class InfinityWaterBucket implements Listener{
|
||||
|
||||
|
||||
|
||||
meta.addEnchant(Enchantment.ARROW_INFINITE, 1, true);
|
||||
meta.addEnchant(Enchantment.INFINITY, 1, true);
|
||||
|
||||
new BukkitRunnable(){
|
||||
@Override
|
||||
|
||||
@@ -777,7 +777,7 @@ public class MobHeads implements Listener {
|
||||
e.getEntity().getWorld().dropItemNaturally(e.getEntity().getLocation(),
|
||||
Llamakopf);
|
||||
break;
|
||||
case MUSHROOM_COW:
|
||||
case MOOSHROOM:
|
||||
e.getEntity().getWorld().dropItemNaturally(e.getEntity().getLocation(),
|
||||
Mooshroomkopf);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user