Skip to content

Commit

Permalink
[CORE] ArmorStandEditor 1.20-44: Fixes and New UI! (#311)
Browse files Browse the repository at this point in the history
* [CORE] Version Bump: 1.20-44

* [CORE] Fix for #309. Add Check for ArmorStand Vulnerability and prevent destruction in Creative Mode when its Invulnerable

* [CORE] Upgrade Codebase to 17

* [CORE] Bump Base API Version to 1.17

* [CORE] Autoformatting and Order Imports

* [CORE] Per World Support for ArmorStandEditor

* [CORE] Better Implementation for Per World Support for ArmorStandEditor. More in line with what is expected!

* [CORE] Better Implementation for Per World Support for ArmorStandEditor. More in line with what is expected!

* [CORE] Version Bump: 1.20-44

* [CORE] Fix for #309. Add Check for ArmorStand Vulnerability and prevent destruction in Creative Mode when its Invulnerable

* [CORE] Upgrade Codebase to 17

* [CORE] Bump Base API Version to 1.17

* [CORE] Autoformatting and Order Imports

* [CORE] Per World Support for ArmorStandEditor

* [CORE] Better Implementation for Per World Support for ArmorStandEditor. More in line with what is expected!

* [CORE] Better Implementation for Per World Support for ArmorStandEditor. More in line with what is expected!

* [CORE] Config Support for Per World ArmorStandEditor.

* [CI-SKIP] Something to use for later if we ever move to Paper.

* [CORE] Fix for Messages not being sent properly in ASE. Bug from #315

Plus Potential Fix for #272

* [CORE] Bump ASE to 1.20.2-44

* [CORE] New UI Design #DreiFxn

* [CORE] Upgrade Fix: Fix ArmorStandVisibility Not working Properly

* [CORE] Bump Lands to 6.35.0 - Closes #310 and #328

* [CORE] Bump Towny to 0.99.5.20 - Closes #326 and #332

* [CORE] Bump Lombok to 1.18.30

* [CORE] Bump MavenShade to 3.5.1

* [CORE] Fixes found when Debugging 1.20.2-44:

- Add in No Perm Message if a user cant run a certain toggle
- Fix for the PlayerHead Menu Option
- Add all new strings for NoPermOption to the Language Files
- Fix Toggles

* [CORE] Refactor PlotSquared Protection

* [CORE] Refactor PlotSquared Protection (Part 2 - Comments + Readability)

* [CORE] Stats Command #334 (Part 1) - Add the Java Logic, No Language Support or Perm Support YET!

* [CI-SKIP] Tabbing was outta sync. Fixed it

* [CORE] Stats (Part 2 of 3) - Add missing Language Strings to test realm

* [CORE] Temporary fix for ArmorStand Names being weird and wacky when broken and placed back down.

* [CORE] Temporary fix for ArmorStand Names being weird and wacky when broken and placed back down.

* [CORE] Temporary fix for ArmorStand Names being weird and wacky when broken and placed back down.

* [CORE] Introduce Glowing Toggle:

- Requires `asedit.togglearmorstandglow` to be true
- Will only Glow `white`, otherwise will need to implement a whole scoreboard system just for all the colors. Something I dont wanna impose on people.
- Menu Option: `Glow Ink Sac`, Placement might vary
- Add to Stats tracker
- Add Language Strings for it.

* [CORE] Code Review Remarks - Apparently `CodeFactor` didnt like how I was doing the Stats calculations

* [CORE] Add Missing Modes to TabCompletion

* [CORE/LANG] Stats (part 3) - Add translation things

* [CORE] Change Version for Beta Deployment

* [CORE] Fix PlotSquared Protection Error on PlotAPI

* [CORE] One Final P2 Change and Bump to Final

* [CORE] Fix Dependencies

* [CORE] Fix Bug and Dependencies

* [CORE] Bump RU_RU.yml
  • Loading branch information
Wolfieheart authored Oct 12, 2023
1 parent 4937bc8 commit c1fce65
Show file tree
Hide file tree
Showing 51 changed files with 1,641 additions and 807 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,66 +29,66 @@

public class ASEventTester implements Listener {

Player player;
Player player;

//ArmorStandRenameEvent
@EventHandler
public void renameArmorStand(PlayerInteractAtEntityEvent ASRenameEvent){
player = ASRenameEvent.getPlayer();
ASRenameEvent.setCancelled(true);
if(ASRenameEvent.isCancelled()) {
player.sendMessage("ArmorStandRenameEvent has been cancelled");
} else{
player.sendMessage("ArmorStandRenameEvent has not been cancelled. Continuing....");
}
}
//ArmorStandRenameEvent
@EventHandler
public void renameArmorStand(PlayerInteractAtEntityEvent ASRenameEvent) {
player = ASRenameEvent.getPlayer();
ASRenameEvent.setCancelled(true);
if (ASRenameEvent.isCancelled()) {
player.sendMessage("ArmorStandRenameEvent has been cancelled");
} else {
player.sendMessage("ArmorStandRenameEvent has not been cancelled. Continuing....");
}
}

//ArmorStandManipEvent
@EventHandler
public void manipulateArmorStand(PlayerInteractAtEntityEvent ASManipEvent){
player = ASManipEvent.getPlayer();
ASManipEvent.setCancelled(true);
if(ASManipEvent.isCancelled()) {
player.sendMessage("ArmorStandManipulationEvent has been cancelled");
} else{
player.sendMessage("ArmorStandManipulationEvent has not been cancelled. Continuing....");
}
}
//ArmorStandManipEvent
@EventHandler
public void manipulateArmorStand(PlayerInteractAtEntityEvent ASManipEvent) {
player = ASManipEvent.getPlayer();
ASManipEvent.setCancelled(true);
if (ASManipEvent.isCancelled()) {
player.sendMessage("ArmorStandManipulationEvent has been cancelled");
} else {
player.sendMessage("ArmorStandManipulationEvent has not been cancelled. Continuing....");
}
}

//ArmorStandTargetedEvent
@EventHandler
public void targetEvent(PlayerSwapHandItemsEvent targetASEvent){
player = targetASEvent.getPlayer();
targetASEvent.setCancelled(true);
if(targetASEvent.isCancelled()) {
player.sendMessage("ArmorStandTargetedEvent has been cancelled");
} else{
player.sendMessage("ArmorStandTargetedEvent has not been cancelled. Continuing....");
}
}
//ArmorStandTargetedEvent
@EventHandler
public void targetEvent(PlayerSwapHandItemsEvent targetASEvent) {
player = targetASEvent.getPlayer();
targetASEvent.setCancelled(true);
if (targetASEvent.isCancelled()) {
player.sendMessage("ArmorStandTargetedEvent has been cancelled");
} else {
player.sendMessage("ArmorStandTargetedEvent has not been cancelled. Continuing....");
}
}

//PlayerOpenMenuEvent
//onArmorStandDamage EntityDamageByEntityEvent event
@EventHandler
public void playerOpeningMenuEvent(EntityDamageByEntityEvent ASEDamageMenuOpenEvent){
player = (Player) ASEDamageMenuOpenEvent.getDamager();
ASEDamageMenuOpenEvent.setCancelled(true);
if(ASEDamageMenuOpenEvent.isCancelled()) {
player.sendMessage("PlayerOpenMenuEvent has been cancelled");
} else{
player.sendMessage("PlayerOpenMenuEvent has not been cancelled. Continuing....");
}
}
//PlayerOpenMenuEvent
//onArmorStandDamage EntityDamageByEntityEvent event
@EventHandler
public void playerOpeningMenuEvent(EntityDamageByEntityEvent ASEDamageMenuOpenEvent) {
player = (Player) ASEDamageMenuOpenEvent.getDamager();
ASEDamageMenuOpenEvent.setCancelled(true);
if (ASEDamageMenuOpenEvent.isCancelled()) {
player.sendMessage("PlayerOpenMenuEvent has been cancelled");
} else {
player.sendMessage("PlayerOpenMenuEvent has not been cancelled. Continuing....");
}
}

//Also PlayerOpenMenuEvent when RightClicking/Interacting
@EventHandler
public void playerOpeningMenuRightClickEvent(PlayerInteractEvent ASERightClickMenuOpenEvent){
player = ASERightClickMenuOpenEvent.getPlayer();
ASERightClickMenuOpenEvent.setCancelled(true);
if(ASERightClickMenuOpenEvent.isCancelled()) {
player.sendMessage("PlayerOpenMenuEvent has been cancelled");
} else{
player.sendMessage("PlayerOpenMenuEvent has not been cancelled. Continuing....");
}
}
//Also PlayerOpenMenuEvent when RightClicking/Interacting
@EventHandler
public void playerOpeningMenuRightClickEvent(PlayerInteractEvent ASERightClickMenuOpenEvent) {
player = ASERightClickMenuOpenEvent.getPlayer();
ASERightClickMenuOpenEvent.setCancelled(true);
if (ASERightClickMenuOpenEvent.isCancelled()) {
player.sendMessage("PlayerOpenMenuEvent has been cancelled");
} else {
player.sendMessage("PlayerOpenMenuEvent has not been cancelled. Continuing....");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@

public class ArmorStandEditorAPITest extends JavaPlugin {

@Override
public void onEnable(){
this.getLogger().info("[ArmorStandEditor] API Testing Plugin v1.20.0-43 - Enable");
this.getServer().getPluginManager().registerEvents(new ASEventTester(), this);
this.getServer().getPluginManager().registerEvents(new IFEventTester(), this);
}
@Override
public void onEnable() {
this.getLogger().info("[ArmorStandEditor] API Testing Plugin v1.20.0-43 - Enable");
this.getServer().getPluginManager().registerEvents(new ASEventTester(), this);
this.getServer().getPluginManager().registerEvents(new IFEventTester(), this);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,51 +27,51 @@
import org.bukkit.event.player.PlayerSwapHandItemsEvent;

public class IFEventTester implements Listener {
Player player;
Player player;

//ItemFrameGlowEvent
@EventHandler
public void manipulateArmorStand(PlayerInteractAtEntityEvent IFGlowEvent){
player = IFGlowEvent.getPlayer();
IFGlowEvent.setCancelled(true);
if(IFGlowEvent.isCancelled()) {
player.sendMessage("ItemFrameGlowEvent has been cancelled");
} else{
player.sendMessage("ItemFrameGlowEvent has not been cancelled. Continuing....");
}
}
//ItemFrameGlowEvent
@EventHandler
public void manipulateArmorStand(PlayerInteractAtEntityEvent IFGlowEvent) {
player = IFGlowEvent.getPlayer();
IFGlowEvent.setCancelled(true);
if (IFGlowEvent.isCancelled()) {
player.sendMessage("ItemFrameGlowEvent has been cancelled");
} else {
player.sendMessage("ItemFrameGlowEvent has not been cancelled. Continuing....");
}
}

@EventHandler
public void manipulateItemFrame(EntityDamageByEntityEvent IFManipulationLeftClickEvent){
player = (Player) IFManipulationLeftClickEvent.getDamager();
IFManipulationLeftClickEvent.setCancelled(true);
if(IFManipulationLeftClickEvent.isCancelled()) {
player.sendMessage("ItemFrameManipulatedEvent has been cancelled");
} else{
player.sendMessage("ItemFrameManipulatedEvent has not been cancelled. Continuing....");
}
}
@EventHandler
public void manipulateItemFrame(EntityDamageByEntityEvent IFManipulationLeftClickEvent) {
player = (Player) IFManipulationLeftClickEvent.getDamager();
IFManipulationLeftClickEvent.setCancelled(true);
if (IFManipulationLeftClickEvent.isCancelled()) {
player.sendMessage("ItemFrameManipulatedEvent has been cancelled");
} else {
player.sendMessage("ItemFrameManipulatedEvent has not been cancelled. Continuing....");
}
}

@EventHandler
public void manipulateItemFrameRightClick(PlayerInteractAtEntityEvent IFManipulationRightClickEvent){
player = IFManipulationRightClickEvent.getPlayer();
IFManipulationRightClickEvent.setCancelled(true);
if(IFManipulationRightClickEvent.isCancelled()) {
player.sendMessage("ItemFrameManipulatedEvent has been cancelled");
} else{
player.sendMessage("ItemFrameManipulatedEvent has not been cancelled. Continuing....");
}
}
@EventHandler
public void manipulateItemFrameRightClick(PlayerInteractAtEntityEvent IFManipulationRightClickEvent) {
player = IFManipulationRightClickEvent.getPlayer();
IFManipulationRightClickEvent.setCancelled(true);
if (IFManipulationRightClickEvent.isCancelled()) {
player.sendMessage("ItemFrameManipulatedEvent has been cancelled");
} else {
player.sendMessage("ItemFrameManipulatedEvent has not been cancelled. Continuing....");
}
}

@EventHandler
public void targetEvent(PlayerSwapHandItemsEvent targetIFEvent){
player = targetIFEvent.getPlayer();
targetIFEvent.setCancelled(true);
if(targetIFEvent.isCancelled()) {
player.sendMessage("ItemFrameTargetedEvent has been cancelled");
} else{
player.sendMessage("ItemFrameTargetedEvent has not been cancelled. Continuing....");
}
}
@EventHandler
public void targetEvent(PlayerSwapHandItemsEvent targetIFEvent) {
player = targetIFEvent.getPlayer();
targetIFEvent.setCancelled(true);
if (targetIFEvent.isCancelled()) {
player.sendMessage("ItemFrameTargetedEvent has been cancelled");
} else {
player.sendMessage("ItemFrameTargetedEvent has not been cancelled. Continuing....");
}
}

}
35 changes: 28 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.github.rypofalem.armorstandeditor</groupId>
<artifactId>armorstandeditor</artifactId>
<packaging>jar</packaging>
<version>1.20.1-43.2</version>
<version>1.20.x-44</version>
<name>armorstandeditor</name>
<url>http://maven.apache.org</url>

Expand Down Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -129,7 +129,6 @@
<version>7.1.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.intellectualsites.plotsquared</groupId>
<artifactId>plotsquared-bukkit</artifactId>
Expand Down Expand Up @@ -181,7 +180,7 @@
<dependency>
<groupId>com.github.angeschossen</groupId>
<artifactId>LandsAPI</artifactId>
<version>6.34.0</version>
<version>6.35.0</version>
<scope>provided</scope>
</dependency>
<!-- Bentobox -->
Expand All @@ -198,17 +197,40 @@
<version>4.0.43</version>
<scope>provided</scope>
</dependency>

<!-- Lombok Support -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!--Java 8-->
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>5.4.1</version>
<configuration>
<activeRecipes>
<recipe>org.openrewrite.java.migrate.UpgradeToJava17</recipe>
<recipe>org.openrewrite.java.format.AutoFormat</recipe>
<recipe>org.openrewrite.java.recipes.FindRecipes</recipe>
<recipe>org.openrewrite.java.OrderImports</recipe>
<recipe>org.openrewrite.java.ShortenFullyQualifiedTypeReferences</recipe>
<recipe>org.openrewrite.java.RemoveUnusedImports</recipe>
</activeRecipes>
</configuration>
<dependencies>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>2.0.9</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
Expand Down Expand Up @@ -237,8 +259,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down
Loading

0 comments on commit c1fce65

Please sign in to comment.