Skip to content

Commit

Permalink
Optimize packages and simplify getter
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick <[email protected]>
  • Loading branch information
CoWinkKeyDinkInc authored and Electroid committed Oct 1, 2021
1 parent 7598754 commit e756695
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions core/src/main/java/tc/oc/pgm/core/CoreMatchModule.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package tc.oc.pgm.core;

import static net.kyori.adventure.text.Component.text;
import static net.kyori.adventure.text.Component.translatable;
import static tc.oc.pgm.api.map.MapProtos.MODES_IMPLEMENTATION_VERSION;

Expand All @@ -27,7 +26,6 @@
import tc.oc.pgm.api.player.ParticipantState;
import tc.oc.pgm.events.ListenerScope;
import tc.oc.pgm.events.ParticipantBlockTransformEvent;
import tc.oc.pgm.goals.GoalDefinition;
import tc.oc.pgm.goals.events.GoalCompleteEvent;
import tc.oc.pgm.goals.events.GoalStatusChangeEvent;
import tc.oc.pgm.modes.ObjectiveModeChangeEvent;
Expand Down Expand Up @@ -95,7 +93,7 @@ public void breakCheck(final BlockTransformEvent event) {
Competitor team = player.getParty();

if (team == core.getOwner()) {
event.setCancelled(translatable("objective.damageOwn", text(core.getName())));
event.setCancelled(translatable("objective.damageOwn", core.getComponentName()));
} else if (event.getOldState().getData().equals(core.getMaterial())) {
this.match.callEvent(new CoreBlockBreakEvent(core, player, event.getOldState()));
core.touch(player);
Expand Down Expand Up @@ -136,7 +134,7 @@ public void damageCheck(BlockDamageEvent event) {
&& core.getCasingRegion().contains(center)
&& player.getParty() == core.getOwner()) {
event.setCancelled(true);
player.sendWarning(translatable("objective.damageOwn", core.getDefinition().getComponentName()));
player.sendWarning(translatable("objective.damageOwn", core.getComponentName()));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package tc.oc.pgm.destroyable;

import static net.kyori.adventure.text.Component.text;
import static net.kyori.adventure.text.Component.translatable;

import java.awt.*;
import java.util.Collection;
import org.bukkit.block.Block;
import org.bukkit.entity.minecart.ExplosiveMinecart;
Expand Down

0 comments on commit e756695

Please sign in to comment.