Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
fix(tpa): use google.inject @Inject
Browse files Browse the repository at this point in the history
  • Loading branch information
siansxint committed May 19, 2024
1 parent 05e23a5 commit 2fd8c01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package team.devblook.pepitocore.plugin.module.tpa;

import com.google.common.collect.Multimap;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextColor;
import org.bukkit.entity.Player;
import team.devblook.pepitocore.plugin.module.tpa.model.TPARequest;

import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.Collection;
import java.util.UUID;

@Singleton
public class TPARequestManager {

@Inject
private Multimap<UUID, TPARequest> requests;
private @Inject Multimap<UUID, TPARequest> requests;

public void send(Player from, Player to) {
TPARequest request = new TPARequest(from, to);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package team.devblook.pepitocore.plugin.module.tpa.command;

import com.google.inject.Inject;
import me.fixeddev.commandflow.annotated.CommandClass;
import me.fixeddev.commandflow.annotated.annotation.ArgOrSub;
import me.fixeddev.commandflow.annotated.annotation.Command;
Expand All @@ -10,14 +11,11 @@
import org.bukkit.entity.Player;
import team.devblook.pepitocore.plugin.module.tpa.TPARequestManager;

import javax.inject.Inject;

@Command(names = "tpa")
@ArgOrSub(value = true)
public class TPACommand implements CommandClass {

@Inject
private TPARequestManager requestManager;
private @Inject TPARequestManager requestManager;

@Command(names = "")
public void send(@Sender Player player, OfflinePlayer target) {
Expand Down

0 comments on commit 2fd8c01

Please sign in to comment.