Minecraft SecretPassage Plugin Revival?

Hello, literal illiterate here. I've been looking for a secret door plugin and found the old one I used to use when I was like, 11? There really isn't anything else like it out right now. Clueless about Java and its workings. Is it possible to recreate or update the below plugin into modern times like 1.21? Reference: https://www.youtube.com/watch?v=--6FTt8cZ7A
VariationVault
YouTube
Minecraft Bukkit Plugin - Secret Passage - make hidden doors!
This video is on Minecraft Bukkit Plugin - Secret Passage - make hidden doors! Download : http://dev.bukkit.org/bukkit-mods/secretpassage/ Thanks for watching, if this video has helped Please remember to rate, subscribe and comment
27 Replies
Admincraft Meta
Admincraft Meta6mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by yaxhero1#0
SuckShaft
SuckShaftOP6mo ago
anyone 😦
Snowz
Snowz6mo ago
Bukkit
SecretPassage
Powerful tool for creating disappearing structures, doorways, etc
Snowz
Snowz6mo ago
Try and see if it still works, it might ¯\_(ツ)_/¯
Cubicake
Cubicake6mo ago
the source code is included in the .jar file
huh, didn't know that was a thing
Admincraft Meta
Admincraft Meta6mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
DefaultConfig.java
PassageManager.java
SecretPassage.java
SPBlockListener.java
SPPlayerListener.java
SPRedstoneListener.java
SwitchBlock.java
Requested by cubicake#0
Cubicake
Cubicake6mo ago
Those are all the provided java files
SuckShaft
SuckShaftOP6mo ago
me taking a "crack at it" is like sending an egg to assassinate saddam hussein. BUT I'LL TRY!!!!! guys. i think i've done it.
Kaludi
Kaludi6mo ago
Nice, create a repo on github if you’d like so others could use it as well
SuckShaft
SuckShaftOP6mo ago
I'm not sure how and I messed up the code by trying to add some extra stuff. I've a ,jar file if you guys want to split it open like you did for the other plugin, feel free to upload to github whatever i don't really mind 😄
Connor
Connor6mo ago
if you upload it to github and make it open source i can fork it maybe whenever I have the time
Cubicake
Cubicake6mo ago
(apparently this is wrong) Regular jar files can't be opened to get the source code
Snowz
Snowz6mo ago
jd compiler its not obfuscated also this plugin just includes the actual .java src files in it so you can just "unzip" it with 7zip
Cubicake
Cubicake6mo ago
yea Ik thats what I did to get these wouldn't the variable names etc all be random tho?
Snowz
Snowz6mo ago
nope
Cubicake
Cubicake6mo ago
huh really? didn't know that was a thing
Snowz
Snowz6mo ago
random src file from VotingPlugin:
package com.bencodez.votingplugin.broadcast;

import com.bencodez.votingplugin.VotingPluginMain;
import com.bencodez.votingplugin.advancedcore.api.messages.PlaceholderUtils;
import com.bencodez.votingplugin.advancedcore.api.misc.MiscUtils;
import com.bencodez.votingplugin.simpleapi.messages.MessageAPI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

public class BroadcastHandler {
private VotingPluginMain plugin;

private ScheduledExecutorService timer;

ConcurrentLinkedQueue<String> votedPlayers = new ConcurrentLinkedQueue<>();

public BroadcastHandler(VotingPluginMain plugin, int delay) {
this.plugin = plugin;
schedule(delay);
}

public void check() {
int size = this.votedPlayers.size();
if (size > 0) {
for (int i = 0; i < size; i++)
this.votedPlayers.poll();
String bc = MessageAPI.colorize(this.plugin.getConfigFile().getFormatAlternateBroadcastBroadcast());
String playersText = "";
while (!this.votedPlayers.isEmpty()) {
playersText = playersText + (String)this.votedPlayers.remove();
if (!this.votedPlayers.isEmpty())
playersText = playersText + ", ";
}
HashMap<String, String> placeholders = new HashMap<>();
placeholders.put("numberofplayers", "" + size);
placeholders.put("players", playersText);
bc = PlaceholderUtils.replacePlaceHolder(bc, placeholders);
ArrayList<Player> players = new ArrayList<>();
for (Player p : Bukkit.getOnlinePlayers()) {
if (!this.plugin.getVotingPluginUserManager().getVotingPluginUser(p).getDisableBroadcast())
players.add(p);
}
MiscUtils.getInstance().broadcast(bc, players);
}
}

public void onVote(String player) {
this.votedPlayers.add(player);
}

public void schedule(int delay) {
if (this.timer != null) {
this.timer.shutdownNow();
this.timer = Executors.newScheduledThreadPool(1);
} else {
this.timer = Executors.newScheduledThreadPool(1);
}
this.timer.scheduleWithFixedDelay(new Runnable() {
public void run() {
BroadcastHandler.this.check();
}
}, 60L, (60 * delay), TimeUnit.SECONDS);
}
}
package com.bencodez.votingplugin.broadcast;

