-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cvrwed
committed
May 2, 2024
1 parent
e77ec8a
commit 68d4feb
Showing
17 changed files
with
348 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package cc.unknown.command.commands; | ||
|
||
import cc.unknown.command.Command; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
|
||
public class SpyCommand extends Command { | ||
|
||
@Override // remote view cmd of lb | ||
public void onExecute(String[] args) { | ||
if (args.length < 2) { | ||
if (mc.getRenderViewEntity() != mc.thePlayer) { | ||
mc.setRenderViewEntity(mc.thePlayer); | ||
return; | ||
} | ||
sendChat(getColor("Red") + " Syntax Error. Use: " + getSyntax()); | ||
return; | ||
} | ||
|
||
String target = args[1]; | ||
|
||
for (EntityPlayer entity : mc.theWorld.playerEntities) { | ||
if (target.equals(entity.getName())) { | ||
mc.setRenderViewEntity(entity); | ||
sendChat("Spying to §8${entity.name}§3."); | ||
sendChat("Execute §8.spy §3again to go back to yours."); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public String getSyntax() { | ||
return ".spy <user>"; | ||
} | ||
|
||
@Override | ||
public String getDesc() { | ||
return "Spying..."; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "spy"; | ||
} | ||
|
||
@Override | ||
public String getAlias() { | ||
return "spy"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.