6 changed files with 10 additions and 291 deletions
@ -1,28 +0,0 @@
|
||||
package ru.simsonic.rscPermissions.Sponge.Commands; |
||||
|
||||
import org.spongepowered.api.command.CommandException; |
||||
import org.spongepowered.api.command.CommandResult; |
||||
import org.spongepowered.api.command.CommandSource; |
||||
import org.spongepowered.api.command.args.CommandContext; |
||||
import org.spongepowered.api.command.spec.CommandExecutor; |
||||
import org.spongepowered.api.command.spec.CommandSpec; |
||||
import org.spongepowered.api.text.Text; |
||||
|
||||
public class SpongeCommands implements CommandExecutor |
||||
{ |
||||
private final CommandSpec commandHub = CommandSpec.builder() |
||||
.description(Text.of("Hello World Command")) |
||||
.permission("myplugin.command.helloworld") |
||||
.executor(this) |
||||
.build(); |
||||
public SpongeCommands() |
||||
{ |
||||
// game.getCommandDispatcher().register(plugin, commandHub, "helloworld", "hello", "test");
|
||||
} |
||||
@Override |
||||
public CommandResult execute(CommandSource src, CommandContext context) throws CommandException |
||||
{ |
||||
src.sendMessage(Text.of("Hello rscp's World!")); |
||||
return CommandResult.success(); |
||||
} |
||||
} |
@ -1,6 +0,0 @@
|
||||
package ru.simsonic.rscPermissions.Sponge; |
||||
|
||||
public class SpongeEventListener |
||||
{ |
||||
|
||||
} |
@ -1,68 +0,0 @@
|
||||
package ru.simsonic.rscPermissions.Sponge; |
||||
|
||||
import java.util.Collection; |
||||
import java.util.Map; |
||||
import java.util.Optional; |
||||
import org.spongepowered.api.service.context.ContextCalculator; |
||||
import org.spongepowered.api.service.permission.PermissionDescription; |
||||
import org.spongepowered.api.service.permission.PermissionService; |
||||
import org.spongepowered.api.service.permission.Subject; |
||||
import org.spongepowered.api.service.permission.SubjectCollection; |
||||
import org.spongepowered.api.service.permission.SubjectData; |
||||
import ru.simsonic.rscPermissions.SpongePluginMain; |
||||
|
||||
public class SpongePermissionManager implements PermissionService |
||||
{ |
||||
private final SpongePluginMain rscp; |
||||
// private final Logger logger;
|
||||
public SpongePermissionManager(SpongePluginMain plugin) |
||||
{ |
||||
this.rscp = plugin; |
||||
// this.logger = rscp.getLogger();
|
||||
} |
||||
@Override |
||||
public SubjectCollection getUserSubjects() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public SubjectCollection getGroupSubjects() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public SubjectData getDefaultData() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public SubjectCollection getSubjects(String identifier) |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public Map<String, SubjectCollection> getKnownSubjects() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public void registerContextCalculator(ContextCalculator<Subject> cc) |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public Optional<PermissionDescription.Builder> newDescriptionBuilder(Object o) |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public Optional<PermissionDescription> getDescription(String string) |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public Collection<PermissionDescription> getDescriptions() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
} |
@ -1,116 +0,0 @@
|
||||
package ru.simsonic.rscPermissions.Sponge; |
||||
|
||||
import java.util.Map; |
||||
import ru.simsonic.rscCommonsLibrary.ConnectionMySQL.ConnectionParams; |
||||
import ru.simsonic.rscPermissions.API.Settings; |
||||
import ru.simsonic.rscPermissions.API.TranslationProvider; |
||||
import ru.simsonic.rscPermissions.SpongePluginMain; |
||||
|
||||
public class SpongePluginConfiguration implements Settings |
||||
{ |
||||
private final SpongePluginMain rscp; |
||||
public SpongePluginConfiguration(SpongePluginMain plugin) |
||||
{ |
||||
this.rscp = plugin; |
||||
} |
||||
@Override |
||||
public void onLoad() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public void onEnable() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public String getDefaultGroup() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isDefaultForever() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isAsteriskOP() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isUsingAncestorPrefixes() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isInMaintenance() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public String getMaintenanceMode() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public void setMaintenanceMode(String mode) |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public String getMaintenancePingMsg() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public String getMaintenanceKickMsg() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public String getMaintenanceJoinMsg() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isUseResidence() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isUseWorldGuard() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public long getRegionFinderGranularity() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public int getAutoReloadDelayTicks() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public boolean isUseMetrics() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public Map<String, Integer> getSlotLimits() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public TranslationProvider getTranslationProvider() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
@Override |
||||
public ConnectionParams getConnectionParams() |
||||
{ |
||||
throw new UnsupportedOperationException("Not supported yet."); |
||||
} |
||||
} |
@ -1,64 +0,0 @@
|
||||
package ru.simsonic.rscPermissions; |
||||
|
||||
import java.io.File; |
||||
import org.spongepowered.api.plugin.Plugin; |
||||
import ru.simsonic.rscPermissions.API.Settings; |
||||
import ru.simsonic.rscPermissions.Engine.Backends.BackendDatabase; |
||||
import ru.simsonic.rscPermissions.Engine.Backends.BackendJson; |
||||
import ru.simsonic.rscPermissions.Engine.InternalCache; |
||||
import ru.simsonic.rscPermissions.Sponge.SpongePermissionManager; |
||||
import ru.simsonic.rscPermissions.Sponge.SpongePluginConfiguration; |
||||
|
||||
// Documentation for Sponge: https://docs.spongepowered.org/ru/index.html
|
||||
|
||||
@Plugin(id = "rscPermissions", name = "rscPermissions", version = "0.10.0b") |
||||
public class SpongePluginMain |
||||
{ |
||||
/* |
||||
private final Logger logger; |
||||
*/ |
||||
private final Settings settings = new SpongePluginConfiguration(this); |
||||
private final SpongePermissionManager permissionManager = new SpongePermissionManager(this); |
||||
public final BackendJson localStorage = new BackendJson(new File("")); |
||||
public final BackendDatabase connection = new BackendDatabase(null); |
||||
public final InternalCache internalCache = new InternalCache(); |
||||
/* |
||||
@Inject |
||||
private Game game; |
||||
@Inject |
||||
public SpongePluginMain(Logger logger) |
||||
{ |
||||
this.logger = logger; |
||||
logger.info("API VERSION IS " + game.getApiVersion()); |
||||
} |
||||
public Logger getLogger() |
||||
{ |
||||
return logger; |
||||
} |
||||
@Subscribe |
||||
public void onServerStart(ServerAboutToStartEvent event) |
||||
{ |
||||
logger.info("onServerStart"); |
||||
} |
||||
@Subscribe |
||||
public void onServerStarting(ServerStartingEvent event) |
||||
{ |
||||
logger.info("onServerStarting"); |
||||
} |
||||
@Subscribe |
||||
public void onServerStarted(ServerStartedEvent event) |
||||
{ |
||||
logger.info("onServerStarted"); |
||||
} |
||||
@Subscribe |
||||
public void onServerStopping(ServerStoppingEvent event) |
||||
{ |
||||
logger.info("onServerStopping"); |
||||
} |
||||
@Subscribe |
||||
public void onServerStopped(ServerStoppedEvent event) |
||||
{ |
||||
logger.info("onServerStopped"); |
||||
} |
||||
*/ |
||||
} |
Loading…
Reference in new issue