Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup util classes #5348

Merged
merged 24 commits into from
Oct 24, 2021
Merged

Cleanup util classes #5348

merged 24 commits into from
Oct 24, 2021

Conversation

ggvbo
Copy link
Contributor

@ggvbo ggvbo commented Oct 7, 2021

Description:

This pull request improves code in multiple util classes.

  • Deprecate TownyAPI#jailTeleport(final Player player, final Location location)
  • Translate JailReason
  • Translate JailUtil#sendJailedBookToResident(Player player, JailReason reason)
  • Simplify CombatUtil#isWorldPvP
  • Simplify JailUtil#teleportAwayFromJail
  • Simplify JailUtil#teleportToJail
  • Simplify if in CombatUtil#isAlly(String attackingResident, String defendingResident)
  • Add SpawnUtil#getIdealLocation(Resident resident)
  • Add SpawnUtil#jailAwayTeleport(Resident jailed)
  • Add SpawnUtil#jailTeleport(Resident jailed)
  • Add SpawnUtil#initiatePluginTeleport(Resident resident, Location loc)
  • Delete CombatUtil#preventFriendlyFire(Player attacker, Player defender)
  • Delete CombatUtil#isPvPPlot(Player attacker, Player defender)

New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

@ggvbo ggvbo marked this pull request as ready for review October 7, 2021 01:14
resources/lang/en-US.yml Outdated Show resolved Hide resolved
src/com/palmergames/bukkit/towny/TownyAPI.java Outdated Show resolved Hide resolved
src/com/palmergames/bukkit/towny/utils/CombatUtil.java Outdated Show resolved Hide resolved
src/com/palmergames/bukkit/towny/utils/CombatUtil.java Outdated Show resolved Hide resolved
src/com/palmergames/bukkit/towny/utils/JailUtil.java Outdated Show resolved Hide resolved
src/com/palmergames/bukkit/towny/utils/JailUtil.java Outdated Show resolved Hide resolved
ggvbo added 2 commits October 15, 2021 18:04
# Conflicts:
#	resources/lang/en-US.yml
#	src/com/palmergames/bukkit/towny/TownyAPI.java
#	src/com/palmergames/bukkit/towny/object/jail/JailReason.java
#	src/com/palmergames/bukkit/towny/utils/CombatUtil.java
#	src/com/palmergames/bukkit/towny/utils/JailUtil.java
#	src/com/palmergames/bukkit/towny/utils/SpawnUtil.java
@ggvbo ggvbo requested a review from LlmDl October 23, 2021 20:37
@LlmDl LlmDl added this to the 0.97.3.0 milestone Oct 24, 2021
@LlmDl LlmDl merged commit edda66b into TownyAdvanced:master Oct 24, 2021
LlmDl added a commit that referenced this pull request Oct 24, 2021
@ggvbo ggvbo deleted the cleanup/utils branch October 25, 2021 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants