mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 12:05:16 +01:00
Initial 1.15 support
This commit is contained in:
parent
834da89d10
commit
390b1a47ba
18
pom.xml
18
pom.xml
@ -18,7 +18,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.15-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- MyPet -->
|
||||
@ -184,14 +184,14 @@
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- <plugin> -->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId> -->
|
||||
<!-- <artifactId>maven-jar-plugin</artifactId> -->
|
||||
<!-- <version>2.3.1</version> -->
|
||||
<!-- <configuration> -->
|
||||
<!-- <outputDirectory>C:\Users\Arte\Desktop\Server 1.14\plugins\</outputDirectory> -->
|
||||
<!-- </configuration> -->
|
||||
<!-- </plugin> -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<outputDirectory>C:\Users\Arte\Desktop\Server 1.15\plugins\</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -122,9 +122,6 @@ public enum CMIEntityType {
|
||||
"ZGZiNjc1Y2I1YTdlM2ZkMjVlMjlkYTgyNThmMjRmYzAyMGIzZmE5NTAzNjJiOGJjOGViMjUyZTU2ZTc0In19fQ==")),
|
||||
SHULKER(69, "Shulker", Arrays.asList(
|
||||
"MWU3MzgzMmUyNzJmODg0NGM0NzY4NDZiYzQyNGEzNDMyZmI2OThjNThlNmVmMmE5ODcxYzdkMjlhZWVhNyJ9fX0=")),
|
||||
CAT(75, "Cat", Arrays.asList(
|
||||
"N2M5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, "Villager", Arrays.asList(
|
||||
"ODIyZDhlNzUxYzhmMmZkNGM4OTQyYzQ0YmRiMmY1Y2E0ZDhhZThlNTc1ZWQzZWIzNGMxOGE4NmU5M2IifX19")),
|
||||
FOX(121, "Fox", Arrays.asList(
|
||||
"YjZmZWI3NjFiMmY1OWZhYmU1Y2MzY2M4MmE5MzRiNTM0ZWE5OWVkYjkxMzJjY2RhOWY0ODRiZDU5ODZkNyJ9fX0=",
|
||||
"MjRhMDM0NzQzNjQzNGViMTNkNTM3YjllYjZiNDViNmVmNGM1YTc4Zjg2ZTkxODYzZWY2MWQyYjhhNTNiODIifX19",
|
||||
"MTZkYjdkNTA3Mzg5YTE0YmJlYzM5ZGU2OTIyMTY1YjMyZDQzNjU3YmNiNmFhZjRiNTE4MjgyNWIyMmI0In19fQ==")),
|
||||
ENDER_CRYSTAL(200, "End Crystal"),
|
||||
TURTLE(901, "Turtle", Arrays.asList(
|
||||
"MGE0MDUwZTdhYWNjNDUzOTIwMjY1OGZkYzMzOWRkMTgyZDdlMzIyZjlmYmNjNGQ1Zjk5YjU3MThhIn19fQ==")),
|
||||
@ -231,15 +220,31 @@ public enum CMIEntityType {
|
||||
COMPLEX_PART(915, "Complex Part"),
|
||||
TIPPED_ARROW(916, "Tipped Arrow"),
|
||||
|
||||
RAVAGER(917, "Ravager", Arrays.asList(
|
||||
PANDA(917, "Panda", Arrays.asList(
|
||||
"ZDE4OGM5ODBhYWNmYTk0Y2YzMzA4ODUxMmIxYjk1MTdiYTgyNmIxNTRkNGNhZmMyNjJhZmY2OTc3YmU4YSJ9fX0=")),
|
||||
PILLAGER(918, "Pillager", Arrays.asList(
|
||||
"NGFlZTZiYjM3Y2JmYzkyYjBkODZkYjVhZGE0NzkwYzY0ZmY0NDY4ZDY4Yjg0OTQyZmRlMDQ0MDVlOGVmNTMzMyJ9fX0=")),
|
||||
RAVAGER(919, "Ravager", Arrays.asList(
|
||||
"MWNiOWYxMzlmOTQ4OWQ4NmU0MTBhMDZkOGNiYzY3MGM4MDI4MTM3NTA4ZTNlNGJlZjYxMmZlMzJlZGQ2MDE5MyJ9fX0=",
|
||||
"M2I2MjUwMWNkMWI4N2IzN2Y2MjgwMTgyMTBlYzU0MDBjYjY1YTRkMWFhYjc0ZTZhM2Y3ZjYyYWE4NWRiOTdlZSJ9fX0=")),
|
||||
TRADER_LLAMA(918, "Trader Llama", Arrays.asList(
|
||||
TRADER_LLAMA(920, "Trader Llama", Arrays.asList(
|
||||
"ODQyNDc4MGIzYzVjNTM1MWNmNDlmYjViZjQxZmNiMjg5NDkxZGY2YzQzMDY4M2M4NGQ3ODQ2MTg4ZGI0Zjg0ZCJ9fX0=",
|
||||
"NzA4N2E1NTZkNGZmYTk1ZWNkMjg0NGYzNTBkYzQzZTI1NGU1ZDUzNWZhNTk2ZjU0MGQ3ZTc3ZmE2N2RmNDY5NiJ9fX0=",
|
||||
"YmU0ZDhhMGJjMTVmMjM5OTIxZWZkOGJlMzQ4MGJhNzdhOThlZTdkOWNlMDA3MjhjMGQ3MzNmMGEyZDYxNGQxNiJ9fX0=")),
|
||||
WANDERING_TRADER(919, "Wandering Trader", Arrays.asList(
|
||||
WANDERING_TRADER(921, "Wandering Trader", Arrays.asList(
|
||||
"NWYxMzc5YTgyMjkwZDdhYmUxZWZhYWJiYzcwNzEwZmYyZWMwMmRkMzRhZGUzODZiYzAwYzkzMGM0NjFjZjkzMiJ9fX0=")),
|
||||
FOX(922, "Fox", Arrays.asList(
|
||||
"YjZmZWI3NjFiMmY1OWZhYmU1Y2MzY2M4MmE5MzRiNTM0ZWE5OWVkYjkxMzJjY2RhOWY0ODRiZDU5ODZkNyJ9fX0=",
|
||||
"MjRhMDM0NzQzNjQzNGViMTNkNTM3YjllYjZiNDViNmVmNGM1YTc4Zjg2ZTkxODYzZWY2MWQyYjhhNTNiODIifX19",
|
||||
"MTZkYjdkNTA3Mzg5YTE0YmJlYzM5ZGU2OTIyMTY1YjMyZDQzNjU3YmNiNmFhZjRiNTE4MjgyNWIyMmI0In19fQ==")),
|
||||
CAT(923, "Cat", Arrays.asList(
|
||||
"N2M5Yjc0MDllN2I1MzgzYzE5YjM2MmIyYTBjYjQzZDUwOTNiMTNlMmIyMzRlOGExODkxNTYzZTU1ZWFlOWQ2OCJ9fX0=",
|
||||
"NTg4MDNmMDI3MGY4Y2RmNGUwZmU5NzMyZDQ5NjdjY2NjMGEyZjRmY2QxMThjZDE1MDAwOTc5YjE4ODg1MTQ0ZiJ9fX0=")),
|
||||
BEE(924, "Bee", Arrays.asList(
|
||||
"OTQ3MzIyZjgzMWUzYzE2OGNmYmQzZTI4ZmU5MjUxNDRiMjYxZTc5ZWIzOWM3NzEzNDlmYWM1NWE4MTI2NDczIn19fQ==",
|
||||
"OTlkYzNmMDBlY2FiMjI0OWJiNmExNmM4YzUxMTVjZWI5ZjIzMjA1YTBkNTVjYzBlOWJhYmQyNTYyZjc5NTljNCJ9fX0==",
|
||||
"ZTZiNzRlMDUyYjc0Mjg4Nzk5YmE2ZDlmMzVjNWQwMjIxY2Y4YjA0MzMxNTQ3ZWMyZjY4ZDczNTk3YWUyYzliIn19fQ==",
|
||||
"YmIxNzc3NDY2MjUxMmQ3ODdlZjc3YjFhNDZhMDRlMmM2ZmQ2Nzc5NGJmN2Y3Nzk1NjZlYjIxYzgxNDNhYWQ5ZSJ9fX0=")),
|
||||
// if possible we can remove this string for each texture to save up some space
|
||||
// eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUv
|
||||
UNKNOWN(999, "Unknown");
|
||||
@ -435,8 +440,7 @@ public enum CMIEntityType {
|
||||
}
|
||||
|
||||
public CMIMaterial getSpawnEggMaterial() {
|
||||
CMIMaterial m = CMIMaterial.get((this.equals(CMIEntityType.MUSHROOM_COW) ?
|
||||
"Mooshroom".toLowerCase() : this.toString().toLowerCase()) + "_spawn_egg");
|
||||
CMIMaterial m = CMIMaterial.get((this.equals(CMIEntityType.MUSHROOM_COW) ? "Mooshroom".toLowerCase() : this.toString().toLowerCase()) + "_spawn_egg");
|
||||
return m != null && m.isMonsterEgg() ? m : null;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
49
src/main/java/com/gamingmesh/jobs/nmsUtil/v1_15.java
Normal file
49
src/main/java/com/gamingmesh/jobs/nmsUtil/v1_15.java
Normal file
@ -0,0 +1,49 @@
|
||||
package com.gamingmesh.jobs.nmsUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.Damageable;
|
||||
|
||||
import com.gamingmesh.jobs.NMS;
|
||||
|
||||
public class v1_15 implements NMS {
|
||||
@Override
|
||||
public List<Block> getPistonRetractBlocks(BlockPistonRetractEvent event) {
|
||||
List<Block> blocks = new ArrayList<>();
|
||||
blocks.addAll(event.getBlocks());
|
||||
return blocks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRealType(Entity entity) {
|
||||
return entity.getType().name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemInMainHand(Player player) {
|
||||
return player.getInventory().getItemInMainHand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemInMainHand(Player player, ItemStack item) {
|
||||
player.getInventory().setItemInMainHand(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxHealth(LivingEntity entity) {
|
||||
return entity.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getDurability(ItemStack item) {
|
||||
return (short) ((Damageable) item.getItemMeta()).getDamage();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user