import com.bencodez.votingplugin.VotingPluginMain;
import com.bencodez.votingplugin.advancedcore.api.messages.PlaceholderUtils;
import com.bencodez.votingplugin.advancedcore.api.misc.MiscUtils;
import com.bencodez.votingplugin.simpleapi.messages.MessageAPI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;

public class BroadcastHandler {
private VotingPluginMain plugin;

private ScheduledExecutorService timer;

ConcurrentLinkedQueue<String> votedPlayers = new ConcurrentLinkedQueue<>();

public BroadcastHandler(VotingPluginMain plugin, int delay) {
this.plugin = plugin;
schedule(delay);
}

public void check() {
int size = this.votedPlayers.size();
if (size > 0) {
for (int i = 0; i < size; i++)
this.votedPlayers.poll();
String bc = MessageAPI.colorize(this.plugin.getConfigFile().getFormatAlternateBroadcastBroadcast());
String playersText = "";
while (!this.votedPlayers.isEmpty()) {
playersText = playersText + (String)this.votedPlayers.remove();
if (!this.votedPlayers.isEmpty())
playersText = playersText + ", ";
}
HashMap<String, String> placeholders = new HashMap<>();
placeholders.put("numberofplayers", "" + size);
placeholders.put("players", playersText);
bc = PlaceholderUtils.replacePlaceHolder(bc, placeholders);
ArrayList<Player> players = new ArrayList<>();
for (Player p : Bukkit.getOnlinePlayers()) {
if (!this.plugin.getVotingPluginUserManager().getVotingPluginUser(p).getDisableBroadcast())
players.add(p);
}
MiscUtils.getInstance().broadcast(bc, players);
}
}

public void onVote(String player) {
this.votedPlayers.add(player);
}

public void schedule(int delay) {
if (this.timer != null) {
this.timer.shutdownNow();
this.timer = Executors.newScheduledThreadPool(1);
} else {
this.timer = Executors.newScheduledThreadPool(1);
}
this.timer.scheduleWithFixedDelay(new Runnable() {
public void run() {
BroadcastHandler.this.check();
}
}, 60L, (60 * delay), TimeUnit.SECONDS);
}
}
SuckShaft
SuckShaftOP6mo ago
Boss
SuckShaft
SuckShaftOP6mo ago
GitHub
GitHub - giganbrian/SecretPassage: A revival of the Secret Passage ...
A revival of the Secret Passage plugin from Minecraft v1.5 - giganbrian/SecretPassage
cal
cal6mo ago
no if its unobfuscated nothing changes you can decompile it to exactly how the src code is
cal
cal6mo ago
Java Decompiler
JD Java Decompiler
Snowz
Snowz6mo ago
read the messages before dont know why people never do that
cal
cal6mo ago
👍
SuckShaft
SuckShaftOP6mo ago
Update, it can't remember things like deepslate walls. No idea how to fix that. upon server restart it'll crash
cal
cal6mo ago
show error log did you update the dependencies and api-version in plugin.yml?
SuckShaft
SuckShaftOP6mo ago
Yup. I was able to fix this a bit later. It's still very simple and basic. Needs work arounds to make certain things work, but it works 1.21+ 😄

Did you find this page helpful?