Skip to content

Commit

Permalink
Update for 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanOMik committed Jul 20, 2023
1 parent 2730dbe commit c765523
Show file tree
Hide file tree
Showing 43 changed files with 1,649 additions and 261 deletions.
4 changes: 2 additions & 2 deletions 1_14_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>tamablefoxes-parent</artifactId>
<groupId>net.seanomik</groupId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<artifactId>tamablefoxes_v1_14_R1</artifactId>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions 1_15_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>tamablefoxes-parent</artifactId>
<groupId>net.seanomik</groupId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<artifactId>tamablefoxes_v1_15_R1</artifactId>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions 1_16_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>tamablefoxes-parent</artifactId>
<groupId>net.seanomik</groupId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<artifactId>tamablefoxes_v1_16_R1</artifactId>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions 1_16_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>tamablefoxes-parent</artifactId>
<groupId>net.seanomik</groupId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<artifactId>tamablefoxes_v1_16_R2</artifactId>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions 1_16_R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<artifactId>tamablefoxes_v1_16_R3</artifactId>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions 1_17_1_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<build>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -283,27 +283,29 @@ private void reassessTameGoals() {

public void rename(org.bukkit.entity.Player player) {
new AnvilGUI.Builder()
.onComplete((plr, input) -> { // Called when the inventory output slot is clicked
if (!input.equals("")) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(input, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(input).equalsIgnoreCase("disabled")) {
plr.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(input));
}
.onClick((slot, stateSnapshot) -> {
String text = stateSnapshot.getText();
if (slot == AnvilGUI.Slot.OUTPUT && !text.isEmpty()) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(text, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(text));
}
} else if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GRAY + "The fox was not named");
}

//return AnvilGUI.Response.close();
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.preventClose()
.text("Fox name") // Sets the text the GUI should start with
.plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.text("Fox name")
.title("Name your new friend!")
.plugin(Utils.tamableFoxesPlugin)
.open(player);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions 1_17_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<build>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -280,27 +280,29 @@ private void reassessTameGoals() {

public void rename(org.bukkit.entity.Player player) {
new AnvilGUI.Builder()
.onComplete((plr, input) -> { // Called when the inventory output slot is clicked
if (!input.equals("")) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(input, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(input).equalsIgnoreCase("disabled")) {
plr.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(input));
}
.onClick((slot, stateSnapshot) -> {
String text = stateSnapshot.getText();
if (slot == AnvilGUI.Slot.OUTPUT && !text.isEmpty()) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(text, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(text));
}
} else if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GRAY + "The fox was not named");
}

//return AnvilGUI.Response.close();
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.preventClose()
.text("Fox name") // Sets the text the GUI should start with
.plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.text("Fox name")
.title("Name your new friend!")
.plugin(Utils.tamableFoxesPlugin)
.open(player);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions 1_18_1_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<build>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -302,27 +302,29 @@ private void reassessTameGoals() {

public void rename(org.bukkit.entity.Player player) {
new AnvilGUI.Builder()
.onComplete((plr, input) -> { // Called when the inventory output slot is clicked
if (!input.equals("")) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(input, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(input).equalsIgnoreCase("disabled")) {
plr.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(input));
}
.onClick((slot, stateSnapshot) -> {
String text = stateSnapshot.getText();
if (slot == AnvilGUI.Slot.OUTPUT && !text.isEmpty()) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(text, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(text));
}
} else if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GRAY + "The fox was not named");
}

//return AnvilGUI.Response.close();
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.preventClose()
.text("Fox name") // Sets the text the GUI should start with
.plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.text("Fox name")
.title("Name your new friend!")
.plugin(Utils.tamableFoxesPlugin)
.open(player);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions 1_18_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<build>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -302,27 +302,29 @@ private void reassessTameGoals() {

public void rename(org.bukkit.entity.Player player) {
new AnvilGUI.Builder()
.onComplete((plr, input) -> { // Called when the inventory output slot is clicked
if (!input.equals("")) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(input, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(input).equalsIgnoreCase("disabled")) {
plr.sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(input));
}
.onClick((slot, stateSnapshot) -> {
String text = stateSnapshot.getText();
if (slot == AnvilGUI.Slot.OUTPUT && !text.isEmpty()) {
org.bukkit.entity.Entity tamableFox = this.getBukkitEntity();

// This will auto format the name for config settings.
String foxName = LanguageConfig.getFoxNameFormat(text, player.getDisplayName());

tamableFox.setCustomName(foxName);
tamableFox.setCustomNameVisible(true);
if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GREEN + LanguageConfig.getTamingChosenPerfect(text));
}
} else if (!LanguageConfig.getTamingChosenPerfect(text).equalsIgnoreCase("disabled")) {
stateSnapshot.getPlayer().sendMessage(Config.getPrefix() + ChatColor.GRAY + "The fox was not named");
}

//return AnvilGUI.Response.close();
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.preventClose()
.text("Fox name") // Sets the text the GUI should start with
.plugin(Utils.tamableFoxesPlugin) // Set the plugin instance
.open(player); // Opens the GUI for the player provided
return Arrays.asList(AnvilGUI.ResponseAction.close());
})
.text("Fox name")
.title("Name your new friend!")
.plugin(Utils.tamableFoxesPlugin)
.open(player);
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions 1_18_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.seanomik</groupId>
<artifactId>tamablefoxes-parent</artifactId>
<version>2.2.9-SNAPSHOT</version>
<version>2.2.10-SNAPSHOT</version>
</parent>

<build>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.6.3-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit c765523

Please sign in to comment.