Skip to content

Commit

Permalink
[fix]プロジェクト名を変更する
Browse files Browse the repository at this point in the history
  • Loading branch information
nova-27 committed Sep 19, 2022
1 parent fc4a919 commit e211c0a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bukkit {
depend = ['WorldEdit', 'ProtocolLib']

commands {
mcweb {
crapos {
description = 'Export the selected area in the Sponge Schematic Format.'
usage = 'test!'
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'MCWeb'
rootProject.name = 'CrafterePost'
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.github.nova_27.mcplugin.mcweb;
package com.github.nova_27.mcplugin.crafterepost;

import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import com.github.nova_27.mcplugin.mcweb.record.RecordingManager;
import com.github.nova_27.mcplugin.crafterepost.record.RecordingManager;

import java.util.Objects;
import java.util.logging.Level;

public class MCWeb extends JavaPlugin {
private static MCWeb instance;
public class CrafterePost extends JavaPlugin {
private static CrafterePost instance;
private RecordingManager recordingManager;

public static MCWeb getInstance() {
public static CrafterePost getInstance() {
return instance;
}

Expand All @@ -35,8 +35,8 @@ public void onEnable() {
return;
}

recordingManager.runTaskTimer(MCWeb.getInstance(), 0L, 1L);
Objects.requireNonNull(getCommand("mcweb")).setExecutor(new SpigotCommand());
recordingManager.runTaskTimer(CrafterePost.getInstance(), 0L, 1L);
Objects.requireNonNull(getCommand("crapos")).setExecutor(new SpigotCommand());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.nova_27.mcplugin.mcweb;
package com.github.nova_27.mcplugin.crafterepost;

import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.nova_27.mcplugin.mcweb;
package com.github.nova_27.mcplugin.crafterepost;

import com.sk89q.worldedit.IncompleteRegionException;
import com.sk89q.worldedit.LocalSession;
Expand Down Expand Up @@ -38,7 +38,7 @@ private void schemCommand(@NotNull Player player) {
return;
}

var file = new File(MCWeb.getInstance().getDataFolder(), "test.schem");
var file = new File(CrafterePost.getInstance().getDataFolder(), "test.schem");
try(var outputStream = new FileOutputStream(file)) {
SchematicWriter.write(region, outputStream);
player.sendMessage(ChatColor.GREEN + "Schematic successfully saved.");
Expand All @@ -49,7 +49,7 @@ private void schemCommand(@NotNull Player player) {
}

private void recordCommand(@NotNull Player player) {
var recordingManager = MCWeb.getInstance().getRecordingManager();
var recordingManager = CrafterePost.getInstance().getRecordingManager();
var uuid = player.getUniqueId();

if(recordingManager.stopRecording(uuid)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.nova_27.mcplugin.mcweb.record;
package com.github.nova_27.mcplugin.crafterepost.record;

import com.github.nova_27.mcplugin.mcweb.MCWeb;
import com.github.nova_27.mcplugin.crafterepost.CrafterePost;
import com.sk89q.worldedit.regions.Region;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
Expand All @@ -21,7 +21,7 @@ public RecordingManager() {
recordings = new HashMap<>();
serverEventListener = new ServerEventListener();
elapsedTicks = 0;
Bukkit.getServer().getPluginManager().registerEvents(this, MCWeb.getInstance());
Bukkit.getServer().getPluginManager().registerEvents(this, CrafterePost.getInstance());
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.nova_27.mcplugin.mcweb.record;
package com.github.nova_27.mcplugin.crafterepost.record;

import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.bukkit.BukkitWorld;
Expand All @@ -8,8 +8,8 @@
import net.querz.nbt.tag.*;
import org.bukkit.Location;
import org.jetbrains.annotations.Nullable;
import com.github.nova_27.mcplugin.mcweb.MCWeb;
import com.github.nova_27.mcplugin.mcweb.SchematicWriter;
import com.github.nova_27.mcplugin.crafterepost.CrafterePost;
import com.github.nova_27.mcplugin.crafterepost.SchematicWriter;

import java.io.*;
import java.util.zip.GZIPOutputStream;
Expand Down Expand Up @@ -50,7 +50,7 @@ public RecordingWriter(Region region, long startTicks) {
public void save() throws IOException {
data.put("events", eventsData);

File file = new File(MCWeb.getInstance().getDataFolder(), "test.mcsr");
File file = new File(CrafterePost.getInstance().getDataFolder(), "test.mcsr");
try (var nbtOut = new NBTOutputStream(new GZIPOutputStream(new FileOutputStream(file), true))) {
nbtOut.writeTag(new NamedTag(null, data), Tag.DEFAULT_MAX_DEPTH);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.nova_27.mcplugin.mcweb.record;
package com.github.nova_27.mcplugin.crafterepost.record;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
Expand All @@ -10,7 +10,7 @@
import com.comphenix.protocol.wrappers.WrappedBlockData;
import org.bukkit.Location;
import org.bukkit.World;
import com.github.nova_27.mcplugin.mcweb.MCWeb;
import com.github.nova_27.mcplugin.crafterepost.CrafterePost;

import java.lang.reflect.Method;
import java.util.HashMap;
Expand All @@ -22,7 +22,7 @@ public class ServerEventListener {
public ServerEventListener() {
blockChanges = new HashMap<>();
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(
MCWeb.getInstance(),
CrafterePost.getInstance(),
ListenerPriority.NORMAL,
PacketType.Play.Server.BLOCK_CHANGE,
PacketType.Play.Server.MULTI_BLOCK_CHANGE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.nova_27.mcplugin.mcweb.record;
package com.github.nova_27.mcplugin.crafterepost.record;

import net.querz.nbt.tag.CompoundTag;
import net.querz.nbt.tag.ListTag;
Expand Down

0 comments on commit e211c0a

Please sign in to comment.