Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
1.15 support
Browse files Browse the repository at this point in the history
  • Loading branch information
poma123 committed Dec 15, 2019
1 parent 6494e21 commit 9bf8b60
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 108 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml

This file was deleted.

177 changes: 94 additions & 83 deletions .idea/workspace.xml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions PickupSpawners.iml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.14.1-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.spigotmc:spigot-api:1.15-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:21.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.13-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.destroystokyo.paper:paper-api:1.13.2-R0.1-SNAPSHOT" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: junit:junit:4.10" level="project" />
Expand All @@ -40,7 +40,7 @@
<orderEntry type="module-library">
<library name="Maven: net.milkbowl.vault:VaultAPI:1.7">
<CLASSES>
<root url="jar://$USER_HOME$/eclipse-workspace/Vault.jar!/" />
<root url="jar://$MODULE_DIR$/lib/Vault.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<version>1.14.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.15-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/me/poma123/spawners/Listener.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ public class Listener implements org.bukkit.event.Listener {
private Material material = PickupSpawners.material;

public static String getLang(Player p) {
String[] s = StringUtils.split(p.spigot().getLocale(), '_');
String[] s = StringUtils.split(p.getLocale(), '_');
return s[0];
}

public static String getLangExact(Player p) {

return p.spigot().getLocale();

return p.getLocale();

}

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/me/poma123/spawners/PickupSpawners.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ public void onEnable() {
/*
* Spawner material setting by version
*/
if (getVersion().contains("1_14")) {
if (getVersion().contains("1_14") || getVersion().contains("1_15")) {
material = Material.getMaterial("SPAWNER");
getLogger().info("1.14 native version detected. Configuring 1.14 compatibility...");
getLogger().info("1.14+ native version detected. Configuring 1.14+ compatibility...");
getLogger().info("Done!");
} else if (getVersion().contains("1_13")) {
material = Material.getMaterial("SPAWNER");
Expand All @@ -136,7 +136,7 @@ public void onEnable() {

for (EntityType entity : EntityType.values()) {
String list1 = "ILLUSIONER, GIANT, ENDER_DRAGON, WITHER, MUSHROOM_COW, SNOWMAN, IRON_GOLEM";
if (getVersion().contains("1_14")) {
if (getVersion().contains("1_14") || getVersion().contains("1_15")) {

if (entity.toString().toLowerCase().equals("pig_zombie")) {
if (debug) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/poma123/spawners/gui/PickupGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void spawnerGiveList(Player p, int page) {

List<String> listByPage = sublists.get(page - 1);

if (ps.getVersion().contains("1_13_R") || ps.getVersion().contains("1_14_")) {
if (ps.getVersion().contains("1_13_R") || ps.getVersion().contains("1_14_") || ps.getVersion().contains("1_15_")) {
for (String s : listByPage) {
if (s.equalsIgnoreCase("pig_zombie")) {
ItemStack item = new ItemStack(Material.ZOMBIE_PIGMAN_SPAWN_EGG);
Expand Down

0 comments on commit 9bf8b60

Please sign in to comment.