io.github.dailystruggle.rtp.common.commands.BaseRTPCmdImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of RTP Show documentation
Show all versions of RTP Show documentation
a random teleport plugin
package io.github.dailystruggle.rtp.common.commands;
import io.github.dailystruggle.commandsapi.common.CommandParameter;
import io.github.dailystruggle.commandsapi.common.CommandsAPICommand;
import org.jetbrains.annotations.Nullable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public abstract class BaseRTPCmdImpl implements BaseRTPCmd {
protected final Map parameterLookup = new ConcurrentHashMap<>();
// key: command name
// value: command object
protected final Map commandLookup = new ConcurrentHashMap<>();
private final CommandsAPICommand parent;
protected long avgTime = 0;
public BaseRTPCmdImpl(@Nullable CommandsAPICommand parent) {
this.parent = parent;
}
@Override
public CommandsAPICommand parent() {
return parent;
}
@Override
public Map getParameterLookup() {
return parameterLookup;
}
@Override
public Map getCommandLookup() {
return commandLookup;
}
@Override
public long avgTime() {
return avgTime;
}
}